[HN Gopher] Booting Linux off of Google Drive
___________________________________________________________________
Booting Linux off of Google Drive
Author : jandeboevrie
Score : 378 points
Date : 2024-07-02 05:20 UTC (17 hours ago)
(HTM) web link (ersei.net)
(TXT) w3m dump (ersei.net)
| fsckboy wrote:
| mid 90's, a friend of mine installed Windows NT to, and booted it
| from, a DAT tape
| Maakuth wrote:
| How long did it take? Seek times for tapes can be minutes, so
| fragmentation matters a great deal here.
| fsckboy wrote:
| installation was more than overnight. once it was up and
| running, it was remarkably responsive, in the short run, but
| would invariably need to do a lot of seeking to launch any
| app. The sort of thing if you are sitting nearby you could
| give it some input every couple minutes.
| jasomill wrote:
| I seem to recall some vendor (HP?) selling external tape
| drives at some point that supported bootable, bare metal
| Windows restore from tape.
|
| I believe it worked by supplying the recovery software as a
| bootable ISO image in ROM on the drive and emulating a
| bootable (USB? SCSI?) CD-ROM drive at boot.
| brnt wrote:
| I got PTSD from installing Windows 95 from floppy and after 40
| floppies getting read errors...
| beAbU wrote:
| Somewhere in my parents' house there is a massive box with
| floppies for office 95 (or whatever it was called back then).
| Not 40 floppies massive, but still a large number.
|
| I think we managed to only ever install it once successfully
| without error.
|
| Also, fun semi-related fact: In my country we called 8" and
| 5.25" floppies "floppies", and the smaller 3.5" ones were
| called "stiffies" - because the larger ones were floppy, and
| the smaller were, well, stiffer. Do with this information as
| you please.
| exe34 wrote:
| i need to know which country this is, please!
| cyberpunk wrote:
| Certainly not the UK where inserting your stiffie in to
| something has rather a different connotation....
| teschmitt wrote:
| I'm going to wager South Africa based on this blog post:
| https://jasonelk.com/2015/12/who-knew-that-the-rest-of-
| the-w...
| obrix wrote:
| Happened also in Finland. It was "lerppu" (floppy) for
| the flexible ones and "korppu" (hard biscuit) for the
| hard ones.
| beAbU wrote:
| South Africa!
| raesene9 wrote:
| My first IT job involved installing a lot of Windows 95 from
| floppy disk. Luckily each PC I bought came with a set, so I'd
| build up some "good sets" over time after discarding all the
| disks that had read errors.
| yencabulator wrote:
| The first time I installed SLS Linux (pre-Slackware), it took
| some 25 1.44MB floppies and I owned ~20 empty ones. I left
| the installer running overnight and downloaded more floppies
| the next day at school. It took an extra day because some
| floppies had bad sectors, and had to be re-downloaded..
| raffraffraff wrote:
| That must have been fun.
|
| In the late 90s I worked in the server support line for DEC,
| and the number of times we had to talk people through the
| "invisible F6 prompt" was nuts.
| tryauuum wrote:
| can you explain?
| sjsdaiuasgdia wrote:
| If your intended system volume was going to require drivers
| that weren't built into WinNT, you needed to press F6 at a
| specific point during installation. This would allow you to
| load a driver that makes the volume visible / usable.
|
| This process was specific to installing storage drivers
| needed for the system volume. All other driver installation
| happened elsewhere.
|
| My memory says there was actually a "Press F6 to load
| system storage drivers" prompt or something displayed by
| the installer, but it wasn't displayed for all that long a
| time and I imagine it was effectively invisible for many
| people. I recall spamming F6 to make sure I wouldn't miss
| the prompt.
| kotaKat wrote:
| While not booted from, wimlib's support for pipable WIMs means
| through some shenanigans, you can install modern Windows from
| tape. I had a bootstrap ISO that would fire up Windows PE,
| mount my USB DAT tape drive, rewind it, prep the onboard
| storage, then image direct from tape to disk and make it
| bootable.
|
| I posit that because wimlib supports pipable WIMs that we could
| pipe an endless stream of QR codes to it (thus making the
| "installing Windows from QR codes" possible)...
| prmoustache wrote:
| Can you really say you are booting off of something remote when
| you are really booting a rootfs from a local initramfs of several
| megabytes?
| russdill wrote:
| To close the loop, they really need an EFI stub that loads a
| combined kernel image/ramfs from Drive.
| ceving wrote:
| iPXE can already boot from a web server: https://ipxe.org/
| e12e wrote:
| Should be possible then, if you "share" the initrd and
| Linux image?
|
| https://stackoverflow.com/questions/37453841/download-a-
| file...
| 01HNNWZ0MV43FF wrote:
| That's what I'm saying about hard drives and ROMs
| unixhero wrote:
| Yeah we didn't need those silly hardrives with their crufty
| filesystems.
| creshal wrote:
| Not any worse than 32+ megabytes of UEFI booting off of an iPXE
| bootrom.
| omnicognate wrote:
| Perhaps that's what this "off of" preposition means. I've often
| wondered.
| pjmlp wrote:
| Tfpt boot gets rediscovered.
| kvdveer wrote:
| But now with some one else's computer (aka, "the cloud")
| pjmlp wrote:
| It was always with someone else computer, we used to call it
| timesharing and thin clients. :)
| throwaway984393 wrote:
| It was especially fun when you used someone's entire
| computer lab during night hours ;)
| pjmlp wrote:
| Yep, I had some fun with PVM, for the audience, somehow
| the alternative that lost to MPI.
| INTPenis wrote:
| You meant to say tftp right? I'm just checking if there is some
| long lost technology called Tfpt that I have never heard of.
| pjmlp wrote:
| Typo.
| yjftsjthsd-h wrote:
| I mean,
|
| > Competitiveness is a vice of mine. When I heard that a friend
| got Linux to boot off of NFS, I had to one-up her. I had to
| prove that I could create something harder, something better,
| faster, stronger.
|
| sounds like they're well aware of the traditional way to do it,
| and are deliberately going out of their way to do something
| different and weird.
| nemoniac wrote:
| Speaking of booting Linux from places, what I would like to be
| able to do is carry a Linux image around with me on my (Android)
| smartphone, plug the phone into a USB port on a laptop and boot
| the Linux image from there on the laptop. Does such a thing
| exist?
| hexmiles wrote:
| https://play.google.com/store/apps/details?id=com.softwareba...
| .
|
| It dosen't work on all smartphone
| senectus1 wrote:
| Also requires Root access
| sambazi wrote:
| not sure if such a thing can work w/o root
| jstanley wrote:
| Why does it need to be on the phone? Carry a normal USB stick.
| Infinity315 wrote:
| It doesn't, but consider that the vast majority of us already
| carry our phones everywhere.
|
| Would carrying an extra USB stick be that big of a hassle?
| No, but I can see the need for booting up a ready Linux image
| being extremely situational so the vast majority of time
| you're just carrying dead weight.
| forgotpwd16 wrote:
| You can have a stick with one boot and one commonly
| formatted (FAT32/exFAT/ext) partition, Linux image being
| stored in later. Then it's like a normal stick that can
| also be used to boot Linux. Ventoy automates this process,
| allowing you to throw any ISO in a specific directory and
| boot it.
| 2OEH8eoCRo0 wrote:
| Wouldn't it be cool if these general purpose computers in
| our pockets were useful in novel ways?
|
| You're only allowed to use it in the prescribed fashion.
| Medox wrote:
| The USB stick will be forgotten or lost much quicker than the
| phone.
| diggan wrote:
| USB sticks attached to keychains are already widespread in
| some communities (DJs for example), I'm sure us software
| people could do it too if we wanted to :)
| Perz1val wrote:
| Also attach an USB killer for extra thrill
| felixg3 wrote:
| That makes sense. I once got falsely identified as a DJ,
| but it was just a YubiKey.
| zamalek wrote:
| I leave my keychain at the door when I get home. This is
| probably a common practice.
| lizknope wrote:
| I have a few Verbatim "Tuff and Tiny" USB drives. Like this
| but without the plastic clip part. I can fit them in my
| wallet because its about the thickness of 2 credit cards
| which are also in my wallet.
|
| https://www.amazon.com/Verbatim-8GB-Clip-Flash-
| Drive/dp/B00N...
| Medox wrote:
| Reminds me of the credit card sized (literally [1]) USB
| stick I still have somewhere but it was too annoying to
| carry around and hope that next time that cheap stick
| still works...
|
| Using the phone directly still seems the cleanest and
| most reliable way. Or maybe a combination of both, like
| those magnetic plugs [2] but with an integrated USB
| stick. Bonus points if you don't have to take it out at
| all (until needed) by either connecting the other
| magnetic part for data transfer and charging or data
| through USB OTG and wireless charging. One can dream...
| but the technology will shrink even further so who knows.
|
| 1. https://www.amazon.com/Enfain-Flash-Drives-Memory-
| Credit/dp/...
|
| 2. https://www.adafruit.com/product/5524
| akoboldfrying wrote:
| I glue phones to all my USB sticks for just this reason.
| sandreas wrote:
| Boot linux of a Smartphone would take drive emulation, which is
| possible, but not easily available.
|
| To rootless Boot a Linux ON (not from) your phone is possible
| via tmux APP.
|
| Search for "rootless kali nethunter" on YouTube. See here:
| https://m.youtube.com/watch?v=GmfM8VCAu-I
| ce4 wrote:
| That is not booting a linux-kernel at all. it is just using
| the existing kernel which Android is based on (also Linux).
| franga2000 wrote:
| This really is nice to have and a sibling comment has already
| linked to DriveDroid, the solution I'm using for this.
|
| Back in the CyanogenMod days, I had an even better setup: there
| was an app that also let you emulate a USB keyboard and mouse,
| so I could, with some command-line trickery, boot a computer
| from an ISO on my phone, then use that same phone as a keyboard
| and mouse/trackpad, including in the BIOS.
| adriancr wrote:
| You could set up a PXE boot server on the android phone, then
| set up computer to boot off it.
| ddalex wrote:
| Why just not use Samsung's DeX that gets you a linux desktop
| when you plug your phone in a usb-c monitor/console
| Crestwave wrote:
| Wasn't Linux on DeX discontinued?
| criddell wrote:
| Yes it was.
| byteknight wrote:
| Dex does not need an underlying OS. Your conflating
| features. Dex simply requires a monitor. No computer.
| criddell wrote:
| This is the feature I'm thinking of:
|
| https://www.slashgear.com/samsung-linux-on-dex-is-dead-
| here-...
| byteknight wrote:
| Dex does not need an underlying OS. Your conflating
| features. Dex simply requires a monitor. No computer.
| sambazi wrote:
| different use case and requirement for samsung device?
| stragies wrote:
| A magisk module to do just that:
|
| https://github.com/nitanmarcel/isodrive-magisk
|
| needs root, and your kernel needs USB Mass storage gadget
| support module enabled, which, sadly, LineageOS doesn't enable
| by default.
| Timber-6539 wrote:
| I have used this many times on my phone running LineageOS.
| Did not have to enable any kernel features.
| stragies wrote:
| On the phones, where the Vendor kernel has this option
| enabled, Lineage also enables it, e.g. most LGs.
|
| But Lineage does not enable it on all kernels, even if it
| could just be enabled. I observe this on all of my
| Samsungs, for example.
|
| You can use this app to see which USB gadget options are
| enabled on your kernel: https://github.com/tejado/android-
| usb-gadget
| Timber-6539 wrote:
| Makes sense. My phone model is a Xiaomi. Don't know why
| Samsung would ship their kernels without ConfigFS support
| but I have never had such issues.
| stragies wrote:
| It's not about `ConfigFS` as a whole, but specifically
| `CONFIG_USB_CONFIGFS_MASS_STORAGE`, that is left
| disabled, while lots of other `CONFIG_USB_CONFIGFS_BLA`
| are enabled.
|
| This and more can be seen in the `device info` screen of
| the App mentioned above
| Timber-6539 wrote:
| Should have said *proper ConfigFS support. Anyway, had no
| prior interest in this kernel feature until you mentioned
| the anomaly that is specific to certain vendors.
|
| You can also do `zcat /proc/config.gz | grep CONFIGFS_`
| in a root shell (su) inside termux to get what options
| are set by the default kernel.
| 0x1ceb00da wrote:
| Glue a bootable usb to your phone.
| akoboldfrying wrote:
| Yes, do this. Don't under any circumstances try to solve a
| cute technical challenge -- that would only lead to fun, or
| worse yet, satisfaction.
| gibspaulding wrote:
| It sounds to me like software enlightenment:
|
| https://xkcd.com/1988/
| sambazi wrote:
| i used drivedroid [0] on in the 2010's for this purpose. handy
| but never essential. requires root though.
|
| [0]
| https://play.google.com/store/apps/details?id=com.softwareba...
| toast0 wrote:
| Android stopped exposing USB Mass Storage, because it's
| problematic for the core use case of letting you grab pictures
| and what not from your phone, because it requires exclusive
| access to a filesystem; that wouldn't be a big deal for you, I
| don't think, you probably just want to create a large file and
| expose that as a device, but the implications of exposing the
| sd card (or the virtual sd card) as mass storage are why it
| went out of style.
|
| I did find this, but it's ancient and may not meet your needs
| anyway... https://xdaforums.com/t/app-root-usb-mass-storage-
| enabler-v1...
| Aardwolf wrote:
| What do you mean, usb mass storage was much better for the
| core use case of getting pictures of your phone than the
| flaky mtp now is
| toast0 wrote:
| I mean, yes, but ...
|
| If the sd card is mounted by your computer, you can't run
| any apps on the phone that need to use the sd card. That
| means, apps you moved to the SD card for space reasons, or
| apps that might save photos to the SD card (such as
| messengers).
|
| If your computer messes up the filesystem, then you're in a
| world of hurt.
| jvdvegt wrote:
| He casually mentions he boots of S3 as well. Changing S3 for
| Google Drive mostly adds latency, apparently.
|
| But still, nicely done!
| _flux wrote:
| Redundant S3 is easy-ish to selfhost, though, so that could
| actually be a decent way to setup reliable diskless
| workstations.
| yencabulator wrote:
| At that point you might as well run Ceph and give your
| diskless workstations a writable block device via RBD. The
| overhead of an S3 operation per file is quite high.
| _flux wrote:
| There are some easier solutions for just S3, like Minio,
| which I imagine is likely much easier to setup than Ceph
| (though ceph is not that hard with cephadm).
| yencabulator wrote:
| By the time you add the word "redundant" in the mix,
| nothing is really easy anymore.
| yencabulator wrote:
| His S3-compatible bucket was locally hosted, did not go over
| the internet.
| rwmj wrote:
| How about booting Linux off bittorrent?
| https://libguestfs.org/nbdkit-torrent-plugin.1.html#EXAMPLES
|
| The problem with booting Linux off very high latency devices is
| the kernel tends to time out I/O requests after too short a time
| (60 seconds I think) so you have to adjust those timeouts
| upwards.
| yencabulator wrote:
| If that's a huge problem, you can wedge FUSE in there somehow,
| as far as I know there's no automatic kernel-side timeout to
| requests sent to FUSE.
| amelius wrote:
| What people really want is sub-second booting, especially in
| embedded. It is a hard problem but somehow nobody seems
| interested in doing the hard CS research to solve it.
| rwmj wrote:
| There's tons of work on millisecond boot times going on, in
| kata-containers, confidential computing, and various
| "serverless" implementations. I wrote a paper about it nearly a
| decade ago too[1].
|
| [1] http://git.annexia.org/?p=libguestfs-
| talks.git;a=tree;f=2016...
| amelius wrote:
| And I still can't boot my Linux system in a reasonable time.
| Perhaps the true problem that needs to be solved is that
| everybody is somehow (forced at) reinventing the wheel every
| time.
| bluGill wrote:
| The real problem is linux is just a kernel - they cannot
| force you to have good hardware. If you want fast boot you
| need to start with the hardware: a lot of hardware has an
| long init sequence so there is no way the kernel can boot
| fast as it cannot boot until that hardware is initialized.
| Then you can look at the kernel, step one is strip out all
| the drivers for that slow to init hardware you don't have
| (since those drivers have to insert waits into the boot
| while they check for the hardware you don't have). If you
| do this you can save a lot of boot time.
|
| Of course in the real world the people who select your
| hardware don't talk to the people who care about software.
| So you are stuck with slow boots just because it is too
| late to go back and do a fill million dollars each board
| re-spins now that we know our boot times are too slow.
|
| It gets worse, even if you select fast init hardware that
| doesn't mean it really is fast. I've seen hardware that
| claims to not need long inits, but if you don't insert
| waits in the boot there are bugs.
| amelius wrote:
| Well, in many cases people __can__ get a kernel to have
| decent boot times if they pour sufficient time and energy
| into it.
| fwip wrote:
| I haven't kept up with modern linux - is there a tool
| that automates that? e.g, records what drivers have been
| used over some number of boots, and then offers to
| disable all the drivers that haven't been used.
| nick__m wrote:
| systemd-analyze record the boot time after the kernel is
| started but I don't know if there are equivalent for the
| kernel startup.
| zokier wrote:
| At least on my completely unoptimized desktop, majority of
| boot time is already spent in UEFI firmware, not in kernel
| or userspace startup. So realistically there is limited
| opportunity to optimize the boot times.
| dataflow wrote:
| > hard CS research
|
| I'm surprised to see this, in what way does it require hard CS
| research? Isn't it just debugging and implementation pain?
| amelius wrote:
| I can only guess here. But remember that software package
| management was a pain too and it took someone to do a Ph.D.
| on the topic to give us NiX (and it still isn't perfect).
| dataflow wrote:
| Ah I see where you're coming from. I don't see any reason
| to expect that's the case here though. Package management
| has some fairly obvious tough CS problems inherent in it --
| dependency resolution with version upgrades inherently
| feels NP-hard, for example. Whereas booting is about making
| hardware that initializes quickly and then making software
| that abstracts over a variety of hardware well... within
| the development budget you have. And then you're stuck with
| backward compatibility as everything changes. I could be
| wrong here but it feels like a costly engineering problem
| more than anything else.
|
| (Note I'm not saying you can't do a PhD in it and improve
| the situation -- you could probably do that for any
| problem, honestly. Just saying that I think you could get
| most of the way there by just paying the engineering cost.)
| amelius wrote:
| I'm just seeing that this is a forever lingering problem
| and I think if only engineering costs were involved the
| problem would have been solved by now.
| akoboldfrying wrote:
| Dependency resolution with versions is indeed NP-hard, if
| versions "conflict" (2 versions of the same package can't
| be installed at the same time). What if they don't
| conflict, and you just wanna install the fewest possible
| package versions to satisfy all dependencies? That's NP-
| hard too.
| amelius wrote:
| I suppose you could use a generic SAT solver for that.
|
| EDIT: https://hal.science/hal-00870846/file/W5_PX_Le_Berr
| e_On_SAT_...
| yencabulator wrote:
| Linux boots to your application in 125 ms. There's no hard
| problem there, just bloat, general-purpose systems, and
| hardware not designed to boot fast.
| amelius wrote:
| "Linux" is more than just the kernel.
|
| Pretending there is no problem is part of the problem.
| yencabulator wrote:
| That's not what I'm doing. I'm saying if _your distro_ ,
| _your hardware_ , or _your setup_ takes significantly more
| time, examine why. The hardware part is tough because we
| 're effectively locked into whatever is cheap on the
| market, everything else is 100% fixable. Fast booting is
| not really a hard problem, especially in embedded where you
| know & control the hardware.
| amelius wrote:
| Yet, just about any system I've used boots slowly. Your
| argument is like saying that software bugs are not a real
| problem because you can simply find and fix them if you
| look hard enough.
| yencabulator wrote:
| My Framework laptop took 2.423s after starting userspace
| to be "done", without me making any effort on that.
| (Measurements for the part before that aren't useful on
| this setup because my initrd waits for user input
| passphrase.)
|
| It's simply not rocket science.
| amelius wrote:
| 2.423 seconds is on the fast end of what I've seen,
| congratulations. For most systems I've seen it would be
| at least 5 seconds and when comparing that to loading a
| webpage, I would consider closing the tab.
| vlowther wrote:
| It is not hard research, it is "just" a lot of plain old boring
| engineering.
| dveeden2 wrote:
| Back in the the day it was possible to boot Sun Solaris over
| HTTP. This was called wanboot. This article reminded me of that.
|
| This was basically an option of the OpenBoot PROM firmware of the
| SPARC machines.
|
| It looked like this (ok is the forth prompt of the firmware):
| ok setenv network-boot-arguments
| dhcp,hostname=myclient,file=https://192.168.1.1/cgi-bin/wanboot-
| cgi ok boot net
|
| This doesn't only load the initramfs over the (inter)network but
| also the kernel.
|
| https://docs.oracle.com/cd/E26505_01/html/E28037/wanboottask...
|
| https://docs.oracle.com/cd/E19253-01/821-0439/wanboottasks2-...
| unixhero wrote:
| "The network is the computer." It was a shortlived thing.
| msh wrote:
| I guess Chromebook's is the resurrection of the idea
| Teckla wrote:
| Thanks to Crostini, Chromebooks are also excellent local
| computing devices.
| bluGill wrote:
| Not really. Chromebooks don't use the LAN. They can run
| code locally, or on the server in a different timezone.
| However with Sun if you needed more CPU you could log into
| all the machines on your local network - all machines
| shared the same filesystem(NFS) and passwd (I forget this
| was), so using all the CPUs in the building was easy. It
| was unencrypted, but generally good enough until the Morris
| worm.
|
| Of course moderns servers have far more CPU power than even
| the largest LANs back in 1986. Still those of use who
| remember when Sun was a big deal miss the power of the
| network.
| toast0 wrote:
| > all machines shared the same filesystem(NFS) and passwd
| (I forget this was), so using all the CPUs in the
| building was easy.
|
| Sun did this through NIS, originally Yellow Pages/YP, but
| name changed for trademarks.
|
| When I worked at Yahoo, corp machines typically
| participated in an automounter config so your home would
| follow you around, it was super convenient (well, except
| when the NFS server, which might be your personal corp
| dev machine under your desk, went away, and there was no
| timeout for NFS operations... retry until the server
| comes back or heat death of the universe). They used a
| sync script to push passwords out, rather than NIS though
| --- a properly driven sync script works _almost_ as fast,
| but has much better availability, as long as you don 't
| hit an edge case (I recall someone having difficulty
| because they left the company and came back, and were
| still listed as a former employee in some database, so
| production access would be removed automatically)
| anon35 wrote:
| "Short-lived" depends on your perspective. Cloudflare owns
| the rights to that trademark now; because they believe their
| mission furthers that vision:
| https://en.wikipedia.org/wiki/The_Network_is_the_Computer
| (and John Cage, the Sun employee who coined the phrase, said
| he was fine with Cloudflare picking it up:
| https://spectrum.ieee.org/does-repurposing-of-sun-
| microsyste...)
| MisterTea wrote:
| That's because Sun just bolted stuff on to Unix. Bell Labs
| actually achieved that goal in Plan 9 which is still very
| much alive.
| mrgaro wrote:
| I remember the glorious AIX machines we had which could book
| from tape backups made with a simple "mksysbk" command. :)
| bastawhiz wrote:
| How slow was that?
| dspillett wrote:
| If it is pulling a filesystem from tape into memory and
| booting from that, it could be pretty quick. Reading
| sequentially from tape, if you are already at the right
| location which is easy if that location is the start of the
| tape, isn't particularly slow at all - non-sequential
| access is where tape storage becomes very slow due to
| massive latency in the physical mechanisms.
| prmoustache wrote:
| Grub can boot a kernel from http too.
| Iwan-Zotow wrote:
| https://unix.stackexchange.com/questions/228452/can-grub-loa...
| jpalomaki wrote:
| Booting over HTTP would be interesting for device like
| Raspberry. Then you could run without memory card and have less
| things to break.
| lesuorac wrote:
| https://www.google.com/search?q=raspberry%20pi%20pxe%20booti.
| ..
|
| There was an article recent for somebody doing it on an
| Orange Pi [1]. IIUC, you can have one RasPi with an SD Card
| (I use USB drives but w/e) to be the PXE server and then the
| rest can all network boot.
|
| [1]: https://news.ycombinator.com/item?id=40811725
| AnimalMuppet wrote:
| Welcome back, diskless workstations! We've missed you... oh,
| wait, no, we really haven't.
|
| This is technically neat, but... How often does the memory
| card break on a Raspberry? How often does the _network_ break
| (either Raspberry hardware or upstream)? There are fewer
| things to break when you run from local hardware.
| Semaphor wrote:
| I'd say sd card failures are the most common rPI failures.
| ssl-3 wrote:
| Amusingly, most of the things I regularly use Raspberry Pi
| hardware for require a functional network as well as
| functional storage on that network.
|
| If I were to netboot these things, then I'd have fewer
| points of failure than I do now.
| eek2121 wrote:
| You are thinking about this wrong. Imagine having a single
| disk image for 100 Pis. Now imagine having to burn that
| image to a hundred MicroSD cards, now suddenly you want to
| update the disk image.
|
| As others have said, you can also use PXE, but http is a
| bit easier to deal with.
|
| There is a hosting company with something like 44k
| Raspberry Pis. Are you going to be the guy to update them?
| yjftsjthsd-h wrote:
| I would also prefer HTTP, but Pis can use PXE boot and mount
| their root filesystem over NFS already:) Official docs are ht
| tps://www.raspberrypi.com/documentation/computers/raspberr...
| and they have a tutorial at https://www.raspberrypi.com/docum
| entation/computers/remote-a...
| wang_li wrote:
| Once you have PXE you can do all the things -- NFS boot,
| HTTP boot, iSCSI boot, and so on. There are several open
| source projects that support this. I think the most recent
| iteration is iPXE.
| yjftsjthsd-h wrote:
| That's true, though I always have felt that if I needed
| PXE+TFTP to boot the bootloader I might as well just load
| a kernel+initrd from the same place and be done with it;
| I couldn't remove the TFTP requirement so anything else
| would just be extra things to configure. If UEFI can
| really do pure HTTP (as discussed upthread) then I may
| need to reevaluate. (Well, for Raspberry Pis I'll have to
| keep TFTP, but maybe in other contexts I can drop it)
| westurner wrote:
| iPXE: https://en.wikipedia.org/wiki/IPXE :
|
| > _While standard PXE clients use only TFTP to load
| parameters and programs from the server, iPXE client
| software can use additional protocols, including HTTP,
| iSCSI, ATA over Ethernet (AoE), and Fibre Channel over
| Ethernet (FCoE). Also, on certain hardware, iPXE client
| software can use a Wi-Fi link, as opposed to the wired
| connection required by the PXE standard._
|
| Does iPXE have a ca-certificates bundle built-in, is
| there PKI with which to validate kernels and initrds
| retrieved over the network at boot time, how does
| SecureBoot work with iPXE?
| vlowther wrote:
| > Does iPXE have a ca-certificates bundle built-in, is
| there PKI with which to validate kernels and initrds
| retrieved over the network at boot time
|
| For HTTPS booting, yes.
|
| > how does SecureBoot work with iPXE?
|
| It doesn't, unless you manage to get your iPXE (along
| with everything else in the chain of control) signed.
| 1vuio0pswjnm7 wrote:
| I always put the rootfs in the kernel. It mounts on mfs or
| tmpfs. SD card is read-only. After boot, I can pull out the
| card. No need to boot over HTTP.
| kotaKat wrote:
| Modern UEFI can do that too!
|
| https://ipxe.org/appnote/uefihttp
| Andrex wrote:
| First thing I disable on a new PC.
| mywittyname wrote:
| I was going to say, booting from a random website image
| sounds like a terrible idea.
| michaelmior wrote:
| It's possible to require that any images used be signed
| using a specific key that is configured in the hardware
| ahead of time. Even if you don't do that, the same setup
| can be helpful for provisioning a bunch of machines
| without accessing any external network. You can configure
| a small box to act just as a DHCP server and to serve a
| machine image for network boot. Then you can have all the
| machines on this subnet automatically load that image as
| it is updated without the need for any further
| configuration on each device.
|
| I've seen organizations do something similar to this for
| trade shows when they want a bunch of machines that
| visitors can interact with and don't want to have to keep
| them updated individually. Just update the image once and
| reboot each machine.
| xur17 wrote:
| Ideally it would be possible to just specify an image url
| and a hash.
|
| Or, even better, a magnet link.
| yjftsjthsd-h wrote:
| I dunno, I actually think a public key is better than a
| hash, because it lets you sign updated images without
| having to update things on the client. Obviously it
| should be user-controlled, but this feels like a
| legitimate use.
| xur17 wrote:
| It is more flexible than a hash, but it's also more
| complicated.
| thesuitonym wrote:
| Okay but why not just use PXE? Why does everything have
| to be HTTP?
| paulddraper wrote:
| You can do either
| throitallaway wrote:
| PXE is one layer higher than what you're thinking of. The
| old-school analog to HTTP in this case is TFTP, and it
| sucks.
| danudey wrote:
| Well, it kind of does. Normally, the PXE network booting
| will use DHCP (or bootp or whatever) to fetch the boot
| image location, then it will fetch that boot image.
| Historically, that has worked this way:
|
| 1. bootp says boot image is at <ip address>/path/to/img
| 2. PXE network stack fetches that image via TFTP (which
| is awful) 3. PXE network stack boots that image
|
| In most cases, the boot image would be a chainloader like
| pxelinux, and that would fetch a config file which told
| it the kernel path, the initrd path, and the commandline,
| and then the user could choose to boot that image, and
| then pxelinux would fetch the files via TFTP (which is
| still awful) and boot them.
|
| In this new, HTTP-based case, we replace each instance of
| "TFTP" with "HTTP", which we can authenticate (ish),
| which we can easily firewall, which doesn't have weird
| compatibility issues, and so on.
|
| Note that, before now, you could replace pxelinux with
| iPXE, and iPXE could fetch files via HTTP (which is
| awesome), but you still had to fetch iPXE and its config
| file via TFTP.
|
| Note that TFTP is an unauthenticated, UDP-based,
| extremely limited protocol which has almost no support
| for anything but the most basic "get this file" or "take
| this file" functionality. Being able to replace it is a
| joy and a wonder.
| giancarlostoro wrote:
| I'm wondering if this is how we did a net install of a custom
| Distro back in a former job, but I don't recall. I just
| remember it being insanely easy to install the distro over
| the network, even on a VM.
| eichin wrote:
| if it was a decade ago, PXE/tftp booting was pretty common
| (at MetaCarta we shipped dell 2650/6650 servers around
| then, and while field upgrades were from DVD, the QA lab
| had some "synthesize keystrokes through a KVM to select
| netbooting" and then a tftpserver that had the image you
| wanted to install in a MAC address specific filename, so
| the machine picked up the intended image. We got the idea
| from another boston-area startup (Vanu Inc) that put
| similar Dell servers in software-configurable cellphone
| towers, iirc)
| bogota wrote:
| As far as i know most places are still using iPXE and
| Tftp to load an image with some custom provisioning
| framework.
|
| It worked really well but I haven't worked on large scale
| DCs for a few years now so maybe some new stuff happened
| bayindirh wrote:
| PXE is still the king in large DCs. I can install ~250
| servers in 15 minutes with a single xCAT node over
| traditional gigabit Ethernet. Give another 5 minutes for
| post-install provisioning and presto!
|
| Your fleet is ready.
| ktm5j wrote:
| I remember doing this to install Solaris while resurrecting an
| old sparcstation. Fun times!
| lanstin wrote:
| I didn't realize that. I booted over BootP many times but this
| is even cooler.
| eisbaw wrote:
| I wouldn't technically call this "boot" since the kernel has
| already booted... If get google-drive "mounting" support into
| grub, then I'll concede. This just places the rootfs on some
| strange place.
|
| btw, I have a project in my drawer, to place rootfs of my NixOS
| on IPFS.
| throwaway984393 wrote:
| Considering how slow and buggy it is to use as a rootfs, you can
| instead put an initrd on Google Drive and just boot that. You'll
| need to make it by hand to get it to a reasonably small size, so
| picking up a copy of Linux From Scratch, and using libmusl or
| libuclibc along with BusyBox, will go a long way towards a
| functional system in a small size.
|
| If you want a fuller system you could try 1) convert the
| filesystem to tmpfs after boot and install packages to RAM, or 2)
| mount a remote disk image as your roofs rather than keeping
| individual files remote. The former will be blazing fast but
| you're limited by your RAM. The latter will be faster than fuse,
| benefit from io caching, and not have the bugs mentioned.
| remram wrote:
| How do you load the initrd?
| yjftsjthsd-h wrote:
| UEFI provides a pretty complete environment; it would
| probably not be too hard to write a .efi program that
| connected to network and downloads whatever you want from
| Google Drive (or anywhere else) into RAM and runs it. For
| that matter, IIRC Linux can already build a combined
| kernel+initrd into a .efi, so you could make this semi-
| generic by writing a gdrive.efi that downloaded an
| _arbitrary_ .efi from gdrive and booted it.
| sharpshadow wrote:
| "...booting Linux off of a Git repository and tracking every
| change in Git using gitfs."
|
| That sounds cool!
| Vogtinator wrote:
| I did something similar some time ago: Booting from an RPM
| repository on a Tumbleweed installation DVD.
|
| My initial goal was to write a fuse filesystem for mounting RPM
| packages, but I wanted to see how far it goes. Turns out, pretty
| far indeed:
| https://github.com/Vogtinator/repomount/commit/c751c5aa56897...
|
| The system boots to a working desktop and it appears like all
| packages available on the DVD are installed.
| sirjaz wrote:
| We do this all the time in Windows with Citrix. It is called pvs.
| It does a small pxe boot and then it streams down the windows
| server image
| iamleppert wrote:
| Can you boot Google off a Linux drive?
| coisasdavida wrote:
| A few days ago I was able to boot armbian on a tvbox I got from
| the trash, felt so great, now feels so pedestrian...
| mason_mpls wrote:
| > On the brink of insanity, my tattered mind unable to comprehend
| the twisted interplay of millennia of arcane programmer-time and
| the ragged screech of madness, I reached into the Mass and
| steeled myself to the ground lest I be pulled in, and found my
| magnum opus.
|
| pulitzer prize nomination material
| whartung wrote:
| I remember first getting my cable modem at the house, and I was
| able to install BSD over the network using a boot floppy.
|
| That was an "amazing" thing to me back in the day. I had the
| bandwidth to do it, a simple floppy to start the whole process
| and...there it was! BSD on my machine.
|
| I'm not sure if you can still do that today. Pretty sure the
| files were FTP hosted somewhere (or even TFTP). I think today
| it's all ISOs.
___________________________________________________________________
(page generated 2024-07-02 23:00 UTC)