Monday, December 23, 2024

You can apparently run an entire OS in Google Drive, but you definitely shouldn’t

Must read

Key Takeaways

  • Developer Ersei boots Arch Linux from Google Drive on an old laptop without storage.
  • Uses FUSE filesystem to bypass storage requirements, overcoming challenges like broken symlinks and performance issues.
  • Potential uses include portable Linux versions, simplified cloud booting, and education.



We’ve all heard of the weird and wacky ways that people get software to run in places that it absolutely shouldn’t. Projects that developers undertake like running DOOM on a Tesla, the ones that are fun but are mostly impractical in the real world. One developer has taken things a step further, managing to boot Arch Linux directly from Google Drive on an old laptop with no storage, in what can be seen as either a groundbreaking achievement or a bizarre experiment.

Firstly, to understand the complexity of this task, undertaken by a developer called Ersei, it’s important to grasp the Linux boot process:

1. The firmware (BIOS/UEFI) initiates and loads the bootloader.


2. The bootloader loads the kernel.

3. The kernel unpacks a temporary filesystem into RAM, containing the tools to mount the real filesystem.

4. The kernel mounts the real filesystem and switches the process to the init system on the new filesystem.

By leveraging the third step, Ersei planned to mount a FUSE filesystem, allowing Linux to boot normally. “The Linux boot process is, technically speaking, very funny. Allow me to pretend I understand for a moment,” Ersei said. Ersei planned to mount a FUSE filesystem, allowing Linux to boot normally. FUSE is a filesystem in userspace, allowing users to create file systems without the need for privileged permissions. Ersei managed to get it booting from an Amazon S3 bucket first before attempting Google Drive.



Booting Arch Linux on a laptop directly from Google Drive

An absolutely bonkers achievement

Source: Ersei

Mounting Google Drive over FUSE using google-drive-ocamlfuse brought a ton of issues:

  • Broken Symlinks: “Symlinks to symlinks don’t work (very important for stuff in /usr/lib),” noted Ersei
  • Non-functional Hardlinks: Essential for many Unix-based systems, hardlinks not working posed a significant obstacle.
  • Performance Issues: “It’s so slowwwww,” Ersei emphasizes on this point.
  • Permissions and Attributes: These didn’t work as expected, complicating the setup further.


Despite these hurdles, Ersei persisted, manually tweaking settings and configurations to make it work. Eventually, it did work, and they were able to boot their old laptop directly from the cloud, building a unified EFI file with instructions to boot directly from Google Drive. It worked, and even if it may seem like a silly project, there are genuine uses for something like this.

For example, one could have a truly portable version of Linux stored in the cloud, even if it’s slow to access and use. It can also allow for a simplified cloud booting system, and can even be used for educational purposes, too. Most people don’t need this and shouldn’t even try to build a project like this, but for fun and for learning, there’s absolutely nothing wrong with it. It’s a cool project that’s a very interesting read, and I highly recommend checking out Ersei’s post about it to learn more.


Latest article