Grub doesn't recognize the root partition device
by slac from LinuxQuestions.org on (#52HWC)
I am having some problems setting the root device in grub configuration.
I have the following grub configuration:
Code:menuentry 'Slack' {
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
echo 'Loading Linux...'
search --no-floppy --fs-uuid --set=root 882E-D6AC
linux /boot/vmlinuz root=/dev/sda2
echo 'Loading initramfs...'
initrd /boot/initramfs
}
menuentry 'Arch' {
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt3'
echo 'Loading Linux...'
linux /boot/vmlinuz root=/dev/sda3
echo 'Loading initramfs...'
initrd /boot/initramfs
}The first entry: Slack, works correctly but the Arch does not. I think it is because I am using the search command in the Slack entry, on the other hand I am not using it in the Arch entry. The thing is, I do not know the UUID for the Arch partition (/dev/sda3) that is why I cannot set up the root variable using --fs-uuid and did not assign it a label either.
So, my question is: In such case, where I do not know the uuid of the root partition, what can I do?
I think I can boot up in the Slack partition and use the command: blkid (so I can get the Arch's UUID partition), but then I need to make another question and it is: In case that I only have access to the grub command line, would I need to boot up a live system, in order to get the UUID with the command blkid? Or is there another option just using the grub command line to set the root partition(not knowing the UUID)?


I have the following grub configuration:
Code:menuentry 'Slack' {
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt2'
echo 'Loading Linux...'
search --no-floppy --fs-uuid --set=root 882E-D6AC
linux /boot/vmlinuz root=/dev/sda2
echo 'Loading initramfs...'
initrd /boot/initramfs
}
menuentry 'Arch' {
insmod gzio
insmod part_gpt
insmod ext2
set root='hd0,gpt3'
echo 'Loading Linux...'
linux /boot/vmlinuz root=/dev/sda3
echo 'Loading initramfs...'
initrd /boot/initramfs
}The first entry: Slack, works correctly but the Arch does not. I think it is because I am using the search command in the Slack entry, on the other hand I am not using it in the Arch entry. The thing is, I do not know the UUID for the Arch partition (/dev/sda3) that is why I cannot set up the root variable using --fs-uuid and did not assign it a label either.
So, my question is: In such case, where I do not know the uuid of the root partition, what can I do?
I think I can boot up in the Slack partition and use the command: blkid (so I can get the Arch's UUID partition), but then I need to make another question and it is: In case that I only have access to the grub command line, would I need to boot up a live system, in order to get the UUID with the command blkid? Or is there another option just using the grub command line to set the root partition(not knowing the UUID)?