openSUSE won't boot after I resized its partition - grub2 related
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
openSUSE won't boot after I resized its partition - grub2 related
I installed openSUSE 11.2 RC1 yesterday. (It was a fresh install.)
I installed to a 5 GB logical partition at (hd0,10) which is /dev/sda10. (BTW, that's grub2 numbering). There is a 300 MB boot partition at /dev/sda1 or (hd0,1).
After I got everything set up in openSUSE exactly the way I wanted it, I realized 5GB is way too small for openSUSE KDE, even though ALL data is on another partition.
Next step: booted to a live CD (with grub2) and used gparted to remove /dev/sda11 (another 5GB logical partiition), then resized the openSUSE partition (/dev/sda10) to 10GB in gparted. Fine.
Rebooted and no success. I can't remember the exact problem, but my previous openSUSE boot menu was gone. No problem - I wanted OS independent booting anyway and openSUSE had taken control of the boot process unexpectedly after I installed it (even though I told it to install grub to the partition, not the MBR).
Next step: again booted to a live CD (with grub2). Mounted the boot partition (/dev/sda1) as /mnt. Then used grub-install
Code:
grub-install --root-directory=/mnt/ /dev/sda
Now, after rebooting I get:
Code:
sh:grub>
OK, good. So grub has control of the MBR.
Then I executed these commands:
ls / -- gives the expected output
cat /grub/grub.cfg -- lists my expected grub.cfg file, with my chainloader statements exactly like I put them.
Code:
menuentry "openSUSE 11.2 RC1 KDE4 64bit on sda10" {
set root=(hd0,10)
chainloader +1
boot
}
I am not sure whey it isn't working.
So now, I decided to try booting manually:
Code:
linux (hd0,10)/boot/vmlinuz
initrd (hd0,10)/boot/initrd
boot
And now I'm booted into openSUSE just as I left it before expanding the partition.
But, I'm not sure how to fix this so it will boot next time.
I did some random experimenting (as well as reading the manual).
My boot partition had a directory called /grub under the root. I simply moved this to /boot/grub on the same partition, where the new /boot directory is empty except for containing the grub directory under it.
That fixed it!
I can now boot Kubuntu Karmic, sidux, openSUSE 11.2 RC1 and Mythbuntu 9.10, where each uses their own boot loader on their respective partition. My boot partition is OS independent and uses chainloading to call the bootloader on each partition.
Actually, the only OS that won't boot right this moment is Mythbuntu. But I think I can fix that with a grub-install after I boot from the Mythbuntu Live CD. But Mythbuntu isn't important. What I'm really doing is trying to find my favorite KDE distro.
Now, I will spend some time living with these different KDE distros for a while.
I booted up with Mythbuntu 9.10 LiveCD and now I want to fix Mythbuntu not booting.
Mythbuntu is installed on /dev/sda9. My separate boot partition (which is working) is on /dev/sda1 and it is presently not mounted (in order to avoid creating any new issues).
Will this work?
Code:
sudo -s
mount /dev/sda9 /mnt
grub-install --root-directory=/mnt/ /dev/sda9
I do not want this to touch the sda MBR. (As per above, all other OS's are booting perfectly via chainloading.) I only want to get Mythbuntu to boot now (which I believe requires putting grub into sda7).
I don't do grub2 as I feel it's (still) not ready, but I'd reckon you need to pass a "root=<somewhere>" parameter. The initrd will do its stuff then pivot to the real root.
I don't do grub2 as I feel it's (still) not ready, but I'd reckon you need to pass a "root=<somewhere>" parameter. The initrd will do its stuff then pivot to the real root.
At this point I'll try anything. Here's what I did:
at grub menu, I hit "c"
Code:
sh:grub> set root=(hd0,9)
sh:grub> linux /vmlinuz
sh:grub> initrd /initrd.img
sh:grub> boot
booting fails again with the same error as before.
Wasn't what I meant - you need something like this I imagine
Code:
linux (hd0,9)/vmlinuz root=UUID=<some meaningless number> ro
OK. Thanks. I can get the UUID and try that.
For reference, here is what else I have tried.
Code:
(initramfs) cat /proc/partitions <---- shows all the partitions I expect including sda9
(initramfs) ls -al /dev/sda9 <---- brw-rw---- 1 0 0 8, 9 /dev/sda9
(initramfs) mkdir /mnt
(initramfs) mount /dev/sda9 /mnt
(initramfs) ls -l /mnt/lib/modules/* <-------- lists a bunch of modules including kernel and initrd
have a look in /etc/initramfs-tools/initramfs.conf <---- can't see all of file; more doesn't seem to work in (initramfs)...
Wasn't what I meant - you need something like this I imagine
Code:
linux (hd0,9)/vmlinuz root=UUID=<some meaningless number> ro
... or ...
linux (hd0,9)/vmlinuz root=/dev/sda9 ro
... or ...
I got the UUID using blkid in (initramfs).
Then I used the exact format you suggested with root=UUID=<xxxxx..xx>
It fails with the same error.
However, as before, at the grub command, it appears to load vmlinuz OK. It loads the initrd OK too.
After I enter "boot", a but of stuff scrolls by before the error "Gave up on waiting for root device". This is all exactly the same as before.
I tried this too. Interesting -- and different -- result!
It no longer gives the previous error, and it gets all the way to a login prompt for Mythbuntu, but the screen begins to flicker like crazy and I cannot type normally (characters go missing).
I have seen some "vga" related commands for grub... maybe that's what I need now?
Seems I'm a step closer. It is funny/strange that of all the OS's I'm booting via chainloading, Mythbuntu is the only one that is giving this trouble. But its a good learning experience for me.
EDIT: I think the reason I didn't get the same result with the UUID is because I probably made a typo enter the UUID. I think the root= specification is indeed the solution.
However, the funky blinking screen and unresponsive keyboard is stil happening, even with the splash option set (as soon as the splash screen ends, it starts). I think maybe I need to make a new initrd... ???
UPDATE: everything I set up is working correctly except Mythbuntu. It will not boot.
I have a grub2 boot partition on (hd0,1) as above. I installed Mythbuntu 9.10 32bit on (hd0,9), a logical partition and I installed the boot loader into that partition using the advanced option at the end of the installation process. I have the grub2 on the boot partition set to chainload Mythbuntu on (hd0,9), as explained above.
What happens is that Mythbuntu seems to go through the bootup process correctly but it stops at the console login and the whole screen is flashing/blinking. In fact, even keyboard input is sporatic. I'm afraid the system is in a state that could damage the harrdware. It is not even possible to type enough to log in. The only option is to reboot.
I thought the problem was related to a defective installation, so I installed fresh again (reformatted partition). I get the exact same problem after the second install.
I have other distros on other partitions. All will boot up correctly. Mythbuntu is the only OS that will not boot. However, if I install Mythbuntu without putting the boot loader into its partition (i.e., using the whole hard drive and doing a more standard installation) Mythbuntu will boot correctly on this computer.
I am thinking something is wrong in the Myth partition. If so it might be easier to reinstall. To check it out I would take a live cd with old grub to try and chain boot it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.