[Wolves] Lilo / After WinXP Install

James Turner james at turnersoft.co.uk
Sun Apr 4 11:14:50 BST 2004


On Saturday 03 April 2004 10:48, fr0st wrote:
> Hey up,
>
> I dualboot at home with Debian and WinXP.. My XP got buggered majorly so I
> had to re-install and of course microsoft being microsoft it killed my MBR
> thus loosing the option to boot into Linux.. I was thinking to get this
> back, I could spin off Knoppix and mount the drive
>
> mount -o /mnt/hda1 /dev/hda1 and then run lilo -v
>
> Would that work?

Your config file will be at /mnt/hda1/etc/lilo.conf instead of /etc/lilo.conf, 
so you'd need to tell Lilo where to find it:

lilo -v -C /mnt/hda1/etc/lilo.conf

or alternatively, chroot to your installed system first, using:

chroot /mnt/hda1
lilo -v

Incidentally, it is possible to back up and restore the contents of the MBR, 
which might be useful for Windows dual-booters (ie backup immediately before 
a Windows re-install).

To back up the mbr (logged in as root):

dd if=/dev/hda of=/my-backup-directory/mbr bs=512 count=1

To restore the backed-up mbr:

dd if=/my-backup-directory/mbr of=/dev/hda bs=512 count=1

Note that this will generally only work when backing up and restoring to the 
same hard disc, and where the contents of the /boot partition - the lilo or 
grub files and (especially for Lilo users) the kernel - have not been altered 
during the interrim period.

James



More information about the Wolves mailing list