Ubuntu Hardy Server recovery not working

Topics about disk partitioning (fdisk, parted, gparted, partimage), Volumes Management (lvm, evms, dmraid), Storage, file systems, ...
Posts: 1
Joined: 05 Jun 2008, 06:31

Ubuntu Hardy Server recovery not working

Postby Franic » 05 Jun 2008, 06:48

Hi all,

I installed an Ubuntu Hardy Server which worked fine. The root was on a software raid1 /dev/md0 and the swap on another software raid1 /dev/md1.

The only problem is I made a mistake and it didn't work anymore.

Fortunately I knew it could happen, so when it was working I made an image of the root with partimage using SystemRescueCD.

When the Ubuntu Server was broken, I recovered using this image and put it back on the raid /dev/md0 which was the root of my system. Then I installed grub on the MBR in each disk.

When I reboot, grub runs fine. But the Ubuntu Server doesn't want to start and I have this error message:
and it starts in busybox mode.

Unfortunately if I boot SystemRescueCD it finds perfectly my 2 software raid1.

I've checked the files mdadm.conf and menu.lst, and they seem correct.

Anyone knows why the recovered Ubuntu Hardy Server from a working image doesn't want to start? Why can't it find /dev/md0?


Posts: 101
Joined: 18 Nov 2006, 13:09

Postby Tuipveus » 21 Jun 2008, 11:42

When I upgraded my normal 1 harddisk installation to raid-1, I needed to write following to the menu.lst.

Code: Select all

title           Debian GNU/Linux, RAID kernel
root            (hd0,0)
kernel          /boot/vmlinuz- root=/dev/md0 md=0,/dev/hda1,/dev/hdc1 ro

title           Debian GNU/Linux, RAID recovery kernel
root            (hd1,0)
kernel          /boot/vmlinuz- root=/dev/md0 md=0,/dev/hdc1 ro

Notice md=0,/dev/hda1,/dev/hdc
I wrote this under of "### END DEBIAN AUTOMAGIC KERNELS LIST"
I manually disconnected harddisk no. 1 and it still started. Then did same for harddisk no. 2 and it still started.

I also have Debian in another computer, which has been installed directly to RAID, but I haven't checked if it is able to boot from both harddisk. It has different configuration:

Code: Select all

title           Debian GNU/Linux, kernel 2.6.22-2-686
root            (hd0,0)
kernel          /boot/vmlinuz-2.6.22-2-686 root=/dev/md0 ro
initrd          /boot/initrd.img-2.6.22-2-686

I think your raid-partitions are fine, but grub is messed up. If you can mount your md0 with sysresccd, you should be able to see state of harddisk with

Code: Select all

cat /proc/mdstat

After it will work again, please make extra backup of first 63 sectors with dd.

Code: Select all

dd if=/dev/hda of=/your_directory/grub_backup_hda.bin bs=512 count=63
dd if=/dev/hdc of=/your_directory/grub_backup_hdc.bin bs=512 count=63

or something like that.

Return to “Hard-disk partitioning and storage”

Who is online

Users browsing this forum: No registered users and 2 guests