vendredi 30 janvier 2015

Initialise USB devices before hard disks during grub2 boot


I have a CentOS installation on a portable USB stick, with a grub2 installation on it's first partition. The system can boot when there are no internal hard drives plugged into a machine, but fails if any hard drive is plugged in.


I want my OS, running off the USB stick, to be mounted as /dev/sda, and any other internal hard drives to be labelled from /dev/sdb. I am using partition labels to map to my /boot, /root, /home and /swap. It seems the internal drive appears as sda, so I run into a kernel panic on boot.



lsblk -f
NAME FSTYPE LABEL
sda
|___sda1
sdb
|___sdb1 hfsplus DISK_1
|___sdb2 ext4 USB_root
|___sdb3 ext4 USB_home
|___sdb4 swap USB_swap


I have udev rules for internal drives to be numbered from /sdb onwards, but it appears that these rules are applied later in the boot sequence, so the internal disk which should be sda is initialised as sdb.



  • Is it possible to have an external USB drive boot initialise as sda before any internal drives?

  • Should I just map my USB device and grub config to something like /sdu so it does not conflict with internal drive naming?



Aucun commentaire:

Enregistrer un commentaire