[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bootable cd

Anders Breindahl wrote:

On 2006-01-03  1710, Alessandro Speranza wrote:
Hi guys.
I've been wondering lately, about bootable cds. The problem I have is the following. Recently I had to reinstall windows on my dual boot machine. Unfortunately, as you may know, when you reinstall windows, it automatically deletes grub from the MBR thus I was not able to boot debian any longer. Moral, I had to reinstall debian as well.

I order to avoid that, I found this interesting reading:
about making a rescue grub-floppy (be careful, it's in Italian). However, my laptop has no working (in the sense that it doesn't work any more) floppy drive. It has a working cdrom drive though, so I was wondering: Is there any chance I can make a sort of rescue grup-cdrom? And if yes, how do I do that?

As another poster already pointed out, any live-cd will do the trick.
Further, it might be worth mentioning the procedure after doing that:

- Boot the live-cd and make sure the /-partition is mounted.  In Knoppix,
 that won't be a problem, as it is done automagically. Also ensure that
 you have access to /boot, if that's on a seperate partition.
- As root, use the command chroot to chroot yourself into your old
 chroot /mnt/oldslash /bin/bash
 Now you more or less have the environment of your Debian-installation.
- Assuming the hardware configuration hasn't changed, you should be ably
 to run update-grub to reinstall into your MBR:

That's the theoretical approach. However, I haven't actually performed
this myself, so the actual procedure might differ a bit. In particular,
update-grub could be confused about where to find /boot -- in which case
it might be solved with a symlink.

Regards, Anders Breindahl.

Had the same problem with my PC once.

As Previous poster said, get a live cd, mount the partition where /boot resides (or the partition that contains /boot).

then mount proc like this "mount -t proc none /root/path/proc"

followed by chrooting, then either

a) edit the grub conf file to add windows (if its not already there)
b) use grub-update (never used this myself)

then use grub-install to install grub into the mbr again.

If you want to be more fancy, then you can install grub without chrooting, but this is just more difficult with no benefit to you (its useful though for other things, like installing grub to CF cards/USB disks).

Reply to: