You would have to edit /etc/grub.d/10_linux and remove the “Advanced Options” submenu there.
But you wouldn’t be able to boot all your installed kernels (and recovery mode) any more.
i wanna my grub be like
opensuse
ofcourse
Why?
If you want your boot menu to be empty, why not just hide it altogether instead? You wouldn’t have to remove anything then.
Set GRUB_TIMEOUT=0 in /etc/default/grub or YaST->System->Boot Loader->Boot Loader Options.
On 2014-05-31 14:16, fun 9990 wrote:
>
> This is what I see in the GRUB menu:
>
> OPENSUSE
> ADVANCED OPTIONS FOR OPENSUSE
>
> I WANT MY GRUB TO LOOK LIKE:
> * OPENSUSE
Why?
Do you fully understand that this damages your system?
> * how can i remove “Advanced Options for OpenSUSE” in
> /etc/grub.d/10_linux*
By editing it properly. It is just a bash script, so…
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
Well, you should still be able to boot your system by using grub2’s rescue mode.
But a rescue/Live system is a good idea anyway of course, especially if you mess around with the boot loader.
I tried it in the meantime and that does indeed remove the “Advanced Options” submenu.
To be sure, you have to remove exactly those lines (the ones marked in red):
submenu_indentation="$grub_tab"
if -z "$boot_device_id" ]; then
boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
fi
# TRANSLATORS: %s is replaced with an OS name
echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {"
fi
linux_entry "${OS}" "${version}" advanced \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_RECOVERY}"
fi
list=`echo $list | tr ' ' '
' | grep -vx $linux | tr '
' ' '`
is_first_entry=false
done
# If at least one kernel was found, then we need to
# add a closing '}' for the submenu command.
if x"$is_first_entry" != xtrue ]; then
echo '}'
fi
echo "$title_correction_code"
Just a small note, that script is not bash it is what the shebang says it is, sh script although /bin/sh is a symlink to /bin/bash in most GNU system including openSUSE they are not the same.
readlink -f /bin/sh
find /bin -type l -name 'sh' -printf '%p points to %l
'
All that trouble just to remove the advance option, and then what? After some boot errors you cannot boot to openSUSE because there is no advance or recovery options? Be careful what you wish for rotfl!
In my opinion, that would be a foolish thing to do. When something goes wrong, an update or an attack, or just a power spike from a lightning strike at just the right moment, or some system error that you make, you might need the Advanced Options to recover.
maybe that be foolish for you but i can repair my Grub menu with repair disk or boot repair 1.98 or another bootable CD like that ,at all i dont need "advanced … " line
after that , this question published because i want to learn that ,
( i can recover basic Grub file after do that )i want test this isue and i think this is not a very importent thing if i do that for one minute !
The beauty of Linux, as I see it, is the endless options for using it the way you want to use it, not how someone else tells you the way you have to use it.
Any repairs to the system can be done using live Linux disks, rescue disks, and command line (hit “e” at the Grub menu and add parameters to the launch line).
But, that assumes that you have a very good understanding of the boot process, disk partitioning, and are reasonably familiar with the command line parameters.
I would tend to think someone asking the original question possibly does not have that understanding, or they would not have to ask that question in the first place.
So, I was attempting to warn about the hazards that abound, to save the person some grief down the road.
But, no one is obligated to do what I say. It is Linux, is a lot easier to fix than other operating systems, if you know how, you can mostly use it the way you want to use it, and Regular Reliable Backups, especially before doing anything invasive to the system, Are Priceless.
On 2014-06-01 20:06, Fraser Bell wrote:
> I would tend to think someone asking the original question possibly does
> not have that understanding, or they would not have to ask that question
> in the first place.
I agree with that.
–
Cheers / Saludos,
Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)
Unlike Ubuntu, openSUSE does not include the update-grub script. However, you can easily create your own update-grub script.
Open your favorite text editor i.e kwrite or kate. Copy the following two lines to your editor: