How to reinstall the GRUB boot loader.
This document (3918735) is provided subject to the disclaimer at the end of this document.
1. Place your SLED 10 CD 1 or DVD in the drive and boot up to the CD or DVD. On the resulting menu select "Rescue System". This will boot you up to a text based terminal with a "Login" prompt. Enter"root" for the user name. You will be brought to a command prompt.
2. Enter the command "fdisk -l". This will display the partitions on your drives that may look something similar to the following:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 262 2104483+ 82 Linux swap / Solaris
/dev/sda2 * 263 3449 25599577+ 83 Linux
/dev/sda3 3450 19456 128576227+ f W95 Ext'd (LBA)
/dev/sda5 3450 6060 20972826 83 Linux
/dev/sda6 6061 19456 107603338+ 83 Linux
This is an example from a SATA drive. IDE drives will have a device name of /dev/hda.
You need to know which of the partitions displayed is your root partition for the Linux system. If you took the default during installation it is typically the Linux partition just after the Linux swap partition.
3. Enter the command "mount /dev/sda2 /mnt". Be sure to replace /dev/sda2 with the appropriate device for your root partition.
*** Note: With this partition mounted you can verify that it is the "/" (or root) partition by viewing the contents of the /mnt/etc/fstab file. Run this command to display the file:
You should see this same partition being mounted to "/" in a line similar to this:
/dev/sda2 / reiserfs acl,user_xattr 1 1
If the file is not found then this is most likely not the root partition. You can unmount the partition and try one of the others if needed. Use the following commands as an example. Just replace the device names with those on your system:
mount /dev/sda3 /mnt
Remember that you will not be able to do the umount command if you have used the cd command to change directories into the /mnt directory. If you get an error run the command "cd /" and try again.
4. Enter the command "grub-install --root-directory=/mnt /dev/sda". Be sure to replace /dev/sda with the correct device for your hard drive where the root partition exists (usually /dev/hda for IDE drives). The "sda" without the number on the end represents the drive where the 2 in "sda2" represents the partition number on the drive.
5. Once this command completes successfully reboot your system by entering the command "reboot". Your system will reboot and hopefully you will see the GRUB menu again.
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:3918735
- Creation Date: 20-Nov-2006
- Modified Date:03-Mar-2020
- SUSE Linux Enterprise Desktop
- SUSE Linux Enterprise Desktop
For questions or concerns with the SUSE Knowledgebase please contact: firstname.lastname@example.org