how to remove "advanced options for opensuse" in Grub menu ?

how to remove “advanced options for opensuse” in Grub menu ?

i see in grub menu

**opensuse **
advanced options for opensuse

how can i remove advanced options for opensuse ?

i wanna my grub be like

opensuse

ofcourse

i using this command to remove memtest86

sudo chmod -x /etc/grub.d/20_memtest86+
&&
sudo update-grub

but i cannot find any command to remove this problem

thank you ahead for answers !

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.

i using this command to remove memtest86

sudo chmod -x /etc/grub.d/20_memtest86+
&&
sudo update-grub

And why didn’t you just uninstall the package “memtest86+”?
Then the boot menu entry should disappear as well.

This thread might be of help.

https://forums.opensuse.org/showthread.php/496952-Disabling-countdown-bar-in-GRUB2

This is what I see in the GRUB menu:

OpenSUSE
Advanced Options for OpenSUSE
**
I want my GRUB to look like:
** OpenSUSE

i cannot remove “Advanced Options for OpenSUSE

** how can i remove “Advanced Options for OpenSUSE” in /etc/grub.d/10_linux**

i cannot find my needed question

Yes, but why?
Again, all your installed kernels and the recovery mode are only available under “Advanced Options”.

And what sense does a boot menu have, when there’s nothing to choose (i.e. only one entry)? :wink:

i cannot remove “Advanced Options for OpenSUSE

** how can i remove “Advanced Options for OpenSUSE” in /etc/grub.d/10_linux**

Well, I don’t know.
Have a look at the file and remove the stuff that creates that entry.

I would say, remove line 275, and lines 278 to 283, and 291-293 as well.
But I haven’t tried it, so better keep a backup. :wink:

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)

On 2014-05-31 14:26, wolfi323 wrote:
> But I haven’t tried it, so better keep a backup.

And have a rescue system, because if the system fails to boot because of
the changes, you are hosed.


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.

A very bad idea. Never remove the “Advanced” line as it will remove your option to recover from any boot problems.

No.

It will just make it a bit more difficult. But, still a very bad idea.

after that i should use sudo update-grub ?

because after “sudo reboot” i cannot see any change !
[HR][/HR]

and about my friends previus posts i should say :my grub menu is lock like

opensuse
advanced …
ubuntu
advanced …
win 7
kali
advanced …
centos
advanced…

(linux is all of my live ) :slight_smile:

and this is very painful because i think Grub is very busy and i am not comfort

i wanna clear Grub menu and i wanna to see my customised OS is Grub
I want my GRUB to look like:

**opensuse

ubuntu

win 7

kali

centos**

this is all of things i need to do that

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 !

Yes, of course, you are absolutely correct.

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)

No.
You should run "sudo grub2-mkconfig -o /boot/grub2/grub.cfg to create the new menu.

because after “sudo reboot” i cannot see any change !

You can also run “systemctl reboot”, you don’t need root permissions for that.

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:

#!/bin/sh -e
exec grub2-mkconfig -o /boot/grub/grub.cfg "$@"

Select File → Save as to save the file name as update-grub to your local bin directory in your */home/yourusername/ *partition.

Open konsole or xterm and type:

chmod +x update-grub

Now you can use “sudo update-grub” (without the quotes) to update Grub2.