17 June, 2009

Use Your Linux System With A Broken Bootloader

Here are some simple steps that should allow you to make some very simple changes that could end up saving you a lot of time and possibly a reinstall of your Linux system.

1. Acquire a Linux liveCD of your choice. I prefer Elive, as it is bigger one and quick. There are in count of others such as KNOPPIX, ZenWalk, Ubuntu, Fedora Live, and DSL. Each of these would easily be up to the task.
2. Boot the live CD and get to a command line somehow. If you are in a GUI environment, this means starting a Terminal or Konsole session. If you are booted into a classic Linux login prompt, you're good to go.
3. Make sure you're the root user (you can do this by typing whoami). If you're not root, type su - and enter the root password when prompted.
4. Mount your linux root partition. These steps may vary depending on preference, but they should be fairly similar:
1. cd /mnt
2. mkdir myroot
3. mount /dev/hda5 /mnt/myroot
4. cd /mnt/myroot
5. Depending on the complexity of the tasks you wish to perform, you may need to mount your device list according to what your live CD detected:
1. mount /dev /mnt/myroot/dev
2. mount -t proc /proc /mnt/myroot/proc
6. Finally, switch into your installed system, specifying where your root partition is mounted and they shell you wish to use:
1. chroot /mnt/myroot /bin/bash

At this point you should be able to do several useful things, such as reinstall your bootloader into the MBR. You can also edit hosed configuration files this way.

If you need to add Windows into your boot configuration, and you use LILO, you could try adding something like this to your /etc/lilo.conf:

other = /dev/hda1
label = Windows
table = /dev/hda

(be sure to run lilo again to save the change)

When you are all done with your chroot environment, simply type exit or logout or what have you. Then be sure to unmount anything you may have mounted in order to use the system.

No response to “Use Your Linux System With A Broken Bootloader”

Leave a reply

 
© 2009 Hitting codes Stealthily. All Rights Reserved | Powered by Blogger
Design by psdvibe | Bloggerized By LawnyDesigns