An engineer has created a system to run Linux from Google Drive



Ersei, a computer science student at Purdue University, a prestigious school in the United States, posted on his blog that he had successfully booted Linux from Google Drive.

Booting Linux off of Google Drive | Ersei 'n Stuff

https://ersei.net/en/blog/fuse-root



Ersei is competitive, and when he heard that his friend had succeeded in booting Linux from a Network File System (NFS), he thought, 'I have to prove that I can make something harder, better, faster, and stronger.' After considering various ideas, he decided to challenge the project 'Boot Linux from Google Drive'.

When Linux boots, the following happens:

1: UEFI or BIOS starts and loads the boot loader
2: The boot loader loads the kernel
3: The kernel expands the temporary file system into memory.
4: The kernel mounts the actual filesystem using the in-memory system and switches

Ersei's idea is to mount the actual file system over the network using Filesystem in Userspace (FUSE), which allows users to create their own file systems in steps 3 and 4 above. Since the temporary file system in step 3 above uses the kernel's initramfs , Ersei thought that all he had to do was install FUSE in the initramfs and configure the file system over the network.

As a proof of concept, Ersei started by customizing an initramfs using dracut , configuring it to connect to a local S3 bucket where he keeps his Arch Linux root, and booting Linux.



When I check the system information, I can see that the S3 bucket is successfully mounted as a file system.



With the proof of concept in place, Ersei was ready to get started on running it on Google Drive.

Tools already existed for using Google Drive with FUSE , so Ersei decided to use them. He prepared an Arch Linux machine, patched it, uploaded it to Google Drive, and was ready to go.



When I tried to start it, I ran into issues with symlinks to symlinks, hard links, relative symlinks not working, no permissions, and it was incredibly slow.

Ersei solved the problem by replacing the symbolic links with the paths they linked to and lengthening the timeout period. Although it took a long time, the system was able to start up.



When I looked at system information, I saw that Google Drive was mounted, and I'd successfully completed the challenge of booting Linux from Google Drive.

in Software,   , Posted by log1d_ts