What to do if your comp stops booting

From time to time we make mistakes, sometimes systems get stuffed after updates or if for whatever reason your system stops booting, here’s a few things you can try.

If you have a DVD drive and a release DVD disk, you can try the system repair tool, it should fix most problems. At least you should be able to boot into your system and fix it. But what if you don’t have a DVD drive?

Note, it’s a great idea to have a Live USB stick handy (here’s instructions: Live USB stick - openSUSE) and a Super Grub Disk (Super Grub Disk Homepage) as your last resorts. And remember, it’s a VERY good idea to have your /home on a separate partition - this will save you heaps of time as all your personal settings and data will be untouched if you have to reinstall the system.

If boot loader is stuffed… try these suggestions: HowTo Boot into openSUSE when it won’t Boot from the Grub Code on the Hard Drive. If they fail, now you can stick the Live USB in and boot into openSUSE Live. From there you’ll have much more options.

Assuming you have
/boot on /dev/sda1
/ on /dev/sda2
/home on /dev/sda3

  1. Mount your system drives (open Shell and type)
    >su
    >mount /dev/sda2 /mnt
    >mount /dev/sda1 /mnt/boot
  2. Open Dolphin and see if you have a system kernel there and initrd in /mnt/boot
  3. It may be that your kernel/system didn’t update properly and something’s broken. So, it may save you a lot of time by downloading a new kernel from the OSS repository and installing it.
  4. Open Firefox and download the release kernel from here: http://download.opensuse.org/distribution/11.2/repo/oss/suse/i586/kernel-desktop-2.6.31.5-0.1.1.i586.rpm for 32-bit or here: http://download.opensuse.org/distribution/11.2/repo/oss/suse/x86_64/kernel-desktop-2.6.31.5-0.1.1.x86_64.rpm for 64-bit.
  5. Now you need to change your root from the Live system to the installed system
    >mount --bind /dev /mnt/dev
    >chroot /mnt
    >mount /proc
    >mount /sys
  6. Now you should be inside the installed system and be able to install the kernel
  7. In Dolphin, go to the kernel rpm you’ve just downloaded and copy it to, say, /mnt/tmp, then
    >rpm -i /mnt/tmp/kernel-default-2.6.31.5-0.1.1-***.rpm (depending on your system)
    (Tip: after typing rpm -i /mnt/tmp/kernel if you hit Tab it should complete the whole file name string for you, will save you time typing and avoid spelling errors)
  8. Now your system and boot loader should be fixed, reboot and then go to YAST and update/repair your system properly

The most important but not obvious thing here is that once you chroot’ed into the installed system, you can do a lot there, the only drawback you’ve only got the command line to work with.

Hope this saves you a lot of headache and time.

Cheers

Thanks linuxoidoz for your contribution. Somehow the post ended up in the wrong area of our “New User How To/FAQ(read only)” section (which is supposed to be read only ! ). I moved it to the “Unreviewed How To and FAQ” area which is the more appropriate place.

Should be rpm -i /tmp/kernel-default-2.6.31.5-0.1.1-***.rpm since it’s after the chroot. Also you might need --force if a later kernel was installed but not properly setup.

ken_yap, thanks for pointing this out (again :)). I noticed it myself right after I clicked submit but there’s no option to edit the post here.