1

I have a laptop with a tripleboot of three Linux installs: Kali Linux 2.0 and two times Debian 8.2 (one for gaming and one for development). I wanted to disable the recovery options, so I uncommented #GRUB_DISABLE_RECOVERY="true" in /etc/default/grub.

This succesfully removed the recovery options from Kali Linux (the system where update-grub was run). However, this didn't disable the recovery options for the two Debian installs. How can I disable the recovery options for the two Debian installs without manually editing /boot/grub/grub.cfg?

Result of cat /boot/grub/grub.cfg | grep 'recovery' before uncommenting:

menuentry 'Kali GNU/Linux, with Linux 4.0.0-kali1-amd64 (recovery mode)' --class kali --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.0.0-kali1-amd64-recovery-1a2ddb7f-7fc3-40b5-b226-ed5cf940205e' {
menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (recovery mode) (on /dev/mapper/ROOT--VG-DEBIAN--DEV)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-4-amd64-root=/dev/mapper/ROOT--VG-DEBIAN--DEV ro single-60442acd-d36a-4d7d-90c8-515281fe68d8' {
menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (recovery mode) (on /dev/mapper/ROOT--VG-GAME--ROOT)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-4-amd64-root=/dev/mapper/ROOT--VG-GAME--ROOT ro single-1b27071e-4fcb-41c2-b9c8-01bccf90a10c' {

And after:

menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (recovery mode) (on /dev/mapper/ROOT--VG-DEBIAN--DEV)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-4-amd64-root=/dev/mapper/ROOT--VG-DEBIAN--DEV ro single-60442acd-d36a-4d7d-90c8-515281fe68d8' {
menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (recovery mode) (on /dev/mapper/ROOT--VG-GAME--ROOT)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.16.0-4-amd64-root=/dev/mapper/ROOT--VG-GAME--ROOT ro single-1b27071e-4fcb-41c2-b9c8-01bccf90a10c' {

If it matters, here is my disklayout:

  • /dev/sda1 mounted to /boot
  • /dev/sda2 extended partition
    • /dev/sda5 lvm volume with ROOT-VG volume groum
      • /dev/ROOT-VG/GAME-ROOT
        • ext4 partition mounted to / in gaming machine
      • /dev/ROOT-VG/DEBIAN-DEV
        • ext4 partition mounted to / in development machine
    • /dev/sda6 luks-encrypted volume
      • ext4 partition mounted to / in Kali Linux

Grub version: 2.02~beta2-22+deb8u1

1 Answer 1

1

After investigating how the grub os-prober script works, I found that linux-boot-prober is responsible for the detection of options on a Linux OS. linux-boot-prober looks to the /boot/grub/grub.cfg to determine the options. To disable the recovery, you have to chroot into the OS, edit the /etc/default/grub file to disable the recovery options and then run update-grub. Be cautious though, this might update your grub configuration. To prevent this, run install-grub /dev/sda && update-grub && install-grub /dev/sda once you are out of the chroot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .