You are not logged in.

#1 2009-09-28 10:27:59

ap_
Member
From: Finland
Registered: 2008-10-14
Posts: 48

["SOLVED"] I broke my MBR / Grub error 21

UPDATE:

I'm happily writing this from Arch installation. What I did was that I first installed Win7 Rc and then I installed Arch with Legacy IDE option. Grub was installed to MBR. After installation I had to change some device names, but at least now it works!! Thank you all! smile

UPDATE #2:

The issue was completely resolved by simply updating BIOS.


So, yesterday I was playing around & studying with Openbsd install disk and I think I accidentally wiped all m data. So what, it happens big_smile. However, I run into some problems with reinstalling Arch. I installed as usual with USB stick loaded with 2009.08 x86_64 image. After rebooting I got to Grub, and it reports error 21. Weird, I'm sure my configuration is the way it was before The Great Mistake.

I tried reinstalling Grub, no go. I even tried reinstalling with 2008.06 cd and with Ubuntu 8.04 cd, no go. Still the same error. Only thing I've got to boot from the HDD is Windows 7, but who wants that?! I get no error when installing Grub, and find /boot/grub/stage1 in Grub shell finds stage1 file in (hd0,0). Also booting "Existing installation" with Arch Live cd/usb doesn't work.

My /boot/grub/menu.lst:

title Arch Linux
root (hd0,0)
kernel /boot/grub/vmlinuz26 root=/dev/sda1 ro
initrd /boot/kernel26.img

Output of fdisk -p /dev/sda (sorry, a bit messy text)

/dev/sda1           *         1       3647    29294496 83  Linux
/dev/sda2                     3648    27963  195318270       5    Extended
/dev/sda5                     3648    27841  194338273+    83  Linux
/dev/sda6                     27842   27963  979933+         83  Linux

I'm all out of ideas at this point. Is the MBR somewhat corrupted? And how would I fix that? Any help would be appreciated! Thanks.

Last edited by ap_ (2009-09-30 08:22:09)

Offline

#2 2009-09-28 10:41:53

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: ["SOLVED"] I broke my MBR / Grub error 21

You want to see what grub sees. To do so check the
Disk investigation with GRUB shell section here:

http://jbakshi.50webs.com/Linux_tutoria … ified.html
followed by kernel and initramfs identification.

HTH


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#3 2009-09-28 12:54:17

ap_
Member
From: Finland
Registered: 2008-10-14
Posts: 48

Re: ["SOLVED"] I broke my MBR / Grub error 21

Grub shell works as expected when I chroot in to the installation, I can see hd0 and search for vmlinuz26 works etc.

I'm getting some progress after another reinstallation. Now I can get to the grub shell when booting from HDD, however, it cannot find hd0 or any disks at all...

Offline

#4 2009-09-28 13:04:23

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: ["SOLVED"] I broke my MBR / Grub error 21

Did you install grub to the mbr of h/sda? Grub is prolly all confused as to where it is installed and where it has to point to. Another possible solution would be to just reinstall grub from some live CD or other.

EDIT:

To the correct drive, of course smile

Last edited by toad (2009-09-28 13:05:26)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#5 2009-09-28 13:47:30

ap_
Member
From: Finland
Registered: 2008-10-14
Posts: 48

Re: ["SOLVED"] I broke my MBR / Grub error 21

Yup. Grub is installed to /dev/sda. I've tried to reinstall Grub and the whole system with different setups several times. I get to Grub shell (stage 2?) but no further. Frustrating as hell.

Offline

#6 2009-09-28 13:54:53

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: ["SOLVED"] I broke my MBR / Grub error 21

Have you checked your boot order in the BIOS? How many hard drives have you got? Is your sda also the first hard disk in the BIOS? As I said, tons of stuff that could go wrong as some pointer somewhere along the line is out of place. Best to start at the wall wink as they say. Follow each pointer from the BIOS and make sure you look in every nook and cranny...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#7 2009-09-28 14:03:52

ap_
Member
From: Finland
Registered: 2008-10-14
Posts: 48

Re: ["SOLVED"] I broke my MBR / Grub error 21

I've got a laptop, it's got only one HDD. There's not too many options in BIOS tongue

Edit: GNU Parted shows that my /boot partition starts at 0.51kB, can that be right? On my desktop it starts at thirtysomething kB? Or am I way off...

Last edited by ap_ (2009-09-28 15:00:35)

Offline

#8 2009-09-28 15:09:10

scio
Member
From: Buffalo, NY
Registered: 2008-08-05
Posts: 366

Re: ["SOLVED"] I broke my MBR / Grub error 21

ap_ wrote:

GNU Parted shows that my /boot partition starts at 0.51kB, can that be right? On my desktop it starts at thirtysomething kB? Or am I way off...

fdisk shows your /dev/sda1 starting at sector 1, so yes that could be right.

Edit: I've forgotten some of my grub knowledge since I'm working with grub2 now, but you specify that you have a /boot, and but your menu.lst shows /boot for your linux image.
You already specified the grub root, so you don't need the /boot before the kernel image and such, it's just / relative to (hd0,0).

Edit2: For clarification (I think your kernel path was wrong as well unless you installed it to /boot/grub manually, and assuming /dev/sda5 is your "/" partition):

title Arch Linux
root (hd0,0)
kernel vmlinuz26 root=/dev/sda5 ro
initrd kernel26.img

You may want to post what partitions you have in addition to the fdisk output since I'm not quite sure what your /dev/sda5 and /dev/sda6 are.

Last edited by scio (2009-09-28 15:22:23)

Offline

#9 2009-09-28 16:28:50

ap_
Member
From: Finland
Registered: 2008-10-14
Posts: 48

Re: ["SOLVED"] I broke my MBR / Grub error 21

Yeah, I'm sorry my posts must be kinda confusing. I've been trying different ways of partitioning. I've tried with separate boot, root and home partitions, and also just with root and home. It just won't work, and I don't get it at all.

I have set up Grub tens of times I guess. Maybe I "broke" something with the OpenBSD cd.

Offline

Board footer

Powered by FluxBB