porteux wrote: ↑24 May 2024, 22:33
During initrd time there's no way to know which unit it was loaded from
Anyway, it is the
linuxrc that finds the
/porteus folder (aka the location of the porteus-...cfg file and the location of the
/porteus/changes) even without any "from" cheatcode. The question is how it chooses the right /porteus folder when there are more than one of those!?
Could you help me with my experiment below? My porteus USB is always recognized as
/dev/sdb, but I now have an identical grub loader on my
/dev/sda drive which happens to be the system static SSD disk. At boot, in the UEFI menu I choose to boot the grub from
/mnt/sda1/EFI. It "successfully" finds the porteus folder on
/mnt/sdb2! Actually, it's hard to make it forget that location!
I don't want to unplug the USB yet. Instead I want the initrd to start finding a new, fresh porteus on
/mnt/sda2. A simple
/mnt2/sda2/porteus folder with the porteus-...cfg file, with properly populated
/mnt/sda2/porteus/base, and an empty
/mnt/sda2/porteus/changes still aren't enough: initrd even though loaded off
/mnt/sda1 is still finding and using the
/mnt/sdb2/porteus! Why?! What's so special about that copy of /porteus

Maybe initrd favours USB drives over static disks? Or does it favor "
b" over "
a"?