Restore lilo after Windows installation

1

How can I restore Linux LILO boot loader after the installation of Windows 7 without using any external data storage (burning the CD or pendrive)?

Mulligun81

Posted 2016-10-16T09:01:29.680

Reputation: 31

Answers

1

You can set up another server with a linux image and PXE (network) boot. Then after you have booted the Linux image from the network restore LILO in the normal way.

Alternatively you can install some virtualisation software (e.g. vmware-player or virtual box, just to name two free ones). Point it as your ISO file and the guest will see it as if it was a physical CD/DVD in a real drive. Configure tell the virtual PCs BIOS to boot from CD. This will get you into a new linux setup.

Usually you also tell it to use a file on the windows partition as a fake HDD, but in this case you want to tell the VM software to grant access to a physical disk. This will give you a Linux environment and access to the disk on which you want to restore LILO.

But as per Dr. Pings' comment:
Any method mounting and writing to disk images indeed requires no mistakes.

Hennes

Posted 2016-10-16T09:01:29.680

Reputation: 60 739

Currently i have no empty CD or pendrive nor the original installation medium. I wonder if mounting the Live CD iso in Windows using a disk image emulator like Virtual CloneDrive can help? – Mulligun81 – 2016-10-16T09:33:14.517

You can mount it. And there are ext2 drivers for windows 7. But you can not just run the linux binaries on windows. You could install virtualisation software (birtual box, vmware player, ...), tell it to use a physical disk, boot from the ISO, mount the disk, then restore your LILO setup. – Hennes – 2016-10-16T09:38:59.540

So in the case of virtualization software first i have to copy the iso to a free partition? – Mulligun81 – 2016-10-16T09:45:17.280

@Mulligun81 no. If the VM can use your physical disk, then you can reinstall grub from the live linux session, onto your physical disk. If you do this method be extra careful not to alter the disk or partitions, and not to install the distro. – Dr.Ping – 2016-10-16T09:53:51.280

@Mulligun81 for the record, the VM method is risky. Much preferred to do it via an external media – Dr.Ping – 2016-10-16T09:54:52.377