ConfigurationOpenSUSE 12.2 uses GRUB2 by default. It is configured in two ways:
- Yast -> System -> Boot Loader -> Boot Loader Options
- Editing configuration files; see Chapter 10 of the openSUSE 12.2 Reference, and especially:
Section 10.2. Configuration File Structure.
Useful note: A useful thing to know about GRUB in general is that you can edit the command line Grub uses to run the kernel by pressing 'e' at boot time, when Grub is running.
Recovery via YaSTThe really fool-proof way to do it is to use YaST. The only problem is, YaST needs to be running on the system which doesn't boot. Turns out this isn't such an insurmountable problem as it may seem:
First, boot a rescue system.
Second, mount your non-booting machine's root and
/mnt(in the rescue system)
Third, prepare a
# mount -o bind /proc /mnt/proc # mount -o bind /dev /mnt/dev # mount -o bind /sys /mnt/sys
Fourth, chroot into the non-booting system and run YaST:
# chroot /mnt # yast
Fifth, go to System -> Boot Loader and reinstall GRUB2.
exitto leave the
umount /mntand reboot.
If your system becomes unbootable due to a problem with GRUB2 (bootloader), try the following:
- Boot to "another" openSUSE 12.2 (for example, the installation DVD is capable of booting a live system
- Using commands like
blkid, etc., determine the device name of the root filesystem of the non-booting system.
- Mount the non-booting system root (here, we're assuming it's
# mount /dev/sda1 /mnt(If you have a separate
bootpartition, make sure to mount it to
- Now, you need to know exactly where the bootloader is supposed to reside. This will become the sole argument (DEST) to the
/dev/sdaas DEST, for example, if you want to install the bootloader in the MBR:
# grub2-install --force --root-directory=/mnt DEST
Another (probably safer) approach is to use YaST -> System -> Boot Loader. But I don't know if it works from a Live DVD boot.