Grub -> Not show failsafe

Hello!

I have installed OpenSUSE 12.1 on my system. Now during the system boot Grub asks me whether to start OpenSUSE Desktop or OpenSUSE Failsafe.

Is there any way to unshow the Failsafe option? Maybe by configuring Grub?

Sincerely

Failsafe best left as very useful :

Automatic selection usually will be your first option OpenSUSE Desktop.

See manual here: 7.4.

Where you will see :

The failsafe entry boots a Linux kernel with a number of kernel parameters that enable booting Linux even if the hardware is causing problems.

Self during past 4+ years since moved to Linux several occasions Failsafe has been very useful to resolve problems encountered - usually consequences of something self has done whilst learning things…

Everything is working fine in my system. I don’t need the failsafe.

In parallel I have Ubuntu installed on the system from which I have configured Grub. There the information about other systems than Ubuntu is pulled from /etc/grub.d/30_os-prober.
I assume that Grub walks through all the partitions checking for a /boot in each one and looking for kernels in it. Am I right?

Now where do I have to solve the issue of only showing one entry for OpenSUSE? Do I have to do that in OpenSUSE respectably or do I have to solve this in Ubuntu where I am managing Grub from?

Sincerely

On 2012-02-07 00:36, mawwl wrote:
>
> Everything is working fine in my system. I don’t need the failsafe.

Ah…

Famous last words™

> I assume that Grub walks through all the partitions checking for a
> /boot in each one and looking for kernels in it. Am I right?

No.

> Now where do I have to solve the issue of -only- showing one entry for
> OpenSUSE? Do I have to do that in OpenSUSE respectably or do I have to
> solve this in Ubuntu where I am managing Grub from?

I’m not going to say. Prove that you know enough not to need that entry by
solving the issue on your own, using only text mode command line >:-)


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Yes, very well said.

or do I have to solve this in Ubuntu where I am managing Grub from?

Failsafe is there for a reason.
Ubuntu picks up the the info from SUSE and writes it to the Grub2 configuration.
What exactly is the problem or is this just a cosmetic request?

Yes, you’re right. The problem is that all versions of os-prober at the moment, whether for Ubuntu, Fedora or openSUSE (the latest one is available in my repo) are more or less buggy. They sometimes fail to detect OSes or write incomplete entries. They never managed to parse Mandriva’s syntax correctly. Now they don’t get Fedora 16 boot entries. I suspect that both, os-prober (doesn’t always find other Linuxes unless partitions are mounted) and linux-boot-prober (doesn’t always write kernel options, maybe doesn’t even read menu.lst but just guesses*) have problems. I haven’t seen cases where they would not add Failsafe entries, but it wouldn’t surprise me that much.

  • Well, actually it’s the same version: 1.49 or 1.48. I’m waiting for 1.50.

Hey everyone!

Thanks to all for your helpful and quick replies.

I have quite few partitions around the HDD and I have installed Windows 7, Ubuntu, Fedora 16, and OpenSUSE 12.1.
Now, when I run Grub over it, I find several entries for each operating system in the boot list.
Therefore I want to take out all the entries I don’t use. In this manner it indeed is a cosmetic issue.

However, I try to avoid debugging and reporgramming /etc/grub.d/30_os-prober as this might take hours, if not even days.

As I understand it till now there are the two possibilities

  • of debugging /etc/grub.d/30_os-prober out of Ubuntu
  • and of fixing this in OpenSUSE.

Does anybody know what to do in OpenSUSE?

Sincerely

I understand. Here’s a small script that might help.

#! /bin/bash
# updategrub for Ubuntu
# this script is different from the updategrub script used for Legacy Grub
cp /boot/grub/grub.cfg{,.nig}
osver=$(lsb_release -sd)
oscod=$(lsb_release -sc)
echo '### BEGIN /etc/grub.d/30_os-prober ###' > /tmp/menuentries.tmp
sed -n '/### BEGIN \/etc\/grub.d\/30_os-prober ###/,/### END \/etc\/grub.d\/30_os-prober ###/p' /boot/grub/grub.cfg | sed '/^#/d;s/^}/}#/' | tr "
" "|" | tr "#" "
" | sed 's/|menuentry/menuentry/' | sed '/fallback/d;/single-user/d;/failsafe/d;/rescue/d;/recovery/d' | sort | tr "|" "
" | sed '/^$/d' >> /tmp/menuentries.tmp
sed -n '/### END \/etc\/grub.d\/30_os-prober ###/,$p' /boot/grub/grub.cfg >> /tmp/menuentries.tmp
cat << EOFSED | sed -f - /boot/grub/grub.cfg.nig > /boot/grub/grub.cfg 
s|menuentry 'Ubuntu, with Linux|menuentry '$osver ($oscod) - kernel|
/### BEGIN \/etc\/grub.d\/30_os-prober ###/,\$d
EOFSED
cat /tmp/menuentries.tmp >> /boot/grub/grub.cfg
sed -i 's|vga=0x31a|vga=794|' /boot/grub/grub.cfg

I wrote it for Ubuntu to get rid of the failsafe, rescue and other single user boot entries of other kernels. I called it “updategrub” but it has absolutely nothing to do with updategrub for openSUSE Legacy Grub (not update-grub!). I run it just after update-grub on Ubuntu to clean those entries.

It would be the right way to do it though. I have to take a closer look at that one when I have a moment. If you look at your Fedora 16 entries in Ubuntu /boot/grub/grub.cfg, the options should be missing in the line booting the kernel (starting with “linux”). Such entries would boot Fedora’s kernel without any option. It might work or not. Fedora 15 entries were OK. Maybe it’s because Fedora 16 now uses Grub2 on Legacy BIOS systems and puts its configuration in /boot/grub2. So does openSUSE too if you install Grub2 on it.

Yes: Nothing! Don’t touch the failsafe entries in openSUSE. Nobody would remove these entries because he doesn’t want to see them in Ubuntu’s boot menu.

  • updategrub for openSUSE is actually better than Ubuntu’s update-grub - but everybody here knows that already … :wink: Well … not everybody. Anyways, it has an option to enable/disable Failsafe and chainload entries.

A thing you could do, is comment out the entry in /boot/grub/menu.lst but I wouldn’t recommend it. In case of trouble you would need to boot from a LiveCD to uncomment it or know what to add as boot options to get a failsafe boot.