For my purposes, I needed to be able to create a usb stick that could do automated install without user intervention. I needed the same installer to work on dell appliances that named the usb drive /dev/sda and /dev/sdb. The solution I found to this was opening the initrd.gz and adding some rules to /etc/udev/rules.d.
When I build the usbdrive, I apply a label to it, either using dos's "label", or linux "mlabel" or "makedosfs". The rules I embedded into the initrd check for this label being recognized as /dev/sda, and if so, switch it with /dev/sdb.
This happens in time for the installer to proceed normally as though the usb drive was discovered as sdb to begin with.
The rules file is named 99-install.rules and the contents look like this:
Code:
KERNEL=="sda*",ENV{ID_FS_LABEL}=="INSTALL",NAME="sdb%n"
KERNEL=="sdb*",ENV{ID_FS_LABEL}!="INSTALL",NAME="sda%n"
Bookmarks