problem disabling os_prober with dpkg-reconfigure grub-pc

Help for Current Versions of MX
When asking for help, use Quick System Info from MX Tools. It will be properly formatted using the following steps.
1. Click on Quick System Info in MX Tools
2. Right click in your post and paste.
Message
Author
User avatar
asqwerth
Developer
Posts: 8031
Joined: Sun May 27, 2007 5:37 am

problem disabling os_prober with dpkg-reconfigure grub-pc

#1 Post by asqwerth »

This is a strange issue because my MX23-KDE didn't have this problem, only MX23-XFCE (RC). The problem being that os-prober continues to work even though I said no, using dpkg-reconfigure grub-pc. [the question is phrased as "do you want to ENABLE?" instead of the old setting in /etc/default/grub where you say true or false to DISABLE or-prober.]

Last night after updating my Manjaro install which controls grub, there was an issue booting into Manjaro, so I booted into MX23 Xfce. I decided to update grub, then grub-install MX23 XFCE's grub into sda MBR to make it the controlling grub. However, the update-grub took 15-20 mins because os-prober was searching for my numerous distros on the PC. I was puzzled because I could have sworn I had already followed @fehlix 's instructions here: viewtopic.php?p=726015#p726015

to make sure os-prober was disabled when I first installed MX23 XFCE .

Anyway, after the long wait, the new grub-config was generated and I wrote it to MBR with no issues. I assumed there was some grub package updates that had wiped my os-prober disabling.

Today I booted into MX23KDE (official release). After installing all updates, I ran sudo dpkg-reconfigure grub-pc. The GUI popped up, and the interface gave me a choice (Y and N radio buttons) for whether to enable os-prober or not. I said NO. And true enough, grub was updated and installed showing only the MX23 KDE entries.

I booted back into MX23 XFCE and tried first the CLI command given by fehlix -
echo "grub-pc grub2/enable_os_prober boolean false" | sudo debconf-set-selections

Nope, didn't work and I got another LONG update grub process.

I then ran sudo dpkg-reconfigure grub-pc.
This GUI was slightly different from the one in KDE plasma (are there Qt and gtk versions of dpkg-reconfigure??).

Instead of showing 2 radio buttion options for os-prober as in the KDE version of the GUI, this interface only showing a checkbox for "enable os-prober". So the option is tick the box for enable, and don't tick the box for "don't enable". The interface already showed NO TICK, ie, don't enable, so I clicked further on and update-grub started.

However it still ran os-prober and I had to sit through another LONG update grub process that generated all the other distros' entries.

This is puzzling since MX23KDE was fine.

Was there some difference between the RC and the final release that I may have missed? Or is there a significant difference between the KDE and XFCE version when it comes to grub related stuff? eg the qt version is different from gtk version of the dpkg-reconfigure GUI?

QSI of MX23 XFCE-RC

Code: Select all

System:
  Kernel: 6.1.0-13-amd64 [6.1.55-1] arch: x86_64 bits: 64 compiler: gcc v: 12.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1.0-13-amd64 root=UUID=<filter> ro quiet splash
  Desktop: Xfce v: 4.18.1 tk: Gtk v: 3.24.36 info: xfce4-panel wm: Compiz v: 0.8.18 vt: 7
    dm: LightDM v: 1.26.0 Distro: MX-23_x64 Libretto July 24  2023 base: Debian GNU/Linux 12
    (bookworm)
Machine:
  Type: Desktop Mobo: MSI model: H97M-G43(MS-7924) v: 1.0 serial: <superuser required>
    BIOS: American Megatrends v: 2.4 date: 07/22/2014
CPU:
  Info: model: Intel Core i5-4460 bits: 64 type: MCP arch: Haswell gen: core 4 level: v3
    note: check built: 2013-15 process: Intel 22nm family: 6 model-id: 0x3C (60) stepping: 3
    microcode: 0x28
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 2300 min/max: 800/3400 scaling: driver: intel_cpufreq governor: ondemand
    cores: 1: 2300 2: 2300 3: 2300 4: 2300 bogomips: 25599
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW, STIBP: disabled, RSB
    filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-7.5 process: Intel 22nm built: 2013 ports: active: VGA-1
    empty: DP-1, HDMI-A-1, HDMI-A-2, HDMI-A-3 bus-ID: 00:02.0 chip-ID: 8086:0412 class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.7 compositor: Compiz v: 0.8.18 driver: X:
    loaded: modesetting unloaded: fbdev,vesa dri: crocus gpu: i915 display-ID: :0.0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22") s-diag: 582mm (22.93")
  Monitor-1: VGA-1 model: Samsung S22F350 serial: <filter> built: 2017 res: 1920x1080 hz: 60
    dpi: 102 gamma: 1.2 size: 477x268mm (18.78x10.55") diag: 547mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  API: OpenGL v: 4.6 Mesa 22.3.6 renderer: Mesa Intel HD Graphics 4600 (HSW GT2)
    direct-render: Yes
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: Micro-Star MSI
    driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 9 Series Family HD Audio vendor: Micro-Star MSI 9 driver: snd_hda_intel
    v: kernel bus-ID: 00:1b.0 chip-ID: 8086:8ca0 class-ID: 0403
  API: ALSA v: k6.1.0-13-amd64 status: kernel-api tools: alsamixer,amixer
  Server-1: PipeWire v: 0.3.65 status: active with: 1: pipewire-pulse status: active
    2: wireplumber status: active 3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Micro-Star MSI
    driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 02:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives:
  Local Storage: total: 5.57 TiB used: 773.05 GiB (13.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: A-Data model: SP900 size: 119.24 GiB block-size:
    physical: 512 B logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WD30EZRX-00D8PB0 size: 2.73 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A80 scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital model: WD30EZRX-00D8PB0 size: 2.73 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A80 scheme: GPT
Partition:
  ID-1: / raw-size: 57.74 GiB size: 56.53 GiB (97.91%) used: 15.45 GiB (27.3%) fs: ext4
    dev: /dev/sda1 maj-min: 8:1
Swap:
  Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 14.9 GiB used: 0 KiB (0.0%) priority: -2 dev: /dev/sda2
    maj-min: 8:2
Sensors:
  System Temperatures: cpu: 65.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Repos:
  Packages: 2280 pm: dpkg pkgs: 2267 libs: 1153 tools: apt,apt-get,aptitude,nala,synaptic pm: rpm
    pkgs: 0 pm: flatpak pkgs: 13
  No active apt repos in: /etc/apt/sources.list
  Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list
    1: deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/debian.list
    1: deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
    2: deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
  Active apt repos in: /etc/apt/sources.list.d/google-chrome.list
    1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  Active apt repos in: /etc/apt/sources.list.d/mx.list
    1: deb http://it.mxrepo.com/mx/repo/ bookworm main non-free
  Active apt repos in: /etc/apt/sources.list.d/nordvpn.list
    1: deb https://repo.nordvpn.com/deb/nordvpn/debian stable main
  Active apt repos in: /etc/apt/sources.list.d/softmaker.list
    1: deb http://shop.softmaker.com/repo/apt stable non-free
Info:
  Processes: 254 Uptime: 27m wakeups: 1 Memory: 15.49 GiB used: 2.96 GiB (19.1%) Init: SysVinit
  v: 3.06 runlevel: 5 default: graphical tool: systemctl Compilers: gcc: 12 Client: shell wrapper
  v: 5.2.15-release inxi: 3.3.26
Boot Mode: BIOS (legacy, CSM, MBR)
[MX23 KDE is on the same computer, different drive (sdb).]

Terminal output for trying both ways to change the debconf-db flag:

Code: Select all

tuaz@mx23rc3:~
$ echo "grub-pc grub2/enable_os_prober boolean false" | sudo debconf-set-selections
[sudo] password for tuaz:           
tuaz@mx23rc3:~
$ sudo update-grub
Generating grub configuration file ...
Found theme: /boot/grub/themes/mx_linux/theme.txt
Found linux image: /boot/vmlinuz-6.1.0-13-amd64
Found initrd image: /boot/initrd.img-6.1.0-13-amd64
Found linux image: /boot/vmlinuz-6.1.0-12-amd64
Found initrd image: /boot/initrd.img-6.1.0-12-amd64
Found linux image: /boot/vmlinuz-6.1.0-11-amd64
Found initrd image: /boot/initrd.img-6.1.0-11-amd64
Found linux image: /boot/vmlinuz-6.1.0-10-amd64
Found initrd image: /boot/initrd.img-6.1.0-10-amd64
Found Manjaro Linux (23.0.3) on /dev/sda3
Found MX 19.4 patito feo (19.4 ) on /dev/sdb1
Found Artix Linux (rolling) on /dev/sdb11
Found MX 19.4 patito feo (19.4 ) on /dev/sdb15
Found Fedora Linux 37 (Thirty Seven) on /dev/sdb16
Found MX 21.3 Wildflower (21.3) on /dev/sdb18
Found Manjaro Linux (23.0.3) on /dev/sdb2
Found Void Linux on /dev/sdb20
Found MX 21.3 Wildflower (21.3) on /dev/sdb21
Found MX 19.4 patito feo (19.4 ) on /dev/sdb23
Found PCLinuxOS on /dev/sdb4
Found Arch Linux on /dev/sdb5
Found MX 23 Libretto (23) on /dev/sdb6
Found Solus (4.4) on /dev/sdb7
Found KDE neon Testing Edition (22.04) on /dev/sdb8
done

tuaz@mx23rc3:~
$ sudo dpkg-reconfigure grub-pc
grub-pc: Running grub-install ...
Installing for i386-pc platform.
grub-install: warning: File system `ext2' doesn't support embedding.
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
Installation finished. No error reported.
  grub-install success for /dev/sda1
Generating grub configuration file ...
Found theme: /boot/grub/themes/mx_linux/theme.txt
Found linux image: /boot/vmlinuz-6.1.0-13-amd64
Found initrd image: /boot/initrd.img-6.1.0-13-amd64
Found linux image: /boot/vmlinuz-6.1.0-12-amd64
Found initrd image: /boot/initrd.img-6.1.0-12-amd64
Found linux image: /boot/vmlinuz-6.1.0-11-amd64
Found initrd image: /boot/initrd.img-6.1.0-11-amd64
Found linux image: /boot/vmlinuz-6.1.0-10-amd64
Found initrd image: /boot/initrd.img-6.1.0-10-amd64
Found Manjaro Linux (23.0.3) on /dev/sda3
Found MX 19.4 patito feo (19.4 ) on /dev/sdb1
Found Artix Linux (rolling) on /dev/sdb11
Found MX 19.4 patito feo (19.4 ) on /dev/sdb15
Found Fedora Linux 37 (Thirty Seven) on /dev/sdb16
Found MX 21.3 Wildflower (21.3) on /dev/sdb18
Found Manjaro Linux (23.0.3) on /dev/sdb2
Found Void Linux on /dev/sdb20
Found MX 21.3 Wildflower (21.3) on /dev/sdb21
Found MX 19.4 patito feo (19.4 ) on /dev/sdb23
Found PCLinuxOS on /dev/sdb4
Found Arch Linux on /dev/sdb5
Found MX 23 Libretto (23) on /dev/sdb6
Found Solus (4.4) on /dev/sdb7
Found KDE neon Testing Edition (22.04) on /dev/sdb8
done
tuaz@mx23rc3:~
$ 

Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
fehlix
Developer
Posts: 12875
Joined: Wed Apr 11, 2018 5:09 pm

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#2 Post by fehlix »

asqwerth wrote: Fri Oct 13, 2023 2:24 am The problem being that os-prober continues to work even though I said no
Maybe post /etc/default/grub.

User avatar
asqwerth
Developer
Posts: 8031
Joined: Sun May 27, 2007 5:37 am

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#3 Post by asqwerth »

Code: Select all

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(unset PRETTY_NAME; (. /etc/lsb-release; echo ${PRETTY_NAME:?}) 2>/dev/null || echo Debian)"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

#run dpkg-reconfigure grub-pc to allow toggle of os-prober
#GRUB_DISABLE_OS_PROBER=false

#GRUB_DISABLE_OS_PROBER=false
if [ -e /etc/default/grub.mx-defaults ]; then
     .  /etc/default/grub.mx-defaults
fi
#GRUB_DISABLE_OS_PROBER=false

GRUB_THEME="/boot/grub/themes/mx_linux/theme.txt"
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
asqwerth
Developer
Posts: 8031
Joined: Sun May 27, 2007 5:37 am

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#4 Post by asqwerth »

THis is the /etc/default/grub from MX23 KDE

Code: Select all

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(unset PRETTY_NAME; (. /etc/lsb-release; echo ${PRETTY_NAME:?}) 2>/dev/null || echo Debian)"
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

#run dpkg-reconfigure grub-pc to allow toggle of os-prober
#GRUB_DISABLE_OS_PROBER=false

#GRUB_DISABLE_OS_PROBER=false
if [ -e /etc/default/grub.mx-defaults ]; then
     .  /etc/default/grub.mx-defaults
fi
#GRUB_DISABLE_OS_PROBER=false

GRUB_THEME="/boot/grub/themes/mx_linux/theme.txt"
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
fehlix
Developer
Posts: 12875
Joined: Wed Apr 11, 2018 5:09 pm

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#5 Post by fehlix »

OK, some more "questions":

Code: Select all

sudo debconf-get-selections | grep grub2/enable_os_prober

and

Code: Select all

head  /etc/grub.d/30_os-prober

User avatar
asqwerth
Developer
Posts: 8031
Joined: Sun May 27, 2007 5:37 am

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#6 Post by asqwerth »

Code: Select all

$ sudo debconf-get-selections | grep grub2/enable_os_prober

[sudo] password for tuaz:           
grub-pc	grub2/enable_os_prober	boolean	false

Code: Select all

$ head  /etc/grub.d/30_os-prober
#! /bin/sh

#tag for mx-system update
#mx-system 20.11.02+4

export LVM_SUPPRESS_FD_WARNINGS=true

if [ "x$(debconf-get-selections |grep  '^grub-pc\sgrub2/enable_os_prober\sboolean\strue' | awk '{print $4}')" = "xtrue" ]; then
   export GRUB_DISABLE_OS_PROBER="false"
fi
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
fehlix
Developer
Posts: 12875
Joined: Wed Apr 11, 2018 5:09 pm

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#7 Post by fehlix »

OK, I may see what it is, and guess they changed somewhere their logic a bit.
Assuming you are not needing a quick solution now,
but rather something for the next intended update-grub run,
I'd prefer to run some other tests esp. for cases where a grub-package upgrade comes along.

Otherwise if you want a potential solution now and perhaps in case you are going to help to check this proposed solution:
May be run this - but only once:

Code: Select all

sudo sed -i '/export GRUB_DISABLE_OS_PROBER/aelse\n   export GRUB_DISABLE_OS_PROBER="true"' /etc/grub.d/30_os-prober

The one-liner with change those lines at the beginning of /etc/grub.d/30_os-prober
from

Code: Select all

if [ "x$(debconf-get-selections |grep  '^grub-pc\sgrub2/enable_os_prober\sboolean\strue' | awk '{print $4}')" = "xtrue" ]; then
   export GRUB_DISABLE_OS_PROBER="false"
fi
to

Code: Select all

if [ "x$(debconf-get-selections |grep  '^grub-pc\sgrub2/enable_os_prober\sboolean\strue' | awk '{print $4}')" = "xtrue" ]; then
   export GRUB_DISABLE_OS_PROBER="false"
else
   export GRUB_DISABLE_OS_PROBER="true"
fi
and by this change probably achieve the intended goal.
Please try it and let us know.
Thanks

User avatar
asqwerth
Developer
Posts: 8031
Joined: Sun May 27, 2007 5:37 am

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#8 Post by asqwerth »

No worries, I'll be your guinea pig!

Before I run the commands, the first one says:

sudo sed -i '/export GRUB_DISABLE_OS_PROBER/aelse\n export GRUB_DISABLE_OS_PROBER="true"' /etc/grub.d/30_os-prober

Is it really "aelse" ?
Desktop: Intel i5-4460, 16GB RAM, Intel integrated graphics
Clevo N130WU-based Ultrabook: Intel i7-8550U (Kaby Lake R), 16GB RAM, Intel integrated graphics (UEFI)
ASUS X42D laptop: AMD Phenom II, 6GB RAM, Mobility Radeon HD 5400

User avatar
m_pav
Developer
Posts: 1857
Joined: Sun Aug 06, 2006 3:02 pm

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#9 Post by m_pav »

asqwerth wrote: Fri Oct 13, 2023 5:03 am Is it really "aelse" ?
Exactly what I thought. Ran todays updates, sure enough it lost the the GRUB Windows entry on my spare dual-boot machine, then manually edited in the changes and gave it a test, all it added was a memtest-64.efi, it did not pick up Windows
Mike P

Regd Linux User #472293
(Daily) Lenovo T560, i7-6600U, 16GB, 2.0TB SSD, MX_ahs
(ManCave) AMD Ryzen 5 5600G, 32G, 8TB mixed, MX_ahs
(Spare)2017 Macbook Air 7,2, 8GB, 256GB SSD, MX_ahs

User avatar
fehlix
Developer
Posts: 12875
Joined: Wed Apr 11, 2018 5:09 pm

Re: problem disabling os_prober with dpkg-reconfigure grub-pc

#10 Post by fehlix »

asqwerth wrote: Fri Oct 13, 2023 5:03 am No worries, I'll be your guinea pig!

Before I run the commands, the first one says:

sudo sed -i '/export GRUB_DISABLE_OS_PROBER/aelse\n export GRUB_DISABLE_OS_PROBER="true"' /etc/grub.d/30_os-prober

Is it really "aelse" ?
yes, in "aelse" the "a" is a sed command, which means: append a new line with all the following text.
which means:
the sed command expression
aelse\n export GRUB_DISABLE_OS_PROBER="true"

appends a new line

else\n export GRUB_DISABLE_OS_PROBER="true"

where \n is also replaced with an addtional new-line
which gives:

Code: Select all

else
   export GRUB_DISABLE_OS_PROBER="true"

Post Reply

Return to “MX Help”