help -- won't boot after resizing partition

I installed openSUSE 11.2 RC1 yesterday. (It was a fresh install; I erased the milestone 8 install I had done previously).

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) in grub2 numbering again.

After I got everything set up 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. 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.

Next step: again booted to a live CD (with grub2). Mounted the boot partition (/dev/sda1) as /mnt. Then used grub-install

grub-install --root-directory=/mnt/ /dev/sda

Now, after rebooting I get:


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.

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:


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. :slight_smile:

But, I’m not sure how to fix this so it will boot next time.

Is the problem because grub cannot find grub.cfg?

Solved.

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!