[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#568750: live-initramfs: live-media=removable does not work as advertised



intrigeri@boum.org wrote:
 booting another
Live system than the one you think, without being told, can lead to
severe problems...
I am interested in this issue, although it was not for the same reason, but for speeding up boot-time.

The solution I'm working on may have some interest for intrigeri goal:

When copying my LiveSystem to a new USB key, I make a /etc/udev/rules.d/70-persistent-usb.rules file in initramfs with one or two lines like that:

DRIVERS=="usb", ATTRS{manufacturer}=="OCZ Technology", ATTRS{product}=="RALLY2", ATTRS{serial}=="AA04012700341377", NAME="-USB/$attr{manufacturer}-$attr{product}-%n"

and have a very very simple and fast find_livefs() starting with

mkdir -p /dev/-USB && notifywait /dev/-USB && mount ....

with would fail should the right USB key not be found.

This solve the general issue that any live-media= cheatcode is ineffective for USB because find_livefs() starts before USB is ready ( BTW, I happily use usb-storage.delay_use=1 kernel parameter which gains 4s over the standard delay).

Maybe I'll change /dev/-USB for a directory reserved only for the device node holding the partition where /live/filesystem.squashfs lies.

For me, a liveUSB project has three main phases:

-1- Build: covered by live-helper
-2- Install: for me covered by my own scripts
-3- Boot: covered by live-initramfs

I'm also moving up most of the job done by /scripts/live-bottom to build or install phase, because they are time consuming and most don't need any information available only at boot time.

Ph.L.


Reply to: