LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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

Reply
 
Search this Thread
Old 11-03-2009, 11:33 AM   #1
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Rep: Reputation: 33
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.

Is the problem because grub cannot find grub.cfg?
 
Old 11-03-2009, 01:13 PM   #2
ronlau9
Senior Member
 
Registered: Dec 2007
Location: In front of my LINUX OR MAC BOX
Distribution: Mandriva 2009 X86_64 suse 11.3 X86_64 Centos X86_64 Debian X86_64 Linux MInt 86_64 OS X
Posts: 2,369

Rep: Reputation: Disabled
Is the name of the file grub.cfg or is it boot.cfg ?
 
Old 11-03-2009, 03:05 PM   #3
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by ronlau9 View Post
Is the name of the file grub.cfg or is it boot.cfg ?
grub.cfg, as it should be in grub2.
what are you thinking might be the issue?
 
Old 11-03-2009, 05:29 PM   #4
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Solved

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.
 
Old 11-03-2009, 06:24 PM   #5
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
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).
 
Old 11-03-2009, 07:21 PM   #6
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Here's what I tried:

from http://ubuntuforums.org/showthread.php?t=1195275

* Boot to the 9.10 Mythbuntu LiveCD Desktop.

Code:
      sudo mount /dev/sda9 /mnt
      sudo mount --bind /dev/ /mnt/dev
      sudo chroot /mnt
      sudo grub-install -f /dev/sda9
* Reboot.

Didn't work -- but also didn't mess up anything else.

Now, at grub2 prompt:

Code:
sh:grub> ls (hd0,9)/boot/
shows vmlinuz-2.6.31-14-generic-pae and initrd-2.6.31-14-generic-pae and the other expected files

Code:
sh:grub> ls (hd0,9)/boot/grub
shows grub.cfg, as expected.


Code:
sh:grub> linux (hd0,10)/boot/vmlinuz-2.6.31-14-generic-pae
the above succeeds
Code:
sh:grub> initrd (hd0,10)/boot/initrd.img-2.6.31-14-generic-pae
the above succeeds too
Code:
sh:grub> boot
booting fails with:
Begin: Waiting for root file system...

Then I get:
BusyBox
(initramfs) _

What next? Any ideas?
 
Old 11-03-2009, 07:29 PM   #7
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
More info:
Although I have the following files, this code fails too:
Code:
sh:grub> linux (hd0,9)/vmlinuz
sh:grub> initrd (hd0,9)/initrd.img
sh:grub> boot
booting fails with the same error as before.

From busybox, I can do this:
mkdir /mnt
mount /dev/sda9 /mnt
ls /mnt/dev <---- this gives a listing of files that I assume is correct.

checking the other directories under /mnt shows everything as expected. I do not see a problem... I'm kinda lost now...

Last edited by Mountain; 11-03-2009 at 08:01 PM.
 
Old 11-03-2009, 07:45 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,354

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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.
 
Old 11-03-2009, 08:00 PM   #9
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by syg00 View Post
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.
 
Old 11-03-2009, 08:07 PM   #10
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,354

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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 ...

Last edited by syg00; 11-03-2009 at 08:09 PM.
 
Old 11-03-2009, 08:08 PM   #11
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by syg00 View Post
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)...
 
Old 11-03-2009, 08:15 PM   #12
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by syg00 View Post
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.
 
Old 11-03-2009, 08:25 PM   #13
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by syg00 View Post
linux (hd0,9)/vmlinuz root=/dev/sda9 ro
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... ???

Last edited by Mountain; 11-03-2009 at 09:33 PM.
 
Old 11-05-2009, 11:44 PM   #14
Mountain
Member
 
Registered: Nov 2007
Location: A place with no mountains
Distribution: Kubuntu, sidux, openSUSE
Posts: 214

Original Poster
Rep: Reputation: 33
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.

My computer is a Thinkpad T61p.

Anyone have any ideas?
 
Old 11-06-2009, 06:13 AM   #15
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
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.


Larry
 
  


Reply

Tags
boot, grub2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I resized a ntfs partition using QtParted... trist007 Linux - Newbie 2 03-23-2009 12:57 AM
Ext4 partition corrupted by resized NTFS Vista C:\ partition? graviton-boson Linux - Newbie 2 03-16-2009 01:26 PM
Resized Linux Partition on Dual Boot - Lost Boot RationalRabbit Linux - Newbie 14 12-29-2005 01:02 AM
Stuck at Grub2 prompt after deleting Linux partition of dual boot alcorta Linux - Software 3 07-08-2005 11:12 PM
HELP resized partition and lost all data wolfbeast2 Linux - Newbie 15 08-14-2004 07:05 PM


All times are GMT -5. The time now is 07:51 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration