Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



Rewriting Linux bootloader

Vehementi
11-27-2003, 09:31 PM
Hello all,

Here's my problem: Windows rewrote my MBR after installing a different version on a different partition, and now I can't access Linux. I didn't make a boot floppy (:D) and even booting from the (seperate) hard drive Linux is on gets a "Error loading operating system". Can I re-write LILO to the MBR through linux rescue?

MattG
11-27-2003, 10:35 PM
We will need to know what flavor your using....you might be able to boot off the CD, mount the linux partition through that and just run linuxconf or liloconfig -- i know that is the case with slackware 9.

Ad
11-27-2003, 10:35 PM
  

Phantasm66
11-28-2003, 06:12 AM
boot from linux CD, type "linux rescue" at the prompt.

Let it automatically mount your / partition, which it will do under a mount point of /mnt/sysimage . the actual system you are seeing exists in RAM only, but its mounted your old system (which IS on HDD) as /mnt/sysimage.

Now, issue this command to make /mnt/sysimage the new /

chroot /mnt/sysimage

now, assuming you want the same LILO as before:

/sbin/lilo

now get out

exit

exit

until machine reboots.

Vehementi
11-30-2003, 03:22 PM
Ah thank you Phant! Everything is all fine and well now.

Phantasm66
11-30-2003, 04:38 PM
heehhe cool!

Actually, I think you can combine the two commands into one:

chroot /mnt/sysimage /sbin/lilo

would do the trick as well, I think.

Take care,

P66.

Samael
06-17-2005, 09:08 PM
i recently installed linux mandrake 9.1 onto an 8.5 gig partition of a 40GB HD, some how the boot loader got messed up so i went into rescue to have it re write it; the problem is though that it targeted the MBR on my Western Digital 200GB HD and now it looks like an 8.5GB HD and i cant access anything, none of the drives are listed on the 200GB HD, however it does show up in the windows device manager; is there any utilities or some way of restoring the factory MBR? bios shows the same thing. any kind of help is appreciated more than i can say.

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Microsoft to showcase Natal at Gamefest in February

Microsoft and News Corp potential alliance, against the open Web

Opera 10.10 launches with Unite sharing technology

News around the web: Cell Processor, Dead In The Water

Weekend tech reading: How to run Chrome OS as a virtual machine

More Tech News

  
 Software Downloads

WinDVD 10.05 Pro 2010 (formerly WinDVD Platinum)

Opera 10.10 for Windows

Mp3tag 2.45

FinalBurner 2.15

Google Chrome 4.0.249.00 Beta

Magic DVD Creator 11.0.10.189

Dynamic Notes 3.44

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.