On Fri, Jul 20, 2012 at 09:16:13PM +0100, Jeremy Henty wrote:
> 
> Can I be sure that GRUB2's hd0, hd1 etc. will always correspond to the
> same  physical SATA  connectors  on the  motherboard,  no matter  what
> hardware I  plug in?  (I know  from experience that /dev/sda  does not
> always map  to the same  connector.)  If not, how  can I find  out the
> mapping after booting from a live CD?  Or can I drop into the BIOS and
> asssume that it lists the drives in hd0, hd1 ... order?
> 
 I was going to reply to Bruce's reply, noting that over the years
I've seen drives move around across kernel versions.  Then I
realised that you were really talking about grub (so, whichever
drive is /dev/sda as far as the kernel is concerned has little or no
correspondence with what grub thinks).

 If you have to boot to a live CD to fix things up, I would run
grub-mkdevicemap to see what it reports.  Of course, if you have to
reinstall grub, you install it to /dev/sda or wherever, using what
the current kernel thinks the drives are called [ see dmesg ].

 Personally, I would never trust a BIOS writer to do things
correctly, nor a manufacturer of affordable motherboards to do
things straightforwardly - on one of my current boxes, the connector
where I happened to connect the DVD drive uses a different SATA
driver from the other connectors  ;)

 For the non-root filesystems, in /etc/fstab I use LABEL= [ man
e2label - not sure if that would work with btrfs or xfs ].

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to