You are not logged in.

#1 2009-09-21 21:59:57

popple
Member
Registered: 2009-08-17
Posts: 5

[SOLVED]: trying to repair /boot

I've managed to kill my dual-boot XP/Arch system and would appreciate help fixing it.

The hard drive has 4 partitions:
sda1 NTFS for windows XP
sda2 FAT32
sda3 200MB ext2 boot partition used by grub
sda4 ext3 with up-to-date archlinux installed

Somehow ("user error", playing around...) I've deleted my boot partition.
Grub now gives "error 21" when "loading stage 1.5" and doesn't get any further.

To try and fix this, I've booted from an archlinux live cd and run cfdisk to recreate a linux partition sda3 with boot flag set. I had a back-up copy of the files in /boot
So as root I've run:
mkfs.ext2 /dev/sda3
mkdir -p /mnt/mymount/boot
mount /dev/sda3 /mnt/mymount/boot
cd /mnt/mymount/boot
and copied into here these backed-up boot files/directories:
  System.map26
  grub (directory)
  kernel26-fallback.img
  kernel26.img
  vmlinuz26
all with root rwx permissions.
grub/menu.lst is in there and has windows + arch listed

Grub still gives the same error 21.
Any ideas please ?

Thanks very much!

Last edited by popple (2009-09-23 21:55:19)

Offline

#2 2009-09-21 22:24:49

Andrwe
Member
From: Leipzig/Germany
Registered: 2009-06-17
Posts: 322
Website

Re: [SOLVED]: trying to repair /boot

Did you run grub-install after copying all files?

Offline

#3 2009-09-23 21:59:49

popple
Member
Registered: 2009-08-17
Posts: 5

Re: [SOLVED]: trying to repair /boot

Yes that worked, thank you!
Stage1.5 needed to know exactly where Stage2 file was on disk.

While googling for this, came across an appropriate quote:
"With grub, a successful reboot is just three commands away. The question is, which commands ?"

Offline

Board footer

Powered by FluxBB