[SOLVED] Debian's GRUB doesn't get along with other distro's

If none of the more specific forums is the right place to ask

Re: Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2018-12-19 04:53

p.H wrote:Couldn't you find an even worse location ? I was unable to download the file. Anything I did just displayed junk ads.
You don't have to upload the file as an attachment. You can post its contents in a code block.

Well, I tested downloading and I was able to. I figured anyone could do it. Maybe not everyone can see the real deal among all the junk ads.

I imagine this post will look messy, but there it is. There you go.

Code: Select all
                  Boot Info Script 0.61      [1 April 2012]


============================= Boot Info Summary: ===============================

 => Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    in partition 85 for .

sda1: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  Manjaro Linux () ()
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda2: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System: 
    Boot files:       

sda3: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info:

sda5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  Debian GNU/Linux 9
    Boot files:        /boot/grub/grub.cfg /etc/fstab

sda6: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info:
    Operating System:  Arch Linux ()
    Boot files:        /etc/fstab

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disco /dev/sda: 931,5 GiB, 1000204886016 bytes, 1953525168 sectores
Unidades: sectores de 1 * 512 = 512 bytes
Tamaño de sector (lógico/físico): 512 bytes / 4096 bytes
Tamaño de E/S (mínimo/óptimo): 4096 bytes / 4096 bytes
Tipo de etiqueta de disco: dos

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1    *          2,048   296,548,351   296,546,304  83 Linux
/dev/sda2       1,175,713,792 1,953,523,711   777,809,920  83 Linux
/dev/sda3         296,550,398 1,175,713,791   879,163,394   5 Extended
/dev/sda5         296,550,400   439,322,623   142,772,224  83 Linux
/dev/sda6         439,324,672   541,136,895   101,812,224  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        e98914f9-05af-43aa-9d13-7e3ff622a20e   ext4       
/dev/sda2        2beaa582-851c-4396-bad9-4903c4f9be89   ext4       Datos
/dev/sda5        4a075738-83db-4f48-b4b9-045e5d88060f   ext4       Debian
/dev/sda6        5ccd788d-6f30-4d0a-9677-dc162b580073   ext4       ArchLinux

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sda5        /                        ext4       (rw,relatime,errors=remount-ro,data=ordered)


=========================== sda1/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
else
  search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=es_BO
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
else
  search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
fi
insmod gfxmenu
loadfont ($root)/boot/grub/themes/starfield/dejavu_10.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_12.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_14.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_16.pf2
loadfont ($root)/boot/grub/themes/starfield/dejavu_bold_14.pf2
insmod png
set theme=($root)/boot/grub/themes/starfield/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/01_menu_auto_hide ###
if [ "${boot_success}" = "1" -o "${boot_indeterminate}" = "1" ]; then
  set last_boot_ok=1
else
  set last_boot_ok=0
fi

# Reset boot_indeterminate after a successful boot
if [ "${boot_success}" = "1" ] ; then
  set boot_indeterminate=0
# Avoid boot_indeterminate causing the menu to be hidden more then once
elif [ "${boot_indeterminate}" = "1" ]; then
  set boot_indeterminate=2
fi
set boot_success=0
save_env boot_success boot_indeterminate

if [ x$feature_timeout_style = xy ] ; then
  if [ "${menu_show_once}" ]; then
    unset menu_show_once
    save_env menu_show_once
    set timeout_style=menu
    set timeout=60
  elif [ "${menu_auto_hide}" -a "${last_boot_ok}" = "1" ]; then
    set orig_timeout_style=${timeout_style}
    set orig_timeout=${timeout}
    if [ "${fastboot}" = "1" ]; then
      # timeout_style=menu + timeout=0 avoids the countdown code keypress check
      set timeout_style=menu
      set timeout=0
    else
      set timeout_style=hidden
      set timeout=1
    fi
  fi
fi
### END /etc/grub.d/01_menu_auto_hide ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-e98914f9-05af-43aa-9d13-7e3ff622a20e' {
   savedefault
   load_video
   set gfxpayload=keep
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
   else
     search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
   fi
   linux   /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw  quiet
   initrd   /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img
}
submenu 'Opciones avanzadas para Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-e98914f9-05af-43aa-9d13-7e3ff622a20e' {
   menuentry 'Manjaro Linux (Kernel: 4.14.78-1-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.14.78-1-MANJARO x64-advanced-e98914f9-05af-43aa-9d13-7e3ff622a20e' {
   savedefault
      load_video
      set gfxpayload=keep
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
      else
        search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
      fi
      linux   /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw  quiet
      initrd   /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img
   }
   menuentry 'Manjaro Linux (Kernel: 4.14.78-1-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.14.78-1-MANJARO x64-fallback-e98914f9-05af-43aa-9d13-7e3ff622a20e' {
      load_video
      set gfxpayload=keep
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
      else
        search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
      fi
      linux   /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw  quiet
      initrd   /boot/initramfs-4.14-x86_64-fallback.img
   }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Debian GNU/Linux 9 (stretch) (en /dev/sda5)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-4a075738-83db-4f48-b4b9-045e5d88060f' {
   savedefault
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos5'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
   else
     search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
   fi
   linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro quiet
   initrd /boot/initrd.img-4.9.0-8-amd64
}
submenu 'Opciones avanzadas para Debian GNU/Linux 9 (stretch) (en /dev/sda5)' $menuentry_id_option 'osprober-gnulinux-advanced-4a075738-83db-4f48-b4b9-045e5d88060f' {
   menuentry 'Debian GNU/Linux (en /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-8-amd64--4a075738-83db-4f48-b4b9-045e5d88060f' {
      savedefault
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro quiet
      initrd /boot/initrd.img-4.9.0-8-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64 (en /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-8-amd64--4a075738-83db-4f48-b4b9-045e5d88060f' {
      savedefault
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro quiet
      initrd /boot/initrd.img-4.9.0-8-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64 (recovery mode) (en /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-8-amd64-root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro single-4a075738-83db-4f48-b4b9-045e5d88060f' {
      savedefault
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      linux /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro single
      initrd /boot/initrd.img-4.9.0-8-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-7-amd64 (en /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-7-amd64--4a075738-83db-4f48-b4b9-045e5d88060f' {
      savedefault
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      linux /boot/vmlinuz-4.9.0-7-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro quiet
      initrd /boot/initrd.img-4.9.0-7-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-7-amd64 (recovery mode) (en /dev/sda5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.9.0-7-amd64-root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro single-4a075738-83db-4f48-b4b9-045e5d88060f' {
      savedefault
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      linux /boot/vmlinuz-4.9.0-7-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro single
      initrd /boot/initrd.img-4.9.0-7-amd64
   }
}

menuentry 'Arch Linux (en /dev/sda6)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5ccd788d-6f30-4d0a-9677-dc162b580073' {
   savedefault
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos6'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  5ccd788d-6f30-4d0a-9677-dc162b580073
   else
     search --no-floppy --fs-uuid --set=root 5ccd788d-6f30-4d0a-9677-dc162b580073
   fi
   linux /boot/vmlinuz-linux root=/dev/sda6
   initrd /boot/initramfs-linux.img
}
submenu 'Opciones avanzadas para Arch Linux (en /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-5ccd788d-6f30-4d0a-9677-dc162b580073' {
   menuentry 'Arch Linux (en /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--5ccd788d-6f30-4d0a-9677-dc162b580073' {
      savedefault
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  5ccd788d-6f30-4d0a-9677-dc162b580073
      else
        search --no-floppy --fs-uuid --set=root 5ccd788d-6f30-4d0a-9677-dc162b580073
      fi
      linux /boot/vmlinuz-linux root=/dev/sda6
      initrd /boot/initramfs-linux.img
   }
}

# Other OS found, undo autohiding of menu unless menu_auto_hide=2
if [ "${orig_timeout_style}" -a "${menu_auto_hide}" != "2" ]; then
  set timeout_style=${orig_timeout_style}
  set timeout=${orig_timeout}
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
        linux16 /boot/memtest86+/memtest.bin
    }
fi
### END /etc/grub.d/60_memtest86+ ###
--------------------------------------------------------------------------------

=============================== sda1/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e /              ext4    defaults,noatime 0 1
/swapfile none swap defaults 0 0
--------------------------------------------------------------------------------

=================== sda1: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


=========================== sda5/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
else
  search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
else
  search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
fi
insmod png
if background_image /usr/share/desktop-base/softwaves-theme/grub/grub-4x3.png; then
  set color_normal=white/black
  set color_highlight=black/white
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
   set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4a075738-83db-4f48-b4b9-045e5d88060f' {
   load_video
   insmod gzio
   if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos5'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
   else
     search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
   fi
   echo   'Loading Linux 4.9.0-8-amd64 ...'
   linux   /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro  quiet
   echo   'Loading initial ramdisk ...'
   initrd   /boot/initrd.img-4.9.0-8-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-4a075738-83db-4f48-b4b9-045e5d88060f' {
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-8-amd64-advanced-4a075738-83db-4f48-b4b9-045e5d88060f' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      echo   'Loading Linux 4.9.0-8-amd64 ...'
      linux   /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.9.0-8-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-8-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-8-amd64-recovery-4a075738-83db-4f48-b4b9-045e5d88060f' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      echo   'Loading Linux 4.9.0-8-amd64 ...'
      linux   /boot/vmlinuz-4.9.0-8-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.9.0-8-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-7-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-7-amd64-advanced-4a075738-83db-4f48-b4b9-045e5d88060f' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      echo   'Loading Linux 4.9.0-7-amd64 ...'
      linux   /boot/vmlinuz-4.9.0-7-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.9.0-7-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.9.0-7-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-7-amd64-recovery-4a075738-83db-4f48-b4b9-045e5d88060f' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  4a075738-83db-4f48-b4b9-045e5d88060f
      else
        search --no-floppy --fs-uuid --set=root 4a075738-83db-4f48-b4b9-045e5d88060f
      fi
      echo   'Loading Linux 4.9.0-7-amd64 ...'
      linux   /boot/vmlinuz-4.9.0-7-amd64 root=UUID=4a075738-83db-4f48-b4b9-045e5d88060f ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.9.0-7-amd64
   }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Manjaro Linux (18.0.0) (on /dev/sda1)' --class manjarolinux --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-e98914f9-05af-43aa-9d13-7e3ff622a20e' {
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
   else
     search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
   fi
   linux /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw quiet
   initrd /boot/intel-ucode.img
}
submenu 'Advanced options for Manjaro Linux (18.0.0) (on /dev/sda1)' $menuentry_id_option 'osprober-gnulinux-advanced-e98914f9-05af-43aa-9d13-7e3ff622a20e' {
   menuentry 'Manjaro Linux (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.14-x86_64--e98914f9-05af-43aa-9d13-7e3ff622a20e' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
      else
        search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
      fi
      linux /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw quiet
      initrd /boot/intel-ucode.img
   }
   menuentry 'Manjaro Linux (Kernel 4.14.78-1-MANJARO x64) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.14-x86_64--e98914f9-05af-43aa-9d13-7e3ff622a20e' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
      else
        search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
      fi
      linux /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw quiet
      initrd /boot/intel-ucode.img
   }
   menuentry 'Manjaro Linux (Kernel 4.14.78-1-MANJARO x64 - fallback initramfs) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.14-x86_64--e98914f9-05af-43aa-9d13-7e3ff622a20e' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  e98914f9-05af-43aa-9d13-7e3ff622a20e
      else
        search --no-floppy --fs-uuid --set=root e98914f9-05af-43aa-9d13-7e3ff622a20e
      fi
      linux /boot/vmlinuz-4.14-x86_64 root=UUID=e98914f9-05af-43aa-9d13-7e3ff622a20e rw quiet
      initrd /boot/initramfs-4.14-x86_64-fallback.img
   }
}

menuentry 'Arch Linux (on /dev/sda6)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5ccd788d-6f30-4d0a-9677-dc162b580073' {
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos6'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  5ccd788d-6f30-4d0a-9677-dc162b580073
   else
     search --no-floppy --fs-uuid --set=root 5ccd788d-6f30-4d0a-9677-dc162b580073
   fi
   linux /boot/vmlinuz-linux root=/dev/sda6
   initrd /boot/initramfs-linux.img
}
submenu 'Advanced options for Arch Linux (on /dev/sda6)' $menuentry_id_option 'osprober-gnulinux-advanced-5ccd788d-6f30-4d0a-9677-dc162b580073' {
   menuentry 'Arch Linux (on /dev/sda6)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-linux--5ccd788d-6f30-4d0a-9677-dc162b580073' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6  5ccd788d-6f30-4d0a-9677-dc162b580073
      else
        search --no-floppy --fs-uuid --set=root 5ccd788d-6f30-4d0a-9677-dc162b580073
      fi
      linux /boot/vmlinuz-linux root=/dev/sda6
      initrd /boot/initramfs-linux.img
   }
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda5 during installation
UUID=4a075738-83db-4f48-b4b9-045e5d88060f /               ext4    errors=remount-ro 0       1
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/swapfile none swap defaults 0 0
--------------------------------------------------------------------------------

=================== sda5: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


=============================== sda6/etc/fstab: ================================

--------------------------------------------------------------------------------
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda6 LABEL=ArchLinux
UUID=5ccd788d-6f30-4d0a-9677-dc162b580073   /            ext4         rw,relatime   0 1

--------------------------------------------------------------------------------

=================== sda6: Location of files loaded by Grub: ====================

           GiB - GB             File                                 Fragment(s)


======================== Unknown MBRs/Boot Sectors/etc: ========================

Unknown BootLoader on sda3

00000000  44 24 08 0e 00 00 00 89  44 24 04 89 8d 98 fb ff  |D$......D$......|
00000010  ff e8 3e cc fe ff 8b 95  94 fb ff ff 8b 8d 98 fb  |..>.............|
00000020  ff ff 83 ec 14 85 c0 74  0d 83 bd c4 fb ff ff 0e  |.......t........|
00000030  0f 84 7e 01 00 00 89 0c  24 e8 12 ca fe ff 83 ec  |..~.....$.......|
00000040  04 8d b4 26 00 00 00 00  31 d2 66 83 bd e0 fd ff  |...&....1.f.....|
00000050  ff 00 75 7f 8b b5 ac fb  ff ff 89 95 94 fb ff ff  |..u.............|
00000060  89 34 24 e8 20 c8 fe ff  8b 95 94 fb ff ff 83 ec  |.4$. ...........|
00000070  04 e9 8c fb ff ff 66 90  66 83 bd b4 fb ff ff 00  |......f.f.......|
00000080  0f 84 c2 00 00 00 66 83  bd b2 fb ff ff 00 0f 85  |......f.........|
00000090  9e fb ff ff c7 04 24 0e  00 00 00 89 8d 98 fb ff  |......$.........|
000000a0  ff e8 92 c0 fe ff 8b 8d  98 fb ff ff 83 ec 04 66  |...............f|
000000b0  89 85 b2 fb ff ff e9 77  fb ff ff 8b b5 a8 fb ff  |.......w........|
000000c0  ff 89 34 24 e8 bf c7 fe  ff 31 d2 83 ec 04 e9 2f  |..4$.....1...../|
000000d0  fb ff ff 8d 85 e0 fd ff  ff 89 04 24 89 95 94 fb  |...........$....|
000000e0  ff ff e8 99 c9 fe ff 8b  95 94 fb ff ff 83 ec 04  |................|
000000f0  e9 5f ff ff ff 8d 76 00  c7 04 24 0b 00 00 00 89  |._....v...$.....|
00000100  8d 98 fb ff ff e8 2e c0  fe ff 8b 8d 98 fb ff ff  |................|
00000110  83 ec 04 66 89 85 b4 fb  ff ff e9 97 fd ff ff 90  |...f............|
00000120  c7 04 24 0c 00 00 00 89  8d 98 fb ff ff e8 06 c0  |..$.............|
00000130  fe ff 8b 8d 98 fb ff ff  83 ec 04 66 89 85 b2 fb  |...........f....|
00000140  ff ff e9 7d fd ff ff 90  c7 04 24 0d 00 00 00 89  |...}......$.....|
00000150  8d 98 fb ff ff e8 de bf  fe ff 8b 8d 98 fb ff ff  |................|
00000160  83 ec 04 66 89 85 b4 fb  ff ff e9 17 ff ff ff 8b  |...f............|
00000170  83 5c 80 00 00 8d 93 5c  80 00 00 39 d0 75 13 e9  |.\.....\...9.u..|
00000180  b5 fb ff ff 8d 74 26 00  8b 00 39 d0 0f 84 a7 fb  |.....t&...9.....|
00000190  ff ff 66 3b 48 08 75 f0  66 3b 70 0a 75 ea 0f b7  |..f;H.u.f;p.u...|
000001a0  50 0e 83 40 10 01 66 85  d2 0f 85 53 fa ff ff e9  |P..@..f....S....|
000001b0  85 fb ff ff 89 0c 24 c7  44 24 10 00 00 00 00 fe  |......$.D$......|
000001c0  ff ff 83 fe ff ff 02 00  00 00 00 88 82 08 00 fe  |................|
000001d0  ff ff 05 fe ff ff 02 88  82 08 00 90 11 06 00 00  |................|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200


=============================== StdErr Messages: ===============================

cat: /tmp/BootInfo-pzypYyVO/Tmp_Log: No existe el fichero o el directorio
cat: /tmp/BootInfo-pzypYyVO/Tmp_Log: No existe el fichero o el directorio
cat: /tmp/BootInfo-pzypYyVO/Tmp_Log: No existe el fichero o el directorio




p.H wrote:No, you don't. /usr/sbin is in root's default $PATH.

Then why it didn't simply work?

p.H wrote:boot-info-script does just this. The trick is that the package name is boot-info-script and the command name is bootinfoscript.

It seemed to me that it is different here on Debian, just like other things that didn't work the way I expected. Do you think I had not tried running it that way? I should have stated before that I had also tried running
Code: Select all
# sudo bootinfoscript

but I still got a command not found response. Seems I misstyped or something, Trying it again it just worked. Quite strange.

p.H wrote:Of course not. Why would it ? Regenerating Manjaro's grub.cfg has no direct effect on Debian's GRUB. If you want to wipe Debian's GRUB from the MBR and replace it with Manjaro's, you must use grub-install, not grub-mkconfig.

Well, If grub-mkconfig were to set Manjaro's GRUB as the default in the machine it would work, but it didn't, so Debian's GRUB is still the default one. I was fearing that would be the case and I was dissapointed to confirm it. Whatever command the Debian updates ran it was not grub-install, and still that command has indeed set Debian's GRUB as the default one, leaving Manjaro's aside, dormant, hidden, as if it didn't exist, but it does exist.

Anyways, all this mess wouldn't happen if all distro's GRUB were more friendly with each other or simply detected the presence of another distro's GRUB and avoided this bad updating.
Grub install huh? I guess I will run Manjaro in a live session, mount the drive where it is installed and do something like in Arch (I imagine there is an equivalent to arch-chroot and run grub-install) but then what? How do I wipe Debian's GRUB?
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 8
Joined: 2018-11-13 03:05

Re: Debian's GRUB doesn't get along with other distro's

Postby bw123 » 2018-12-19 17:16

Isakku wrote:...
=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
in partition 85 for .
...


bootinfoscript is broken. Thanks for letting people know. I didn't see the bug reported, but since the project hasn't been updated since 2012, I'll assume it is abandoned. The output above should show what partition and grub.cfg it is using. (and the correct grub ver)

Another way to get the info is hit 'c' at the grub menu, then type 'set' and look for 'prefix' and that should? tell you what partition the core.img is looking for.

I think maybe your problem is you don't understand how to use and maintain a multiboot system, not debian's grub? I get confused all the time, that's why I only have one grub installed on multiboot.
User avatar
bw123
 
Posts: 3679
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian's GRUB doesn't get along with other distro's

Postby milomak » 2018-12-19 20:38

boot into manjaro

run grub-install on it

reboot. see which grub loads

if manjaro grub loaded, boot debian and remove grub
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Debian Sid (External SSD)
Laptop: Lenovo ideapad Y700 [nVidia Optimus] (64-bit) - Debian Sid, Win10,
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Debian Sid
milomak
 
Posts: 1867
Joined: 2009-06-09 22:20

Re: Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2018-12-21 04:42

milomak wrote:boot into manjaro

run grub-install on it

reboot. see which grub loads

if manjaro grub loaded, boot debian and remove grub

Nice tip.
I found a few tutorials as well:
https://www.garron.me/en/linux/os-probe ... buntu.html
https://www.garron.me/en/linux/dual-boo ... stros.html
https://easylinuxtipsproject.blogspot.com/p/grub.html

All good if it's just a matter of running grub-install from Manjaro. But then how the heck do you remove Debian's GRUB? All of you have said that as if it were a matter of running

Code: Select all
sudo apt-get autoremove grub

or something like that.
But I was unable to find any tutorial that explains that part.
Without that, you may run grub-install and everything will be fine until Debian (or any other distro I wanted to install in that machine later) decides to update its GRUB and screw the other distro's GRUB up!
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 8
Joined: 2018-11-13 03:05

Re: Debian's GRUB doesn't get along with other distro's

Postby bw123 » 2018-12-21 05:09

On my system to uninstall grub-pc it was these, I purged them.
Code: Select all
pi   grub-pc                                               +575 kB   <none>         2.02~beta3-5+d
--\ Packages being automatically installed to satisfy dependencies (4)
piA  gettext-base                                          +735 kB   <none>         0.19.8.1-2   
piA  grub-common                                           +15.1 MB  <none>         2.02~beta3-5+d
piA  grub-pc-bin                                           +2,976 kB <none>         2.02~beta3-5+d
piA  grub2-common                                          +1,179 kB <none>         2.02~beta3-5+d
--\ Packages which are recommended by other packages (1)
p    os-prober                                                       <none>         1.76~deb9u1
--\ Packages which are suggested by other packages (3)
p    grub-emu                                                        <none>         2.02~beta3-5+d
p    multiboot-doc                                                   <none>         0.97-72
p    xorriso

You may have different pkgs because different versions are for different hardware. Aptitude is good at things like this. If there is another grub installed and configured correctly from another linux installation then this should be safe. BE SURE AND READ AND ANSWER QUESTIONS CORRECTLY. DON'T JUST HIT YES. iT UNINSTALLED FINE ON KDE PLASMA, BUT I GUESS SOME DESKTOPS MIGHT DEPEND ON GRUB? Be careful.

If you choose 'grub' then it will probably uninstall grub-legacy, not grub2. Nobody on here knows how you have things setup. This is not necessary to keep debian's grub from messing you up, but maybe it will get you to mark the thread solved?

Debian or manjaro or any other distro does not decide to do anything, you do. You are the one that runs commands, you answer questions from the os. It's your computer, get it under control.
User avatar
bw123
 
Posts: 3679
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian's GRUB doesn't get along with other distro's

Postby p.H » 2018-12-21 12:46

Isakku wrote:If grub-mkconfig were to set Manjaro's GRUB as the default in the machine it would work, but it didn't

Of course not. This is not the purpose of grub-mkconfig. Its only purpose is to generate a config file for the GRUB instance installed by the distribution it is run on.
Isakku wrote:Whatever command the Debian updates ran it was not grub-install

Yes it is. Only grub-install (NOT grub-mkconfig) can install a GRUB bootloader and overwrite the boot loader previously installed in the same location.
bw123 wrote:bootinfoscript is broken.

At least the version available in Debian stable does not handle properly current versions of GRUB 2.x. But I have seen reports from bootinfoscript (I don't remember which version, but it was newer than Debian's) which contain the correct information about the /boot location.
bw123 wrote:Another way to get the info is hit 'c' at the grub menu, then type 'set' and look for 'prefix' and that should? tell you what partition the core.img is looking for

But it is far from showing as much information as bootinfoscript. I was specifically looking for Manjaro's and Debian's grub.cfg to try to understand what is wrong.
Manjaro's grub.cfg contains the following initrd line :
Code: Select all
initrd   /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img

It is the first time I see two arguments in an initrd command. GRUB documentation mentions only one argument. It seems that Debian's update-grub/grub-mkconfig cannot handle it properly and the line in Debian's grub.cfg becomes :
Code: Select all
initrd /boot/intel-ucode.img

The second argument, which is the initramfs in charge of mounting the root filesystem, is missing.

Isakku wrote:I guess I will run Manjaro in a live session, mount the drive where it is installed and do something like in Arch (I imagine there is an equivalent to arch-chroot and run grub-install

You do not have to run Manjaro or chroot anything. You can run grub-install with --boot-directory to specify the /boot location.

Isakku wrote:how the heck do you remove Debian's GRUB? All of you have said that as if it were a matter of running
Code: Select all
sudo apt-get autoremove grub

Your request "remove Debian's GRUB" was ambiguous. I first thought you meant to erase the GRUB boot loader installed by Debian's grub-install. Just installing Manjaro's GRUB in the same location does this. But I understand now that you want to uninstall grub* packages. All you need to do to prevent Debian updates from overwriting the installed boot loader is to remove the package grub-pc. Note that is will also remove scripts which automatically update Debian's grub.cfg when a kernel is installed or removed (which Manjaro's grub-mkconfig relies upon to add proper menu entries for Debian in Manjaro's grub.cfg).
Code: Select all
apt-get remove grub-pc

If I were you I would keep other grub-* packages. They can be useful.
p.H
 
Posts: 709
Joined: 2017-09-17 07:12

Re: Debian's GRUB doesn't get along with other distro's

Postby bw123 » 2018-12-21 14:36

p.H wrote:...
Manjaro's grub.cfg contains the following initrd line :

Code: Select all
initrd /boot/intel-ucode.img /boot/initramfs-4.14-x86_64.img


It is the first time I see two arguments in an initrd command.
...


ah... I seem to recall that some people are using this to preload the ucode for the spectre/meltdown issues. I think HoAS wrote something on the board here about it. So that means debian will need an entry in 40_custom to boot manjaro correctly?

"p.H wrote:...If I were you I would keep other grub-* packages. They can be useful.


Yes, you're right again. I should not recommend this to new users, because without the other pkgs os-prober from other distro will not find and create the debian entry? I use custom entry on debian without os-prober to boot /vmlinuz with /initrd.img to keep things very simple.

On the bootinfoscript, I tried it and got the same results. Looked around a little and the issue seems pretty old, there's a dead fourm here https://sourceforge.net/p/bootinfoscrip ... on/905692/

I looked at the script, and found the right section, but wihtout the right offsets for the core.img I didn't even try to fix it. Maybe someone could fix that up, it's a pretty useful tool.
User avatar
bw123
 
Posts: 3679
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Debian's GRUB doesn't get along with other distro's

Postby p.H » 2018-12-22 08:02

bw123 wrote:So that means debian will need an entry in 40_custom to boot manjaro correctly?

I'm afraid so. The custom menu entry could contain a simple 'configfile' command loading Manjaro's grub.cfg, provided that Debian's GRUB handles correctly the initrd syntax with two arguments. Otherwise, use the 'chainloader' command to load Manjaro's GRUB.

bw123 wrote: without the other pkgs os-prober from other distro will not find and create the debian entry?

os-prober itself does not care about other GRUB installations. grub-mkconfig/update-grub only uses os-prober to find other GNU/Linux installations. Then if grub.cfg is present in a found installation, it relies on its contents to build the menu entries for that installation. It does not rely on GRUB packages and utilities to be present on the other installation.

grub-pc (as any other grub-$ARCH package) provides hook scripts which automatically update grub.cfg when a packaged kernel image is installed or removed :
/etc/kernel/postrm.d/zz-update-grub
/etc/kernel/postinst.d/zz-update-grub

The other grub* packages only contain what is needed to run grub-install and update-grub/grub-mkconfig manually.

If you remove grub-pc, grub.cfg won't be automatically updated any more, so update-grub run from another system may rely on an outdated grub.cfg to build menu entries. To avoid this you need to run update-grub manually after kernel changes, or reinstall the hook scripts by hand. They are quite simple.

IIRC, there is another alternative : run
Code: Select all
dpkg-reconfigure grub-pc

and leave the boot device field empty, so that grub-pc package updates won't reinstall the GRUB boot loader. This works only with grub-pc for BIOS/legacy systems, not with grub-efi* for EFI systems because it does not use a boot device.
p.H
 
Posts: 709
Joined: 2017-09-17 07:12

Re: Debian's GRUB doesn't get along with other distro's

Postby Isakku » 2019-01-04 04:47

bw123 wrote:You may have different pkgs because different versions are for different hardware. Aptitude is good at things like this. If there is another grub installed and configured correctly from another linux installation then this should be safe. BE SURE AND READ AND ANSWER QUESTIONS CORRECTLY. DON'T JUST HIT YES. iT UNINSTALLED FINE ON KDE PLASMA, BUT I GUESS SOME DESKTOPS MIGHT DEPEND ON GRUB? Be careful.

Maybe I made some mistakes such as assuming that a tutorial that says that "it is simply the latest installed GRUB the one which is in control" is the entire reality when it turns out to be much more complex. Complex specially when I'm also dealing with installing at least 4 distros in the same hardware, wouldn't you agree?

bw123 wrote:If you choose 'grub' then it will probably uninstall grub-legacy, not grub2. Nobody on here knows how you have things setup. This is not necessary to keep debian's grub from messing you up, but maybe it will get you to mark the thread solved?

*SIGH* OK, maybe. I will try that later.

bw123 wrote:Debian or manjaro or any other distro does not decide to do anything, you do. You are the one that runs commands, you answer questions from the os. It's your computer, get it under control.

Really? Don't tell me automated scripts don't do things according to their pre configured programming. Discover NEVER asked me if I wanted to make changes to GRUB. All it did was show a bunch of updates, so I clicked the "update" button, and all it asked for was for Root's password, nothing else.

p.H wrote:
Isakku wrote:If grub-mkconfig were to set Manjaro's GRUB as the default in the machine it would work, but it didn't

Of course not. This is not the purpose of grub-mkconfig. Its only purpose is to generate a config file for the GRUB instance installed by the distribution it is run on.
Isakku wrote:Whatever command the Debian updates ran it was not grub-install

Yes it is. Only grub-install (NOT grub-mkconfig) can install a GRUB bootloader and overwrite the boot loader previously installed in the same location.

Whatever command was run when running the updates, by that logic it should have been grub-install. Then, why run grub-install if it's merely some packages being updated? It's beyond me right now. The list that Discover showed didn't seem to be anything else but updates for many things, nothing else.

p.H wrote:
Isakku wrote:how the heck do you remove Debian's GRUB? All of you have said that as if it were a matter of running
Code: Select all
sudo apt-get autoremove grub

Your request "remove Debian's GRUB" was ambiguous. I first thought you meant to erase the GRUB boot loader installed by Debian's grub-install. Just installing Manjaro's GRUB in the same location does this. But I understand now that you want to uninstall grub* packages. All you need to do to prevent Debian updates from overwriting the installed boot loader is to remove the package grub-pc. Note that is will also remove scripts which automatically update Debian's grub.cfg when a kernel is installed or removed (which Manjaro's grub-mkconfig relies upon to add proper menu entries for Debian in Manjaro's grub.cfg).
Code: Select all
apt-get remove grub-pc

If I were you I would keep other grub-* packages. They can be useful.

Yeah, I didn't realize it. Ambiguous indeed it was, because turns out I understand now GRUB is at least two things in a machine:

1) The program and it's configuration usually stored in the system in folders such as /boot/
2) The actual GRUB boot loader stored in the MBR or EFI partition.

It was quite confusing at first, now I think I get it.<

I have run some tests in a virtual machine. I indeed got the "install GRUB" menu, opted it out and installed Manjaro later. It seems to be working just fine, Manjaro boots OK, but for some reason Debian boots to a black empty desktop. I can switch to tty, login and issue a startx command, with the exact same result. Maybe a bug with Virtualbox (yeah, I'm on 5.2.10 I have to update)

EDIT.
OK.
I booted Manjaro and ran
Code: Select all
# sudo grub-install /dev/sda
# sudo grub-install --recheck /dev/sda


as suggested here.
https://howtoubuntu.org/how-to-repair-r ... tu-live-cd

Then I rebooted, GRUB finally showed up the way I had configured it with Manjaro. Manjaro boots fine. Then I rebooted into Arch, it boots fine as well. Finally I rebooted into Debian.
The first thing I did was run
Code: Select all
# sudo apt-get remove grub-pc

I hope with that it will never bother to install itself without saying anything again anymore.
I rebooted Debian. Everything seemed fine. I updated the system, (Discover showed new updates in the panel, so I simply opened it and clicked on Update, and just like before all it did was ask for root's password)
After updates finished, I rebooted. Everything is still fine! OK, I guess this machine won't give more trouble. I think it is safe to add Antergos to this machine. I can delete my testing virtual machine as well. I guess I can set this as solved. I'm changing the thread's title adding a [solved] mark.
Thanks a lot for everything!
Freedom is the right of all sentient beings.
User avatar
Isakku
 
Posts: 8
Joined: 2018-11-13 03:05

Previous

Return to General Questions

Who is online

Users browsing this forum: No registered users and 15 guests

fashionable