Get rid of grub boot loader and se systemd

Kernels & Hardware, configuring network, installing services

Get rid of grub boot loader and se systemd

Postby ryankm » 2019-01-12 19:47

So I successfully converted to systemd so I think. I followed the guide and tested it by entering
Code: Select all
sudo systemctl start bluetooth
did not return any errors and prompted me to enter a password just like in Windows Vista.

The reason I am doing this is beacuse I run other linux systemd configs on this machine and everytime debian updates grub it wipes out system d and I can't boot into the other ones. I am scared to update... Grub doesn't pick them up and there is no way for me to fix it but reinstall the systemd operating systems....

My question is by converting debian to sytemd am I killing grub? Is grub gone will my computer no longer be using it ever again; even if I update?
Last edited by ryankm on 2019-01-13 04:15, edited 1 time in total.
ryankm
 
Posts: 22
Joined: 2018-04-07 16:21

Re: Convert to systemd...

Postby Head_on_a_Stick » 2019-01-12 19:55

ryankm wrote:So I successfully converted to systemd so I think. I followed the guide

Which guide?

ryankm wrote:everytime debian updates grub it wipes out system d and I can't boot into the other ones. I am scared to update... Grub doesn't pick them up and there is no way for me to fix it but reinstall the systemd operating systems....

Please post the full output of
Code: Select all
/usr/sbin/grub-mkconfig

The output will be lengthy so please use code tags when posting, thanks!
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8583
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Convert to systemd...

Postby sunrat » 2019-01-12 21:49

ryankm wrote:So I successfully converted to systemd so I think.

What did you convert from? Debian uses systemd by default.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2509
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Convert to systemd...

Postby ryankm » 2019-01-13 03:50

I don't know whatever they used before systemd? Isn't it different from clear linux and fedora? I just want grub to be the boot loader. It doesn't pick everything up.

Head_on_a_Stick wrote:Which guide?


https://wiki.debian.org/systemd#Installation
Code: Select all
ryan@ryanKelly:~$ /usr/sbin/grub-mkconfig
grub-mkconfig: You must run this as root
ryan@ryanKelly:~$ sudo /usr/sbin/grub-mkconfig
[sudo] password for ryan:
Generating grub configuration file ...
#
# 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_gpt
insmod ext2
set root='hd2,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
else
  search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
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=ga_IE
  insmod gettext
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_gpt
insmod ext2
set root='hd2,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
else
  search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
fi
Found background image: /usr/share/images/desktop-base/desktop-grub.png
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
Found linux image: /boot/vmlinuz-4.19.0-1-amd64
Found initrd image: /boot/initrd.img-4.19.0-1-amd64
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
   load_video
   insmod gzio
   if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
   insmod part_gpt
   insmod ext2
   set root='hd2,gpt4'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
   else
     search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
   fi
   echo   'Loading Linux 4.19.0-1-amd64 ...'
   linux   /boot/vmlinuz-4.19.0-1-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro  quiet
   echo   'Loading initial ramdisk ...'
   initrd   /boot/initrd.img-4.19.0-1-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
   menuentry 'Debian GNU/Linux, with Linux 4.19.0-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-1-amd64-advanced-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.19.0-1-amd64 ...'
      linux   /boot/vmlinuz-4.19.0-1-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.19.0-1-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.19.0-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.19.0-1-amd64-recovery-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.19.0-1-amd64 ...'
      linux   /boot/vmlinuz-4.19.0-1-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.19.0-1-amd64
   }
Found linux image: /boot/vmlinuz-4.18.0-2-amd64
Found initrd image: /boot/initrd.img-4.18.0-2-amd64
   menuentry 'Debian GNU/Linux, with Linux 4.18.0-2-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.18.0-2-amd64-advanced-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.18.0-2-amd64 ...'
      linux   /boot/vmlinuz-4.18.0-2-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.18.0-2-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.18.0-2-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.18.0-2-amd64-recovery-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.18.0-2-amd64 ...'
      linux   /boot/vmlinuz-4.18.0-2-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.18.0-2-amd64
   }
Found linux image: /boot/vmlinuz-4.15.0-2-amd64
Found initrd image: /boot/initrd.img-4.15.0-2-amd64
   menuentry 'Debian GNU/Linux, with Linux 4.15.0-2-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-2-amd64-advanced-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.15.0-2-amd64 ...'
      linux   /boot/vmlinuz-4.15.0-2-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.15.0-2-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.15.0-2-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-2-amd64-recovery-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.15.0-2-amd64 ...'
      linux   /boot/vmlinuz-4.15.0-2-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.15.0-2-amd64
   }
Found linux image: /boot/vmlinuz-4.12.0-1-amd64
Found initrd image: /boot/initrd.img-4.12.0-1-amd64
   menuentry 'Debian GNU/Linux, with Linux 4.12.0-1-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.12.0-1-amd64-advanced-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.12.0-1-amd64 ...'
      linux   /boot/vmlinuz-4.12.0-1-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.12.0-1-amd64
   }
   menuentry 'Debian GNU/Linux, with Linux 4.12.0-1-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.12.0-1-amd64-recovery-f0f072b3-9e07-4a76-bdb5-c41feb908e84' {
      load_video
      insmod gzio
      if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
      insmod part_gpt
      insmod ext2
      set root='hd2,gpt4'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd2,gpt4 --hint-efi=hd2,gpt4 --hint-baremetal=ahci2,gpt4  f0f072b3-9e07-4a76-bdb5-c41feb908e84
      else
        search --no-floppy --fs-uuid --set=root f0f072b3-9e07-4a76-bdb5-c41feb908e84
      fi
      echo   'Loading Linux 4.12.0-1-amd64 ...'
      linux   /boot/vmlinuz-4.12.0-1-amd64 root=UUID=f0f072b3-9e07-4a76-bdb5-c41feb908e84 ro single
      echo   'Loading initial ramdisk ...'
      initrd   /boot/initrd.img-4.12.0-1-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 ###

ryankm
 
Posts: 22
Joined: 2018-04-07 16:21

Re: Get rid of grub boot loader and se systemd

Postby bw123 » 2019-01-13 06:33

There is a previous thread about grub and multiple linux installations, maybe it will help you.
viewtopic.php?f=10&t=139060&p=688258&hilit=grub&sid=b07bbec77cc327341afe203a80ab292f#p688258
User avatar
bw123
 
Posts: 3672
Joined: 2011-05-09 06:02
Location: TN_USA

Re: Get rid of grub boot loader and se systemd

Postby p.H » 2019-01-13 10:31

ryankm wrote:My question is by converting debian to sytemd am I killing grub? Is grub gone will my computer no longer be using it ever again; even if I update?

No. GRUB and systemd have nothing to do with each other and installing systemd does not remove GRUB.
systemd is already installed as the default init system on Debian since version 8 (Jessie).

I suspect that you confuse the init system systemd and the systemd-boot boot loader. IIRC Fedora uses systemd-boot as the boot loader instead of GRUB on EFI platforms. I don't know which is the default EFI boot loader in Debian testing or unstable that you seem to use.
If I am right, by default updating GRUB EFI does not wipe systemd-boot, it just updates the boot order and and gives highest priority to GRUB over other EFI boot loaders. You can still select and boot systemd-boot from the UEFI firmware boot menu and change the boot order with efibootmgr.

Note that if os-prober and update-grub do not detect systemd-boot or other installed systems, you can manually add an entry in GRUB's menu to chainload systemd-boot from GRUB.

However if you want to prevent GRUB updates from changing the boot order, you can either remove the grub-efi-amd64 package or mark it to hold with apt-mark.
p.H
 
Posts: 707
Joined: 2017-09-17 07:12

Re: Get rid of grub boot loader and se systemd

Postby Head_on_a_Stick » 2019-01-13 10:36

@OP, is os-prober installed on your system?

p.H wrote:IIRC Fedora uses systemd-boot as the boot loader instead of GRUB on EFI platforms. I don't know which is the default EFI boot loader in Debian testing or unstable that you seem to use.
If I am right, by default updating GRUB EFI does not wipe systemd-boot, it just updates the boot order and and gives highest priority to GRUB over other EFI boot loaders. You can still select and boot systemd-boot from the UEFI firmware boot menu and change the boot order with efibootmgr.

We can check this by seeing the output of
Code: Select all
efibootmgr -v
"French riots get results! U lot are instagram zzzombies" — graffiti over Euston underpass
User avatar
Head_on_a_Stick
 
Posts: 8583
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable