re edit grub boot loader

i had dual boot=

160gb
primary, ntfs, 20gb, xp pro spk3
logical disk
logical, ext3, 4gb, opensuse <<-hd0,2
logical, swap, 1gb, linux swap

primary, ntfs, REST, data partition

i now made and moved all the following partitions down one to accomodate max osx so now its:

160gb
primary, ntfs, 20gb, xp pro spk3
hsf+ partition, 10gb, mac osx
logical disk
logical, ext3, 4gb, reserved for knoppix
logical, ext3, 4gb, opensuse
logical, swap, 1gb, linux swap

primary, ntfs, REST, data partition

now grub boots to error 17 as its looking in hd0,2) partition. but there is nothing there as its now the knoppix partition.

  1. how do i edit grub?
  2. should i be point grub to the hd0,4 partition right?

the pc is aspire one so i dont have dvdrom drive. i will need the closest and smallest grub distro that i can put on usb stick to boot from

so now i cannot get into open suse to re direct the grub boot loader without an ext dvd drive i dont have so only option is to run some sort of grub linux distro that wil fit onto usb

Try to boot openSUSE, when it fails.

Use ‘e’ to edit, change the hd(0,2) to hd(0,4) (I think)
hit return, and then use ‘b’ to boot.

openSUSE should come up, and then you can edit /boot/grub/menu.lst to fix the boot menu.

Alternatively from knoppix, or a Live CD, mount the openSUSE boot partition, and make the edit from there.

grub is detecting my logical partitions as ntfs ?!??!

Giving you specific instructions will be a guess without seeing the actual partition table. Your listing - which does not provide the partition numbers - suggests the numbering will be out of sequence with what physically is on the disk. This is OK, but one needs to understand that when changing the grub pointer. So, we need the output of (as root):

fdisk -lu

Also, if you do get a grub menu, you can do this: Hit the Escape key to drop the graphical screen (if it is up, which it probably is not). Then hit the ‘c’ key; you will be dropped into the grub shell. Then do:

find /boot/grub/stage2

Grub will return where it thinks its boot loader is, e.g., “(hd0,4)”. If you have more than one linux installed, you may get more than one location in the reply, so you need to know which to choose (or just try one and failing that, repeat this process using the other). Then do:

root <whatever grub returned on the find command>
kernel /boot/vmlinuz root=/dev/<the actual partition number, e.g., sda5>
initrd /boot/initrd  
boot

That should get you in and then you can work from there.

But he can’t run fdisk without booting first.

Therefore he should use the feature of GRUB that lets you edit it’s command lines (without saving to disk), so he can bump up the number in root (hd0,X) until it works.

Then once he’s back with Linux running, he can fix the file. The number is his partition - 1, as GRUB counts from 0, not 1.
sda1 = (hd0,0)
2 (hd0,1)
5 (hd0,4)

Right - I’m scanning all these new 11.1 threads so quickly I missed that. Thanks.

However, he can still do what I suggested in the grub shell, at least the find command, because grub will find where the loader actually is, in grub numbering, instead of having to guess. The subsequent kernel and initrd lines are using the same location along with the symlinks that openSUSE uses (thereby eliminating the need to know the actual kernel/initrd file names). I should have added that, once the partition number is determined, OP can just as easily quit the shell (I think Escape also works here) and then edit the lines as you suggest using the location returned in the shell. Either way works.