> mount | grep /dev/sd
/dev/sda1 on / type ext4 (rw,relatime)
/dev/sdb1 on /disk1 type ext4 (rw,relatime)
- run "sudo apt install overlayroot -y"
[1] - reboot and keep Shift pressed to stop at grub menu
[2] - in grub, press "e" to edit the boot entry
[3] - in the "linux ..." line append "overlayroot=tmpfs"
[4] - press Ctrl+X to boot
- checkpoint:
> mount | grep overlay
overlayroot on / type overlay ..
/media/root-ro/disk1 on /disk1 type overlay ..
- shutdown the machine
- detach the second disk
- repeat [1]..[4]
- notice there is a 10s countdown waiting for the second disk
- checkpoint:
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs,
"systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode.
Press Enter for maintenance
(or press Control-D to ocntinue):
- press Enter
- run "journalctl -b -o cat | grep local-fs"
- checkpoint:
local-fs.target: Job local-fs.target/start failed with result 'dependency'.
local-fs.target: Triggering OnFailure= dependencies.
Full output of "journalctl -xb" from a failed boot attempt attached
Here I tried to completely cover it:
- create two virtual disks
- on each disk
- create a single MBR partition over the whole disk
- format the partition as ext4
- create a virtual machine with the disks attached
- install jammy server minimal onto sda1
- boot the vm
- just in case, disable swap
- run "sudo swapoff -a"
- drop the swap line in /etc/fstab
- delete /swapfile
- run "sudo mkdir /disk1"
- in /etc/fstab mount sdb1 as /disk1 with such options:
/dev/sdb1 /disk1 ext4 nofail, x-systemd. device- timeout= 10 0 2
- run "sudo mount -a"
- checkpoint:
> mount | grep /dev/sd
/dev/sda1 on / type ext4 (rw,relatime)
/dev/sdb1 on /disk1 type ext4 (rw,relatime)
- run "sudo apt install overlayroot -y"
[1] - reboot and keep Shift pressed to stop at grub menu
[2] - in grub, press "e" to edit the boot entry
[3] - in the "linux ..." line append "overlayroot=tmpfs"
[4] - press Ctrl+X to boot
- checkpoint:
> mount | grep overlay root-ro/ disk1 on /disk1 type overlay ..
overlayroot on / type overlay ..
/media/
- shutdown the machine
- detach the second disk
- repeat [1]..[4]
- notice there is a 10s countdown waiting for the second disk
- checkpoint:
You are in emergency mode. After logging in, type "journalctl -xb" to view system logs,
"systemctl reboot" to reboot, "systemctl default" or "exit" to boot into default mode.
Press Enter for maintenance
(or press Control-D to ocntinue):
- press Enter
- run "journalctl -b -o cat | grep local-fs"
- checkpoint:
local- fs.target: Job local-fs. target/ start failed with result 'dependency'. fs.target: Triggering OnFailure= dependencies.
local-
Full output of "journalctl -xb" from a failed boot attempt attached