Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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........
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.
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?
Originally Posted by http://wiki.centos.org/HowTos/GrubInstallation
root=/dev/sda6
Location of root partition, using conventional naming system. The root partition can also be identified using the file system's UUID (universally unique identifier) as follows: root=UUID=134d2a24-2699-4b0c-823b-1e13633f3b07. CentOS now uses UUIDs by default. You can find a file system's UUID with the following command: tune2fs -l /dev/sda6.
claims it uses UUID by default, you could try upgrading grub packages or maybe un-install ( including configuration) and reinstalling
In your grub you should end up with something like
Code:
..blahblah..
set root='hd3,gpt2'
..blah..
linux /boot/vmlinuz-3.9-1-amd64 root=UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
..blah..
Root device is still 'hard coded', but is later overruled by UUID.
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?
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?
Code:
sudo -i
for i in {a..f};do hdparm -i /dev/sd$i;done
exit
Ugh, this is tricky!
You need to know what kind of disks you have and compare to BIOS list.
Some commands that might help you correlate everything:
Code:
fdisk -l
cat /proc/partitions
lsblk
smartctl -i /dev/xxx (where xxx is the device name, like sda)
hdparm -I /dev/xxx
blkid
The fdisk command will list device total size, partition name (device name, like /dev/sdX), and partition size. blkid lists the device name and UUID. smartctl and hdparm lists the disk size, and the model name and serial. The bios will often list the either model name or serial too. blkid lists the UUIDs. lsblk shows partition names, sizes, type, and mount points.
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.
$ lsscsi
[0:0:0:0] disk ATA Maxtor 6Y250P0 YAR4 /dev/sda
[0:0:1:0] disk ATA ST340016A 3.19 /dev/sdb
[2:0:0:0] disk ATA ST31000524AS JC45 /dev/sdc
[3:0:0:0] cd/dvd ASUS DRW-2014L1T 1.00 /dev/sr0
[4:0:0:0] disk Sony Storage Media 0100 /dev/sdd
In CentOS its not installed by default. you can install it by 'yum install lsscsi' or from CentOS DVD 'rpm -Uvh lsscsi-0.23-2.el6.x86_64.rpm'
Last edited by Madhu Desai; 06-29-2013 at 12:44 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.