[opensuse] grub2 booting partition discrepancy
I am preparing to shift around the partitions on one of my drives, so I am shifting the bootable systems to another drive. I have Leap 42.1 installed on one raid drive, and I created a new raid drive, bigger, copied everything from my old 42.1 to my new 42.1, went through the whole procedure to reinstall grub, ran it and it works great. The 2nd part of this project is I have an older 13.2 installation on an older raid partition. I tried to do the same thing with this one. I created a new raid, and then copied the files over from 13.2. Since this one is not the default boot, I then went back into 42.1, and re-ran mkinitrd, grub2mkconfig, and grub2-install. It looked like it picked up the new 13.2 just fine, but there is a little problem. My old 13.2 installation was on raid drive member /dev/md2. My new 13.2 installation (the copy), is on raid drive member /dev/md7. When I run grub2-mkconfig, this is the portion that comes out from the os-prober for the new 13.2 installation on /dev/md7: Found openSUSE 13.2 (x86_64) on /dev/md7 menuentry 'openSUSE 13.2 (x86_64) (on /dev/md7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ef4069f8-f912-40b9-b3ca-c5aec35e310f' { insmod part_gpt gpt insmod diskfilter mdraid1x insmod ext2 set root='mduuid/c8ce1dcb76fc24b52d4f7bc1094b46a1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/c8ce1dcb76fc24b52d4f7bc1094b46a1' ef4069f8-f912-40b9-b3ca-c5aec35e310f else search --no-floppy --fs-uuid --set=root ef4069f8-f912-40b9-b3ca-c5aec35e310f fi linuxefi /boot/vmlinuz-3.16.7-29-desktop root=UUID=c200ac13-438e-47bc-9715-b012893e0270 resume=/dev/disk/by-uuid/6e662ec0-e324-4b6b-81f2-5ecfcdc56d14 splash=silent quiet showopts initrdefi /boot/initrd-3.16.7-29-desktop } I don't fully get the assignment of roots here - in 2 places it has--set=root: --set=root --hint='mduuid/c8ce1dcb76fc24b52d4f7bc1094b46a1' ef4069f8-f912-40b9-b3ca-c5aec35e310f --set=root ef4069f8-f912-40b9-b3ca-c5aec35e310f Both ofthose are looking at UUID=ef4069f8-f912-40b9-b3ca-c5aec35e310f, which is the UUID of /dev/md7. However, the next line down, it has in there root=UUID=c200ac13-438e-47bc-9715-b012893e0270 which is the UUID for /dev/md2, the old 13.2 system that I am trying to get rid of. So when I boot up and get to the grub menu, and select to boot into 13.2 on /dev/md7, it actually boots into 13.2 on /dev/md2, even though grub has in the menu that it is going to boot into /dev/md7. Anyone know how I can get it to boot into 13.2 on /dev/md7, so I can get rid of /dev/md2? -- George Box: 42.1 | KDE Plasma 5 | AMD Phenom IIX4 | 64 | 32GB Laptop #1: 42.1 | Plasma 5.4.7, Qt 5.7.0 | Core i7-4710HQ | 64 | 16GB Laptop #2: 42.1 | KDE Plasma 5 | Core i5 | 64 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2016-10-29 15:34, George from the tribe wrote:
However, the next line down, it has in there root=UUID=c200ac13-438e-47bc-9715-b012893e0270 which is the UUID for /dev/md2, the old 13.2 system that I am trying to get rid of.
uuid has preference. If you want to boot something else, change the uuid.
So when I boot up and get to the grub menu, and select to boot into 13.2 on /dev/md7, it actually boots into 13.2 on /dev/md2, even though grub has in the menu that it is going to boot into /dev/md7.
Anyone know how I can get it to boot into 13.2 on /dev/md7, so I can get rid of /dev/md2?
If you want to boot 13.2 and it boots, who cares how it calls the device? It goes by its uuid. -- Cheers / Saludos, Carlos E. R. (from 13.1 x86_64 "Bottle" at Telcontar)
On 10/29/2016 09:44 PM, Carlos E. R. wrote:
On 2016-10-29 15:34, George from the tribe wrote:
However, the next line down, it has in there root=UUID=c200ac13-438e-47bc-9715-b012893e0270 which is the UUID for /dev/md2, the old 13.2 system that I am trying to get rid of.
uuid has preference. If you want to boot something else, change the uuid.
I don't think we are supposed to modify the grub2 files directly. The first few lines of /boot/grub2/grub.cfg has this in the comments: # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub
So when I boot up and get to the grub menu, and select to boot into 13.2 on /dev/md7, it actually boots into 13.2 on /dev/md2, even though grub has in the menu that it is going to boot into /dev/md7.
Anyone know how I can get it to boot into 13.2 on /dev/md7, so I can get rid of /dev/md2?
If you want to boot 13.2 and it boots, who cares how it calls the device? It goes by its uuid.
Yes, sorry, I wasn't clear about that. I want to make sure it boots into 13.2 on my new raid device, /dev/md7, instead of my old one, /dev/md2, which is on a different set of hard drives. I want to make sure I get the new one up and running in workable condition so that I can free up that space on the old set of hard drives for another use that I have in mind. -- George Box: 42.1 | KDE Plasma 5 | AMD Phenom IIX4 | 64 | 32GB Laptop #1: 42.1 | Plasma 5.4.7, Qt 5.7.0 | Core i7-4710HQ | 64 | 16GB Laptop #2: 42.1 | KDE Plasma 5 | Core i5 | 64 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
29.10.2016 16:34, George from the tribe пишет:
I am preparing to shift around the partitions on one of my drives, so I am shifting the bootable systems to another drive. I have Leap 42.1 installed on one raid drive, and I created a new raid drive, bigger, copied everything from my old 42.1 to my new 42.1, went through the whole procedure to reinstall grub, ran it and it works great.
The 2nd part of this project is I have an older 13.2 installation on an older raid partition. I tried to do the same thing with this one. I created a new raid, and then copied the files over from 13.2. Since this one is not the default boot, I then went back into 42.1, and re-ran mkinitrd, grub2mkconfig, and grub2-install. It looked like it picked up the new 13.2 just fine, but there is a little problem.
My old 13.2 installation was on raid drive member /dev/md2. My new 13.2 installation (the copy), is on raid drive member /dev/md7.
When I run grub2-mkconfig, this is the portion that comes out from the os-prober for the new 13.2 installation on /dev/md7:
Found openSUSE 13.2 (x86_64) on /dev/md7 menuentry 'openSUSE 13.2 (x86_64) (on /dev/md7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-ef4069f8-f912-40b9-b3ca-c5aec35e310f' { insmod part_gpt gpt insmod diskfilter mdraid1x insmod ext2 set root='mduuid/c8ce1dcb76fc24b52d4f7bc1094b46a1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint='mduuid/c8ce1dcb76fc24b52d4f7bc1094b46a1' ef4069f8-f912-40b9-b3ca-c5aec35e310f else search --no-floppy --fs-uuid --set=root ef4069f8-f912-40b9-b3ca-c5aec35e310f fi linuxefi /boot/vmlinuz-3.16.7-29-desktop root=UUID=c200ac13-438e-47bc-9715-b012893e0270 resume=/dev/disk/by-uuid/6e662ec0-e324-4b6b-81f2-5ecfcdc56d14 splash=silent quiet showopts initrdefi /boot/initrd-3.16.7-29-desktop }
I don't fully get the assignment of roots here - in 2 places it has--set=root: --set=root --hint='mduuid/c8ce1dcb76fc24b52d4f7bc1094b46a1' ef4069f8-f912-40b9-b3ca-c5aec35e310f --set=root ef4069f8-f912-40b9-b3ca-c5aec35e310f
This is location of /boot.
Both ofthose are looking at UUID=ef4069f8-f912-40b9-b3ca-c5aec35e310f, which is the UUID of /dev/md7.
However, the next line down, it has in there root=UUID=c200ac13-438e-47bc-9715-b012893e0270 which is the UUID for /dev/md2, the old 13.2 system that I am trying to get rid of.
It comes directly from /boot/grub2/grub.cfg on 13.2. If you simply copied file without adjusting it, it still refers to old partition. Chroot into new copy or boot into it and run "grub2-mkconfig -o /boot/grub2/grub.cfg"; then rerun it in your master bootloader (presumably 42.1) again.
So when I boot up and get to the grub menu, and select to boot into 13.2 on /dev/md7, it actually boots into 13.2 on /dev/md2, even though grub has in the menu that it is going to boot into /dev/md7.
Anyone know how I can get it to boot into 13.2 on /dev/md7, so I can get rid of /dev/md2?
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/30/2016 01:01 AM, Andrei Borzenkov wrote:
29.10.2016 16:34, George from the tribe пишет:
ef4069f8-f912-40b9-b3ca-c5aec35e310f --set=root ef4069f8-f912-40b9-b3ca-c5aec35e310f
This is location of /boot.
Both ofthose are looking at UUID=ef4069f8-f912-40b9-b3ca-c5aec35e310f, which is the UUID of /dev/md7.
However, the next line down, it has in there root=UUID=c200ac13-438e-47bc-9715-b012893e0270 which is the UUID for /dev/md2, the old 13.2 system that I am trying to get rid of.
It comes directly from /boot/grub2/grub.cfg on 13.2. If you simply copied file without adjusting it, it still refers to old partition. Chroot into new copy or boot into it and run "grub2-mkconfig -o /boot/grub2/grub.cfg"; then rerun it in your master bootloader (presumably 42.1) again.
Ah, ok. I was hoping to be able to change it without having to re-run grub2-mkconfig twice (once from 13.2 and change rooted into the new 13.2, and then again from 42.1), but perhaps that is the only way. -- George Box: 42.1 | KDE Plasma 5 | AMD Phenom IIX4 | 64 | 32GB Laptop #1: 42.1 | Plasma 5.4.7, Qt 5.7.0 | Core i7-4710HQ | 64 | 16GB Laptop #2: 42.1 | KDE Plasma 5 | Core i5 | 64 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/30/2016 11:23 AM, George from the tribe wrote:
On 10/30/2016 01:01 AM, Andrei Borzenkov wrote:
29.10.2016 16:34, George from the tribe пишет:
ef4069f8-f912-40b9-b3ca-c5aec35e310f --set=root ef4069f8-f912-40b9-b3ca-c5aec35e310f
This is location of /boot.
Both ofthose are looking at UUID=ef4069f8-f912-40b9-b3ca-c5aec35e310f, which is the UUID of /dev/md7.
However, the next line down, it has in there root=UUID=c200ac13-438e-47bc-9715-b012893e0270 which is the UUID for /dev/md2, the old 13.2 system that I am trying to get rid of.
It comes directly from /boot/grub2/grub.cfg on 13.2. If you simply copied file without adjusting it, it still refers to old partition. Chroot into new copy or boot into it and run "grub2-mkconfig -o /boot/grub2/grub.cfg"; then rerun it in your master bootloader (presumably 42.1) again.
Ah, ok. I was hoping to be able to change it without having to re-run grub2-mkconfig twice (once from 13.2 and change rooted into the new 13.2, and then again from 42.1), but perhaps that is the only way.
Ok, I did that. I ran in 13.2, changed root to the raid that I wanted, and then ran grub2-mkconfig. Then did the same thing again in 42.1, and now have my system set up the way I wanted. Thanks! -- George Box: 42.1 | KDE Plasma 5 | AMD Phenom IIX4 | 64 | 32GB Laptop #1: 42.1 | Plasma 5.4.7, Qt 5.7.0 | Core i7-4710HQ | 64 | 16GB Laptop #2: 42.1 | KDE Plasma 5 | Core i5 | 64 | 8GB -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (3)
-
Andrei Borzenkov
-
Carlos E. R.
-
George from the tribe