Booting Linux Off of Google Drive
The author successfully booted Linux from a Google Drive root independently, using FUSE programs and custom initramfs on Arch Linux. Challenges with networking, permissions, and dependencies were addressed through manual solutions.
Read original articleThe author embarked on a project to boot Linux off a Google Drive root, aiming for a self-contained setup without a second machine's assistance. They utilized FUSE programs in the Linux kernel initramfs to achieve this, along with configuring networking. The process involved building a custom initramfs using Dracut on Arch Linux, installing necessary packages, and writing a module script. Despite encountering challenges like DNS issues and slow performance, they managed to mount Google Drive using google-drive-ocamlfuse. However, they faced various problems with symlinks, hardlinks, and permissions, leading to manual workarounds. The author detailed their troubleshooting steps, including adding token files and SSL certificates to the initramfs. Ultimately, they encountered a "File not found" error due to missing library dependencies when attempting to boot, highlighting the complexities of the Linux system.
Related
Upgrading my Chumby 8 kernel part 11: SD/CF card reader
Doug Brown discusses upgrading the Chumby 8 kernel, addressing an SD/CF card reader issue by modifying the USB storage driver and implementing a userspace daemon to manage the device effectively.
Netboot (PXE) Armbian on an Orange Pi Zero 3 from SPI with NFS Root Filesystem
Guide on netbooting Orange Pi Zero 3 with Armbian for Kubernetes experimentation on SBC cluster. Setup involves SPI, u-boot, TFTP, NFS servers, static IP, PoE switch, u-boot updates, TFTP config, and console access.
CVE-2021-4440: A Linux CNA Case Study
The Linux CNA mishandled CVE-2021-4440 in the 5.10 LTS kernel, causing information leakage and KASLR defeats. The issue affected Debian Bullseye and SUSE's 5.3.18 kernel, resolved in version 5.10.218.
ChromeOS to Linux migration: requirements and setup
Paolo Amoroso switched from ChromeOS to Linux after nine years due to Linux's advancements. He chose a System76 Merkaat mini PC with Linux Mint for its ease of use and compatibility.
Userland Rootkits Are Lame
Userland rootkits like Symbiote pose a threat on Linux systems by injecting libraries to hide information. Countermeasures include using statically linked binaries for immunity, examining memory layouts, and comparing file lists.
btw, I have a project in my drawer, to place rootfs of my NixOS on IPFS.
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.
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-...
But still, nicely done!
I read the “How to shrink a file system without a live cd. So here’s my one. How to shrink a file system without a live CD as part of a single command install script of a program.
My sbts-aru sound localizing recorder program does that on the pi.
I’m willing to bet that no other project on the Internet does this, but I’d love to be surprised. Let me know.
It installs the majority of the code, then reboots, shrinks the file system. Creates additional partitions and labels them installing file systems. Then finishes the install and comes up running.
So the procedure goes as follows.
sudo apt install -y git
git clone https://github.com/hcfman/sbts- aru.git
cd sbts-aru
sudo -H ./sbts_install_aru.sh
That’s it. It comes up running a recorder on a system with multiple partitions running an overlayFS on memory on the first one.It will even work on a Raspberry Pi zero (Works on all Pi versions) and it doesn't matter if it's Raspbian or Bookworm.
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.
Old time OS programmers typically didn't need to think about these things...
Current and future OS designers might wish to consider these things in their designs, if they desire maximum flexibility in their current or future OS...
Anyway, an excellent article!
Related:
https://en.wikipedia.org/wiki/Coupling_(computer_programming...
https://thenewstack.io/how-decoupling-can-help-you-write-bet...
https://softwareengineering.stackexchange.com/questions/2444...
sudo mount /dev/sdb2 /mnt
sudo xhost +local:
sudo mount --bind /tmp/.X11-unix /mnt/tmp/.X11-unix
sudo cp ~/.Xauthority /mnt/root/.Xauthority
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /dev/pts /mnt/dev/pts
sudo unshare --uts chroot /mnt su -l timonoko
sudo umount /mnt/proc
sudo umount /mnt/sys
sudo umount /mnt/dev/pts
sudo umount -l /mnt/dev
sudo umount -l /mnt/tmp/.X11-unix
sudo umount -l /mnt
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.
pulitzer prize nomination material
That sounds cool!
oh.
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.
Related
Upgrading my Chumby 8 kernel part 11: SD/CF card reader
Doug Brown discusses upgrading the Chumby 8 kernel, addressing an SD/CF card reader issue by modifying the USB storage driver and implementing a userspace daemon to manage the device effectively.
Netboot (PXE) Armbian on an Orange Pi Zero 3 from SPI with NFS Root Filesystem
Guide on netbooting Orange Pi Zero 3 with Armbian for Kubernetes experimentation on SBC cluster. Setup involves SPI, u-boot, TFTP, NFS servers, static IP, PoE switch, u-boot updates, TFTP config, and console access.
CVE-2021-4440: A Linux CNA Case Study
The Linux CNA mishandled CVE-2021-4440 in the 5.10 LTS kernel, causing information leakage and KASLR defeats. The issue affected Debian Bullseye and SUSE's 5.3.18 kernel, resolved in version 5.10.218.
ChromeOS to Linux migration: requirements and setup
Paolo Amoroso switched from ChromeOS to Linux after nine years due to Linux's advancements. He chose a System76 Merkaat mini PC with Linux Mint for its ease of use and compatibility.
Userland Rootkits Are Lame
Userland rootkits like Symbiote pose a threat on Linux systems by injecting libraries to hide information. Countermeasures include using statically linked binaries for immunity, examining memory layouts, and comparing file lists.