rescuing system after MBR overwrite; root on EVM-ed ReiserFS / root on standalone ext3

Thomas Kaiser thomas at
Thu Mar 17 22:00:50 UTC 2005

If you have your bootloader (grub) installed in the MBR, just save the 
MBR before you install windows. And put your backup MBR back after 
windows install has finished.

I would do something like this:
- Boot into Linux
- dd if=/dev/hda of=mbr.bin bs=512 count=1 -> save MBR to the curent 
- install windows
- after windows install is finished, boot from any live/rescue Linux
- mount the partition where you put mbr.bin
- dd if=/path_to_your_backup/mbr.bin of=/dev/hda
- reboot and Linux should boot like it did before the windows install
- open /boot/grub/menu.lst in a text editor and add the following:
   # This entry is for a non-linux OS
   # on /dev/hda1
   title           Windows NT/2000/XP
   root            (hd0,0)
   chainloader     +1
- reboot again and you should have a new menu entry in the grub boot 
menu for your M$ windows

I hope this helps

Regards, Thomas

Shot (Piotr Szotkowski) wrote:
> Hello.
> I have to reinstall the Windows partition on my laptop, but this
> will overwrite the Master Boot Record. Thinking it's better to be
> safe than sorry I tested the scenario on my spare machine: Windows
> goes to /dev/hda1, Ubuntu Hoary Preview to /dev/hda{2,6,7,8,...}
> (the multipartiton setup), all partitions ReiserFS, all on EVM.
> After some googling I reinstalled Windows on /dev/hda1, booted from
> the Hoary Preview with `rescue root=/dev/hda2` and got kernel panic:
> VFS: Mounted root (ext2 filesystem).
> VFS: Cannot open root device "hda2" or unknown-block(0,0)
> Please append a correct "root=" boot option
> Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
> which is not really surprising as the kernel looks for a standalone
> root on ext2, but there's only an EVM-ed root on ReiserFS.
> Thus, I have a couple of questions:
> My testing machine's case: As far as I understand, I need a CD with
> a rescue kernel with compiled in (not just as a module) EVM support
> and ReiserFS support. Do you know about such a rescue CD?
> My laptop's case: It currently runs Debian sid (but will run Hoary in
> near future, after I sort out this Windows reinstall), and has root on
> a standalone ext3 partition (other partitions are on LVM). Do you know
> about a rescue CD with support for an ext3 root? Do I get it right
> thinking this kernel doesn't have to have LVM support (with the root
> partition not being on LVM)?
> In either case: what parameters should I pass at the
> boot prompt for the rescue kernel to do its magic?
> Cheers,
> -- Shot

More information about the ubuntu-users mailing list