[NBLUG/talk] Reinstall Boot Loader

Mark Street mark at oswizards.com
Sun Dec 24 22:26:58 PST 2006


I think I do this as an exercise in one of my courses....

On Saturday December 23 2006 2:30 pm, Ian Sutherland wrote:
> I'm in suse 10.2 after deleting the Boot Loader in the first partition.

What specifically did you delete and how?  The boot loader from the MBR or the 
boot loader from the boot sector of the first partition?  I am assuming the 
boot loader was installed into the boot sector of the first partition  How 
many partitions?  Only 1 disk? IDE or SCSI?

There are several ways to do this.  Here is one.
reference for useful commands
man chroot
info chroot
man grub-install
man mount
man pwd

Boot the system with Knoppix/Rescue CD.  Make a mount point for your / 
partition called myroot, mount your / partition on this mount point (Some 
Rescue CD's will do this for you).  Then cd into your myroot directory and 
mount your /boot partition if you have one (some people just create a / 
paritition and store all of the filesystem on 1 partition) NOTE, you may have 
to mount other partitions that may be part of your filesystem if they are 
needed for the rescue... but this willprobably be sufficient.

Then use the chroot command on your current working directory myroot.

pwd - make sure you are inside of myroot

chroot .

Now you should be inside of your old filesystems with access to all of your 
commands and config files.

Now, if you installed grub into the mbr you can use grub-install /dev/hda for 
IDE or grub-install /dev/sda for SCSI, if grub can find its config files it 
will write to the MBR and you are done.

For boot loaders installed into the first partition

grub-install /dev/hda1  or grub-install /dev/sda1

If grub does not complain and installs clean you might be happy...

Whether you use knoppix or a rescue CD, the process is the same.  NOTE, you 
may have to mount your partitions rw on your mount point with Knoppix.

exit out of your rescue environment and try a reboot.....

> How  
> do I reinstall the Boot Loader? I have suse 10.2 mini disk only, the
> network install disk. Thanks, Ian

Does the 10.2 mini disk have a rescue mode?  I know I have done this with 
RedHat many times... ; ) the same thing in fact.

-- 
Mark Street, D.C., RHCE
CTO Alliance Medical Center
http://www.oswizards.com
http://www.alliancemed.org
--
"First they ignore you, then they ridicule you, then they fight you, then you 
win" - Gandhi
"If you want truly to understand something, try to change it" - Kurt Lewin
--
Key fingerprint = 3949 39E4 6317 7C3C 023E  2B1F 6FB3 06E7 D109 56C0
GPG key http://www.oswizards.com/pubkey.asc



More information about the talk mailing list