Boot Menu: Which Hard Drive is What ID?
I have a PC with several hard drives running CentoS 6.4. I ran into problems with the Boot Record, I think. When I reboot and then escape-into the BIOS to select the hard drive from which to boot, it lists the hard drives, but only by long cryptic IDs like: PM-ST36fe5348a53........
How can I figure out which hard drive is each ID? Thanks |
Ugh, this is tricky!
You need to know what kind of disks you have and compare to BIOS list. For example, I'd guess that the disk "PM-ST36fe5348a53" is a Seagate ("ST"), if it's labeled "WD" it's a WesternDigital etc. If you have several disks of same brand you'll have to know the id (there should be a label on the disks). Sometimes, you can get hardware informatin in BIOS which could output things like the size of the disks making it a lot easier. |
Usually bios would report a port number and the OEM disk number that is burned on the disks chip memory.
See this for ideas. http://www.sevenforums.com/installat...k-numbers.html Modern bios's don't really care too much anymore. You set the boot order in the hard drive order and that affects how loaders view them if you use the convention like sda or sdb. In some cases you may wish to use by device id or uuid. If you happened to know what disk data is on what port that may help, some distro's are moving to more Freebsd style information to help decide what is what. |
My problems arised because I purchased an SSD drive, and when I connected that to another SATA port and tried to boot, the hard drives now were re-ordered, or received new numbers. My grub.conf no longer worked. I had to boot from a rescue disk, edit grub.conf, and change the hd numbers. Why does that happen? Can I prevent this?
|
You can prevent it by using UUID in grub.cfg
it only gets a breif mention here Quote:
In your grub you should end up with something like Code:
..blahblah.. at least that is what Debian's /etc/grub.d scripts seem to do. As for the why.. my best guess is that your New drive got plugged into a SATA port with a lower number than the rest. Easily done, the layout of some boards SATA ports just don't seem to match with what you'd expect. |
I don't think the UUIDs in grub.conf forked for me. My machine is already CentOS and already uses UUIDs in grub.conf. But, it seems like they are not overridden. After I installed the SSD I still had to edit the grub.conf file and change entries like root (hd1,0) to root (hd0,0).
However, the 'tune2fs -l /dev/sda6' command is nice. It tells me what the UUID is for each partition. |
Also, the UUID numbers aren't what the BIOS uses to describe the hard drive. In the BIOS, it's something like PM-ST36fe5348a53 or whatever (I don't have the exact identifier handy). How can I determine that identifier?
|
actually,. yes
Now I think about it .. it won't work, it is not an override the first is where the kernel is ( /boot ), and then the kernel is passed the rootfs's UUID I'd have to test to see if UUID can be used for the initial set root and tweak the grub.d scripts |
Quote:
Code:
sudo -i http://knowledge.seagate.com/article...S/FAQ/204763en I'm guessing the PM is added by the Bios, Primary Master? , but just a guess if another is PS-, that would be Primary Slave. Your bios might be set for PATA mode instead of ACHI https://en.wikipedia.org/wiki/Advanc...ller_Interface |
It's like pingu said:
Quote:
Code:
fdisk -l Generally by cross-referencing the output of all these commands, you can figure out which disk is which. |
Actually, it's 'hdparm -I /dev/sdXX | grep -i 'model number' which will list the same ID that the BIOS uses (at least on my PC) when selecting drives for the boot order. But thanks very much the help.
|
Use lsscsi
Code:
$ lsscsi |
All times are GMT -5. The time now is 02:50 AM. |