3
3
3ds2010-11-24 14:56:30
linux
3ds, 2010-11-24 14:56:30

Hide windows from boot menu?

My home laptop has Windows 7 + Ubuntu on top. At startup, the bootloader menu (grub) appears where several options for starting Linux and Windows are selected with the last line.
Question: is it possible to hide Windows from this menu so that by pressing the magic button it appears or immediately loads? Those. so that there are no reminders about not loading.

Answer the question

In order to leave comments, you need to log in

10 answer(s)
K
kekekeks, 2010-11-24
@3ds

1) copy-paste the line related to Windows from grub.cfg to the end of /etc/grub.d/40_custom, rename as needed
2) delete the ill-fated os-prober
3) sudo update-grub

W
wholeman, 2010-11-24
@wholeman

And if you are not too lazy to type a few lines for the sake of Windows, then you can completely remove the mention of it from the menu:
1) Disable prober: sudo chmod -x /etc/grub.d/30_os-prober
2) Update the menu: sudo update-grub
During boot, when the menu appears, press the 'c' key - we see the grub console. We type: We see Windows. If it is not on the first partition of the disk, you need to write to .
root (hd0,1)
chainloader +1
boot

root(hd0,1)root(hd0,номер раздела с Windows)

S
Sergey, 2010-11-24
@bondbig

 cat /boot/grub/menu.lst | grep title
title CentOS (2.6.18-164.15.1.el5)
title CentOS (2.6.18-164.11.1.el5)
title CentOS (2.6.18-164.el5)
title WinXP

Rename the entry "WinXP", for example, to "CentOS failsafe (2.6.18-164.el5)"
Optionally, set a password for grub.

S
Scorpius, 2010-11-24
@Scorpius

it is possible, but not quite so, it can be disguised, say, as an outdated version of the kernel, or it can be excluded from the boot, but then you have to manually write the initialization path.
And how to do it depends on the
version of brute, you can find out the version of brute with the command
dpkg -l | grep grub
and already dance from this

W
wholeman, 2010-11-24
@wholeman

You can generally hide the menu with the parameter GRUB_HIDDEN_TIMEOUTfrom /etc/default/grub, more details here .

W
wholeman, 2010-11-24
@wholeman

Perhaps the directory /etc/grub.dcontains a file 30_os-proberthat update-grubWindows finds on command and writes it to grub.cfg. Then this os-prober needs to be edited so that it calls Windows somehow differently.

W
wholeman, 2010-11-24
@wholeman


menuentry "${LONGNAME} (on ${DEVICE})" {
If there is only one version of Windows, you can replace a little higher with
menuentry "В кавычках просто указать нужное название" {

Y
Yoda33, 2010-11-24
@Yoda33

The easiest way is to use this software:
m.habrahabr.ru/post/105851/?wob=9DibLJ
True, it's Guyo. But the hotkeys in the hornbeam menu are just dreams. eight)

D
Dmitry Sidorov, 2010-11-25
@Doomsday_nxt

A long time ago, I set myself redhat 7.2, when I turned on the computer, it loaded automatically (even the rough menu was not displayed). But if you press shift when loading, then it appears rude, where you can already select Windows or Red Hat ... I don’t know how it’s done now, I think fellow Linux users know :-)

B
baliser, 2016-10-22
@baliser

In the file /etc/grub.d/30_os-prober comment out set timeout_style=menu

adjust_timeout () {
  if [ "$quick_boot" = 1 ] && [ "x${found_other_os}" != "x" ]; then
    cat << EOF
#set timeout_style=menu <-- Закомментировать эту строку
if [ "\${timeout}" = 0 ]; then
  set timeout=10
fi
EOF
  fi
}

In the /etc/default/grub file, make it look like
GRUB_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT=5
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT_STYLE=countdown

update-grub
uname -a
Linux xub 4.4.0-45-generic #66-Ubuntu SMP Wed Oct 19 14:12:05 UTC 2016 i686 i686 i686 GNU/Linux

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question