Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Get rid of grub boot loader and se systemd

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
ryankm
Posts: 26
Joined: 2018-04-07 16:21

Get rid of grub boot loader and se systemd

#1 Post by ryankm »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Convert to systemd...

#2 Post by Head_on_a_Stick »

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!
deadbang

User avatar
sunrat
Administrator
Administrator
Posts: 6412
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 116 times
Been thanked: 462 times

Re: Convert to systemd...

#3 Post by sunrat »

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!

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

Re: Convert to systemd...

#4 Post by ryankm »

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 ###


User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Get rid of grub boot loader and se systemd

#5 Post by bw123 »

There is a previous thread about grub and multiple linux installations, maybe it will help you.
http://forums.debian.net/viewtopic.php? ... 2f#p688258
resigned by AI ChatGPT

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Get rid of grub boot loader and se systemd

#6 Post by p.H »

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.

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Get rid of grub boot loader and se systemd

#7 Post by Head_on_a_Stick »

@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
deadbang

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

Re: Get rid of grub boot loader and se systemd

#8 Post by ryankm »

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.
The problem was they were on the same efi parttion; systems-bootloader linux and grub. so know way to switch back through firmware.

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: Get rid of grub boot loader and se systemd

#9 Post by bw123 »

ryankm wrote: The problem was they were on the same efi parttion; systems-bootloader linux and grub. so know way to switch back through firmware.
Wow, what a terrible thing for a UEFI implementation to do. When you boot, you can select which bootloader but can't change the default order? One day I'll have to go through this probably... maybe if you post the machine specs and brand/model it will help me when I eventually get around to getting a "modern" computer.
resigned by AI ChatGPT

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Get rid of grub boot loader and se systemd

#10 Post by p.H »

Prepare yourself to meet broken UEFI implementations. All UEFI implementations I have met so far were broken in some way.

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

Re: Get rid of grub boot loader and se systemd

#11 Post by ryankm »

p.H wrote:Prepare yourself to meet broken UEFI implementations. All UEFI implementations I have met so far were broken in some way.
bw123 wrote:
ryankm wrote: The problem was they were on the same efi parttion; systems-bootloader linux and grub. so know way to switch back through firmware.
Wow, what a terrible thing for a UEFI implementation to do. When you boot, you can select which bootloader but can't change the default order? One day I'll have to go through this probably... maybe if you post the machine specs and brand/model it will help me when I eventually get around to getting a "modern" computer.
HP z620....

It's not like that. You only get one efi option per disk. So when these were on the same disc I couldn't no longer boot into Fedora as the bios only recognized Grub on that particular disc. Grub was unable to find it. Now that I have a separate efi disc for fedora and debian, it is now possible for me to change the boot order in the hp bios. It even specifically says debian or fedora.

User avatar
golinux
Posts: 1579
Joined: 2010-12-09 00:56
Location: not a 'buntard!
Been thanked: 1 time

Re: Get rid of grub boot loader and se systemd

#12 Post by golinux »

ryankm wrote: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.
That's certainly a stellar achievement for Debian. LOLOLOL!!!!
May the FORK be with you!

Post Reply