openzfs-docs icon indicating copy to clipboard operation
openzfs-docs copied to clipboard

Questions about Debian initrd documentation (continuation)

Open Yvan-Masson opened this issue 3 years ago • 3 comments

Hi,

This report is the continuation of #215, where first point has been fixed but not 2 and 3.

Summary: I have a Debian Bullseye VM installed with root on ZFS as explained in #205, and I am attempting to boot from previous snapshot from Grub. However, the documentation seems outdated and/or I do not read it properly.

If I append @ to the root parameter, system hangs on Loading initial ramdisk .... Then, If I press Enter the following is displayed (I can go up with Shift+PageUp). I have suppressed part of the output as it is clearly redundant.

screenshot1screenshot6

What is the proper way to boot from a previous snapshot?

Thanks, Yvan

Yvan-Masson avatar Dec 14 '21 14:12 Yvan-Masson

I don't use this functionality, so I can't really say. Here are some suggestions on how to research this:

  • Look at /usr/share/initramfs-tools/scripts/zfs
  • Edit that file, add a set -x near the top, update-initramfs -c -k all.
  • Watch for output or check /run/initramfs/initramfs.debug as per https://wiki.debian.org/InitramfsDebug
  • Some sources suggest adding the debug parameter to the kernel command-line, but that might be outdated.

rlaager avatar Dec 14 '21 16:12 rlaager

Thanks for the explanations @rlaager. The debug kernel parameter is still valid (and properly described in the Debian Wiki link you gave). I also could not mount a USB key (If I understand well because the FAT module is not included in the initramfs), so gathered the debug output via nc/netcat.

My goal here is to be able to rollback completely in case an issue arise. Maybe there is a better way to do it? (And by the way I do not know to properly handle /boot, but this is another question…)

Anyway, here is the debug output of the ZFS initramfs script:

+ unset log_output
+ maybe_break top
+ run_scripts /scripts/init-top
+ initdir=/scripts/init-top
+ '[' '!' -d /scripts/init-top ]
+ shift
+ . /scripts/init-top/ORDER
+ /scripts/init-top/all_generic_ide
+ '[' -e /conf/param.conf ]
+ /scripts/init-top/blacklist
+ '[' -e /conf/param.conf ]
+ /scripts/init-top/keymap
+ '[' -e /conf/param.conf ]
+ /scripts/init-top/udev
Starting version 247.3-6
+ '[' -e /conf/param.conf ]
+ maybe_break modules
+ '[' n '!=' y ]
+ log_begin_msg 'Loading essential drivers'
+ _log_msg 'Begin: %s ... ' 'Loading essential drivers'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Loading essential drivers'
Begin: Loading essential drivers ... + return 0
+ '[' -n  ]
+ load_modules
+ '[' -e /conf/modules ]
+ '[' n '!=' y ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ _uptime
+ local uptime
+ cat /proc/uptime
+ uptime='2.10 2.19'
+ uptime=2
+ echo 2
+ starttime=2
+ starttime=3
+ export starttime
+ '['  ]
+ maybe_break premount
+ '[' n '!=' y ]
+ log_begin_msg 'Running /scripts/init-premount'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/init-premount'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/init-premount'
Begin: Running /scripts/init-premount ... + return 0
+ run_scripts /scripts/init-premount
+ initdir=/scripts/init-premount
+ '[' '!' -d /scripts/init-premount ]
+ return
+ '[' n '!=' y ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ maybe_break mount
+ log_begin_msg 'Mounting root file system'
+ _log_msg 'Begin: %s ... ' 'Mounting root file system'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Mounting root file system'
Begin: Mounting root file system ... + return 0
+ . /scripts/local
+ . /scripts/nfs
+ . /scripts/zfs
+ set -x
+ . /etc/zfs/zfs-functions
+ PATH=/sbin:/bin:/usr/bin:/usr/sbin
+ '[' -f /etc/rc.d/init.d/functions ]
+ '[' -L /etc/init.d/functions.sh ]
+ '[' -f /lib/lsb/init-functions ]
+ type log_failure_msg
+ ZFS=/sbin/zfs
+ ZED=/usr/sbin/zed
+ ZPOOL=/sbin/zpool
+ ZPOOL_CACHE=/etc/zfs/zpool.cache
+ ZFS_MOUNT=yes
+ ZFS_UNMOUNT=yes
+ ZFS_SHARE=yes
+ ZFS_UNSHARE=yes
+ '[' -f /etc/default/zfs ]
+ . /etc/default/zfs
+ ZFS_MOUNT=yes
+ ZFS_UNMOUNT=yes
+ ZFS_SHARE=yes
+ ZFS_UNSHARE=yes
+ ZPOOL_IMPORT_ALL_VISIBLE=no
+ VERBOSE_MOUNT=no
+ DO_OVERLAY_MOUNTS=no
+ ZPOOL_IMPORT_OPTS=
+ MOUNT_EXTRA_OPTIONS=
+ ZFS_DKMS_ENABLE_DEBUG=no
+ ZFS_DKMS_ENABLE_DEBUGINFO=no
+ ZFS_DKMS_DISABLE_STRIP=no
+ export ZFS ZED ZPOOL ZPOOL_CACHE ZFS_MOUNT ZFS_UNMOUNT ZFS_SHARE ZFS_UNSHARE
+ parse_numeric 'ZFS=rpool/ROOT/debian@'
+ return
+ maybe_break mountroot
+ mount_top
+ nfs_top
+ '['  '!=' yes ]
+ '[' n '!=' y ]
+ log_begin_msg 'Running /scripts/nfs-top'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/nfs-top'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/nfs-top'
Begin: Running /scripts/nfs-top ... + return 0
+ run_scripts /scripts/nfs-top
+ initdir=/scripts/nfs-top
+ '[' '!' -d /scripts/nfs-top ]
+ return
+ '[' n '!=' y ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ nfs_top_used=yes
+ mount_premount
+ nfs_premount
+ '['  '!=' yes ]
+ '[' n '!=' y ]
+ log_begin_msg 'Running /scripts/nfs-premount'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/nfs-premount'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/nfs-premount'
Begin: Running /scripts/nfs-premount ... + return 0
+ run_scripts /scripts/nfs-premount
+ initdir=/scripts/nfs-premount
+ '[' '!' -d /scripts/nfs-premount ]
+ return
+ '[' n '!=' y ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ nfs_premount_used=yes
+ mountroot
+ pre_mountroot
+ command -v run_scripts
+ '[' -f /scripts/local-top ]
+ '[' -d /scripts/local-top ]
+ '[' n '!=' y ]
+ zfs_log_begin_msg 'Running /scripts/local-top'
+ log_begin_msg 'Running /scripts/local-top'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/local-top'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/local-top'
Begin: Running /scripts/local-top ... + return 0
+ run_scripts /scripts/local-top
+ initdir=/scripts/local-top
+ '[' '!' -d /scripts/local-top ]
+ shift
+ . /scripts/local-top/ORDER
+ /scripts/local-top/zfs
lvm is not available
+ '[' -e /conf/param.conf ]
+ '[' n '!=' y ]
+ zfs_log_end_msg
+ log_end_msg 
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ '[' -f /scripts/local-premount ]
+ '[' -d /scripts/local-premount ]
+ '[' n '!=' y ]
+ zfs_log_begin_msg 'Running /scripts/local-premount'
+ log_begin_msg 'Running /scripts/local-premount'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/local-premount'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/local-premount'
Begin: Running /scripts/local-premount ... + return 0
+ run_scripts /scripts/local-premount
+ initdir=/scripts/local-premount
+ '[' '!' -d /scripts/local-premount ]
+ shift
+ . /scripts/local-premount/ORDER
+ /scripts/local-premount/resume
+ '[' -e /conf/param.conf ]
+ '[' n '!=' y ]
+ zfs_log_end_msg
+ log_end_msg 
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ '[' -r /etc/default/zfs ]
+ . /etc/default/zfs
+ ZFS_MOUNT=yes
+ ZFS_UNMOUNT=yes
+ ZFS_SHARE=yes
+ ZFS_UNSHARE=yes
+ ZPOOL_IMPORT_ALL_VISIBLE=no
+ VERBOSE_MOUNT=no
+ DO_OVERLAY_MOUNTS=no
+ ZPOOL_IMPORT_OPTS=
+ MOUNT_EXTRA_OPTIONS=
+ ZFS_DKMS_ENABLE_DEBUG=no
+ ZFS_DKMS_ENABLE_DEBUGINFO=no
+ ZFS_DKMS_DISABLE_STRIP=no
+ grep -qiE '(^|[^\\](\\\\)* )(zfs_debug|zfs\.debug|zfsdebug)=(on|yes|1)( |$)' /proc/cmdline
+ load_module_initrd
+ '['  -gt 0 ]
+ command -v wait_for_udev
+ wait_for_udev 10
+ command -v udevadm
+ udevadm settle '--timeout=10'
+ '[' '!' -f /proc/self/mounts ]
+ load_module zfs
+ module=zfs
+ check_module_loaded zfs
+ module=zfs
+ '[' -r /sys/module/zfs/version ]
+ return 1
+ /sbin/modprobe zfs
+ return 0
+ '['  -gt 0 ]
+ return 0
+ '[' '!' -f /etc/zfs/zpool.cache ]
+ '[' -z 'ZFS=rpool/ROOT/debian@' ]
+ '[' -z /root ]
+ '[' -n  ]
+ ZPOOL_FORCE=
+ grep -qiE '(^|[^\\](\\\\)* )(zfs_force|zfs\.force|zfsforce)=(on|yes|1)( |$)' /proc/cmdline
+ '[' -n  ]
+ '[' -n  ]
+ '[' -n 'ZFS=rpool/ROOT/debian@' ]
+ '[' -z  ]
+ ZFS_BOOTFS='ZFS=rpool/ROOT/debian@'
+ '[' -z  ]
+ set
+ sed -n -e 's,^zfs-bootfs=,,p'
+ eval 'ZFS_RPOOL='
+ ZFS_RPOOL=
+ '[' -z  ]
+ '[' -z 'ZFS=rpool/ROOT/debian@' ]
+ '[' 'ZFS=rpool/ROOT/debian@' '=' zfs:AUTO ]
+ ZFS_BOOTFS=rpool/ROOT/debian@
+ ZFS_RPOOL=rpool
+ '[' -n rpool ]
+ '[' -z  ]
+ '[' n '!=' y ]
+ zfs_log_begin_msg 'Importing ZFS root pool '"'"'rpool'"'"
+ log_begin_msg 'Importing ZFS root pool '"'"'rpool'"'"
+ _log_msg 'Begin: %s ... ' 'Importing ZFS root pool '"'"'rpool'"'"
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Importing ZFS root pool '"'"'rpool'"'"
Begin: Importing ZFS root pool 'rpool' ... + return 0
+ import_pool rpool
+ pool=rpool
+ /sbin/zpool get name,guid -o value -H
+ grep -Fxq rpool
+ '[' -n  ]
+ '[' -n  ]
+ '[' n '!=' y ]
+ zfs_log_begin_msg 'Importing pool '"'"'rpool'"'"' using defaults'
+ log_begin_msg 'Importing pool '"'"'rpool'"'"' using defaults'
+ _log_msg 'Begin: %s ... ' 'Importing pool '"'"'rpool'"'"' using defaults'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Importing pool '"'"'rpool'"'"' using defaults'
Begin: Importing pool 'rpool' using defaults ... + return 0
+ ZFS_CMD='/sbin/zpool import -N  '
+ /sbin/zpool import -N rpool
+ ZFS_STDERR=
+ ZFS_ERROR=0
+ '[' 0 '!=' 0 ]
+ '[' n '!=' y ]
+ zfs_log_end_msg
+ log_end_msg 
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ POOL_IMPORTED=1
+ return 0
+ find_rootfs rpool
+ pool=rpool
+ '[' -z 1 ]
+ '[' -n rpool/ROOT/debian@ ]
+ return 0
+ '[' n '!=' y ]
+ zfs_log_end_msg
+ log_end_msg 
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ '[' -z 1 ]
+ /sbin/zpool get name,guid -o name,value -H
+ awk -v 'pool=rpool' '$2 == pool { print $1 }'
+ pool=rpool
+ '[' -n rpool ]
+ echo rpool/ROOT/debian@
+ /sbin/zpool get guid -o value rpool -H
+ sed -e s/10863716818112987159/rpool/g
+ ZFS_BOOTFS=rpool/ROOT/debian@
+ ZFS_RPOOL=rpool
+ /sbin/zpool status -L rpool
+ read -r i
+ awk '/^\t / && !/(mirror|raidz)/ {
	        dev=$1;
	        sub(/[0-9]+$/, "", dev);
	        print dev
	    }'
+ SCHEDULER=/sys/block/vda/queue/scheduler
+ '[' -e /sys/block/vda/queue/scheduler ]
+ cat /sys/block/vda/queue/scheduler
+ echo none
+ read -r i
+ '[' -n rpool/ROOT/debian@ ]
+ echo rpool/ROOT/debian@
+ grep -q @
+ setup_snapshot_booting rpool/ROOT/debian@
+ snap=rpool/ROOT/debian@
+ retval=0
+ get_fs_value rpool/ROOT/debian@ type
+ fs=rpool/ROOT/debian@
+ value=type
+ /sbin/zfs get -H -ovalue type rpool/ROOT/debian@
+ '[' '!'  ]
+ ask_user_snap rpool/ROOT/debian
+ fs=rpool/ROOT/debian
+ i=1
+ '[' -n  ]
+ echo 'What snapshot do you want to boot from?'
+ read -r snap
+ /sbin/zfs list -H -oname -tsnapshot -r rpool/ROOT/debian
+ echo '  1: rpool/ROOT/debian@install'
+ echo 'SNAP_1=rpool/ROOT/debian@install'
+ eval 'SNAP_1=rpool/ROOT/debian@install'
+ SNAP_1=rpool/ROOT/debian@install
+ i=2
+ read -r snap
+ echo '  2: rpool/ROOT/debian@2021-10-13_14-06'
+ echo 'SNAP_2=rpool/ROOT/debian@2021-10-13_14-06'
+ eval 'SNAP_2=rpool/ROOT/debian@2021-10-13_14-06'
+ SNAP_2=rpool/ROOT/debian@2021-10-13_14-06
+ i=3
+ read -r snap
+ echo '  3: rpool/ROOT/debian@avant'
+ echo 'SNAP_3=rpool/ROOT/debian@avant'
+ eval 'SNAP_3=rpool/ROOT/debian@avant'
+ SNAP_3=rpool/ROOT/debian@avant
+ i=4
+ read -r snap
+ echo '  4: rpool/ROOT/debian/srv@snap'
+ echo 'SNAP_4=rpool/ROOT/debian/srv@snap'
+ eval 'SNAP_4=rpool/ROOT/debian/srv@snap'
+ SNAP_4=rpool/ROOT/debian/srv@snap
+ i=5
+ read -r snap
+ echo '  5: rpool/ROOT/debian/srv/samba@snap'
+ echo 'SNAP_5=rpool/ROOT/debian/srv/samba@snap'
+ eval 'SNAP_5=rpool/ROOT/debian/srv/samba@snap'
+ SNAP_5=rpool/ROOT/debian/srv/samba@snap
+ i=6
+ read -r snap
+ echo '%s' '  Snap nr [1-5]? '
+ read -r snapnr
+ '[' -n y ]
+ ZFS_DEBUG=1
+ set -x
+ eval echo '$SNAP_'
+ echo
+ echo 
+ snap=
+ rootfs=
+ snapname=
+ ZFS_BOOTFS=_
+ grep -qiE '(^|[^\\](\\\\)* )(rollback)=(on|yes|1)( |$)' /proc/cmdline
+ get_fs_value _ type
+ fs=_
+ value=type
+ /sbin/zfs get -H -ovalue type _
+ '['  ]
+ /sbin/zfs list -H -oname -tsnapshot -r 
+ grep 
cannot open '': empty component or misplaced '@' or '#' delimiter in name
+ return 0
+ '[' -z _ ]
+ /sbin/zfs list -oname -tfilesystem -H -r _
cannot open '_': dataset does not exist
+ filesystems=
+ touch /run/zfs_unlock_complete
+ '[' -e /run/zfs_unlock_complete_notify ]
+ '[' -n  ]
+ command -v run_scripts
+ '[' -f /scripts/local-bottom ]
+ '[' -d /scripts/local-bottom ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ read_fstab_entry /usr
+ found=1
+ '[' -f /root/etc/fstab ]
+ return 1
+ mount_bottom
+ nfs_bottom
+ '[' yes '=' yes ]
+ '[' n '!=' y ]
+ log_begin_msg 'Running /scripts/nfs-bottom'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/nfs-bottom'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/nfs-bottom'
Begin: Running /scripts/nfs-bottom ... + return 0
+ run_scripts /scripts/nfs-bottom
+ initdir=/scripts/nfs-bottom
+ '[' '!' -d /scripts/nfs-bottom ]
+ return
+ '[' n '!=' y ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ nfs_premount_used=no
+ nfs_top_used=no
+ nfs_bottom
+ '[' no '=' yes ]
+ '[' no '=' yes ]
+ nfs_premount_used=no
+ nfs_top_used=no
+ local_bottom
+ '['  '=' yes ]
+ '['  '=' yes ]
+ local_premount_used=no
+ local_top_used=no
+ maybe_break bottom
+ '[' n '!=' y ]
+ log_begin_msg 'Running /scripts/init-bottom'
+ _log_msg 'Begin: %s ... ' 'Running /scripts/init-bottom'
+ '[' n '=' y ]
+ printf 'Begin: %s ... ' 'Running /scripts/init-bottom'
Begin: Running /scripts/init-bottom ... + return 0
+ run_scripts /scripts/init-bottom
+ initdir=/scripts/init-bottom
+ '[' '!' -d /scripts/init-bottom ]
+ shift
+ . /scripts/init-bottom/ORDER
+ /scripts/init-bottom/udev
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /dev on /root/dev failed: No such file or directory
+ '[' -e /conf/param.conf ]
+ '[' n '!=' y ]
+ log_end_msg
+ _log_msg 'done.\n'
+ '[' n '=' y ]
+ printf 'done.\n'
done.
+ return 0
+ mount -n -o move /run /root/run
mount: mounting /run on /root/run failed: No such file or directory
+ validate_init /sbin/init
+ run-init -n /root /sbin/init
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

	-c DEV	Reopen stdio to DEV after switch
	-d CAPS	Drop capabilities
	-n	Dry run
+ echo 'Target filesystem doesn'"'"'t have requested /sbin/init.'
Target filesystem doesn't have requested /sbin/init.
+ init=
+ validate_init /sbin/init
+ run-init -n /root /sbin/init
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

	-c DEV	Reopen stdio to DEV after switch
	-d CAPS	Drop capabilities
	-n	Dry run
+ validate_init /etc/init
+ run-init -n /root /etc/init
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

	-c DEV	Reopen stdio to DEV after switch
	-d CAPS	Drop capabilities
	-n	Dry run
+ validate_init /bin/init
+ run-init -n /root /bin/init
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

	-c DEV	Reopen stdio to DEV after switch
	-d CAPS	Drop capabilities
	-n	Dry run
+ validate_init /bin/sh
+ run-init -n /root /bin/sh
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

	-c DEV	Reopen stdio to DEV after switch
	-d CAPS	Drop capabilities
	-n	Dry run
+ validate_init 
+ run-init -n /root 
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) multi-call binary.

Usage: run-init [-d CAP,CAP...] [-n] [-c CONSOLE_DEV] NEW_ROOT NEW_INIT [ARGS]

Free initramfs and switch to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /,
execute NEW_INIT. PID must be 1. NEW_ROOT must be a mountpoint.

	-c DEV	Reopen stdio to DEV after switch
	-d CAPS	Drop capabilities
	-n	Dry run
+ panic 'No init found. Try passing init= bootarg.'
+ local console rest IFS
+ command -v chvt
+ chvt 1
+ echo 'No init found. Try passing init= bootarg.'
No init found. Try passing init= bootarg.
+ '[' -n  ]
+ run_scripts /scripts/panic
+ initdir=/scripts/panic
+ '[' '!' -d /scripts/panic ]
+ return
+ command -v setsid
+ unset IFS
+ read -r console rest
+ '[' tty0 '=' tty0 ]
+ console=tty1
+ REASON='No init found. Try passing init= bootarg.' PS1='(initramfs) ' setsid sh -c 'exec sh -i <>/dev/tty1 1>&0 2>&1'

Indeed, the script prompts for a snapshot number to boot from, but:

  • it is not visible :-)
  • it does not check if the user answer is valid (that is why pressing Enter leads to busybox)

I will submit a Debian bug report and let you know once it is done.

Yvan-Masson avatar Dec 16 '21 14:12 Yvan-Masson

Reported to Debian in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1001802

Yvan-Masson avatar Dec 16 '21 16:12 Yvan-Masson