Bug#773173: Bug#757298: Please add fallback boot entry for sysvinit when systemd is the active init

I. Schrey sy at schreyben.de
Sat Jan 10 16:46:04 UTC 2015


Am 10.01.2015 um 11:14 schrieb Colin Watson:
> On Sat, Jan 10, 2015 at 03:39:13AM +0100, I. Schrey wrote:
>> Version: 2.02~beta2-20
>>
>> Hi,
>>
>> this just broke boot, at least for me.
>>
>> On a Sid system which is configured to not boot the default entry
>> and has sysvinit as active init system.
>> The extra line(s) added to grub.cfg made it boot the wrong kernel,
>> and it became stuck upon reboot.
> Please attach your /etc/default/grub and /boot/grub/grub.cfg so that we
> can investigate in detail.
>

Attached. :)

Should be fairly standard, except for GRUB_DEFAULT and maybe the self 
compiled
kernels. But those are built according to Debian guidelines.


So, before the 2.02~beta2-20 update "1>6" was
'Debian GNU/Linux, with Linux 3.12.0-svs-amd64'

After the update "1>6" would be
'Debian GNU/Linux, with Linux 3.14.0-svsi-amd64'
because of the extra 'menuentry' lines, so I had to change the
default entry to "1>9" to get the old behaviour back.

(that 3.14.0-svsi kernel package was missing some modules, so the
system was unreachable after reboot. Now I guess you could say that was
partly my fault for installing unsuitable kernels on a headless system,
but still.. the new default boot took me by surprise)


I guess if
GRUB_DEFAULT="0" or
GRUB_DEFAULT="<menuentry name>"
I wouldn't have noticed?


Regards
Ingmar



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

#GRUB_DEFAULT=0
#GRUB_DEFAULT="1>6"
GRUB_DEFAULT="1>9"
GRUB_TIMEOUT=2
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""

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

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

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

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

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

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

-------------- next part --------------
#
# 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="1>9"
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,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
else
  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
fi
    font="/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ] ; then
  set timeout=-1
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=2
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=2
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
else
  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
fi
insmod png
if background_image /grub/.background_cache.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-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
	else
	  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
	fi
	echo	'Loading Linux 3.18.0-svsi-amd64 ...'
	linux	/vmlinuz-3.18.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-3.18.0-svsi-amd64
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
	menuentry 'Debian GNU/Linux, with Linux 3.18.0-svsi-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.18.0-svsi-amd64-advanced-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.18.0-svsi-amd64 ...'
		linux	/vmlinuz-3.18.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.18.0-svsi-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.18.0-svsi-amd64 (sysvinit)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.18.0-svsi-amd64-init-sysvinit-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.18.0-svsi-amd64 ...'
		linux	/vmlinuz-3.18.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet init=/lib/sysvinit/init
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.18.0-svsi-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.18.0-svsi-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.18.0-svsi-amd64-recovery-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.18.0-svsi-amd64 ...'
		linux	/vmlinuz-3.18.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.18.0-svsi-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-4-amd64-advanced-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.16.0-4-amd64 ...'
		linux	/vmlinuz-3.16.0-4-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.16.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (sysvinit)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-4-amd64-init-sysvinit-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.16.0-4-amd64 ...'
		linux	/vmlinuz-3.16.0-4-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet init=/lib/sysvinit/init
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.16.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.16.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.16.0-4-amd64-recovery-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.16.0-4-amd64 ...'
		linux	/vmlinuz-3.16.0-4-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.16.0-4-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.14.0-svsi-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.14.0-svsi-amd64-advanced-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.14.0-svsi-amd64 ...'
		linux	/vmlinuz-3.14.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.14.0-svsi-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.14.0-svsi-amd64 (sysvinit)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.14.0-svsi-amd64-init-sysvinit-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.14.0-svsi-amd64 ...'
		linux	/vmlinuz-3.14.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet init=/lib/sysvinit/init
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.14.0-svsi-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.14.0-svsi-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.14.0-svsi-amd64-recovery-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.14.0-svsi-amd64 ...'
		linux	/vmlinuz-3.14.0-svsi-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.14.0-svsi-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.12.0-svs-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12.0-svs-amd64-advanced-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.12.0-svs-amd64 ...'
		linux	/vmlinuz-3.12.0-svs-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.12.0-svs-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.12.0-svs-amd64 (sysvinit)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12.0-svs-amd64-init-sysvinit-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.12.0-svs-amd64 ...'
		linux	/vmlinuz-3.12.0-svs-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro  quiet init=/lib/sysvinit/init
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.12.0-svs-amd64
	}
	menuentry 'Debian GNU/Linux, with Linux 3.12.0-svs-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.12.0-svs-amd64-recovery-521b9bf5-5468-4580-a1f8-0aafe2ee6fbe' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		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='hd0,msdos1'  fab33a08-b29c-4b79-92e2-646ff616eaa2
		else
		  search --no-floppy --fs-uuid --set=root fab33a08-b29c-4b79-92e2-646ff616eaa2
		fi
		echo	'Loading Linux 3.12.0-svs-amd64 ...'
		linux	/vmlinuz-3.12.0-svs-amd64 root=UUID=521b9bf5-5468-4580-a1f8-0aafe2ee6fbe ro single 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-3.12.0-svs-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 ###
### 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 ###



More information about the Pkg-grub-devel mailing list