[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#729041: breaks panic=N (users can get a ramdisk shell)



Package: live-boot
Version: 3.0.1-1
Severity: normal

Below, I'm deliberately starting a Debian Wheezy live-boot system
without ANY access to its root filesystem.  (As a test for this
happening as a result of a transient network outage.)

Because panic=N is passed, it's *supposed* to reboot without letting
the user get a ramdisk shell.  When boot=live is used, the user can
gets two shells (one after the other), before the advertised behaviour
finally kicks in.

ii  live-boot                          3.0.1-1
ii  live-boot-initramfs-tools          3.0.1-1
ii  initramfs-tools                    0.109.1

   | # kvm -m 512 -nographic -kernel vmlinuz -initrd initrd.img -append 'console=ttyS0 boot=live loglevel=1 panic=3 plainroot root=/dev/canthappen'
   | Loading, please wait...
   | Begin: Loading essential drivers ... done.
   | Begin: Running /scripts/init-premount ... done.
   | Begin: Mounting root file system ...
   |
   |       .''`.
   |      : :'  :   BOOT FAILED!
   |      `. `'`
   |        `-      This Debian Live image failed to boot.
   |
   |   Please file a bug against the 'live-boot' package or email the Debian
   |   Live mailing list at <debian-live@lists.debian.org>, making sure to note the
   |   exact version, name and distribution of the image you were attempting to boot.
   |
   |   The file /boot.log contains some debugging information but booting with the
   |   debug command-line parameter will greatly increase its verbosity which is
   |   extremely useful when diagnosing issues.
   |
   |   live-boot will now restart your system. The error message was:
   |
   |     Can not mount /dev/canthappen on //filesystem
   | Rebooting automatically due to panic= boot argument
   |
   |
   | BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
   | Enter 'help' for a list of built-in commands.
   |
   | /bin/sh: can't access tty; job control turned off
   | (initramfs) # that slept for three seconds, but then it gave me this shell
   | (initramfs) exit
   | mount: mounting //filesystem on /live/medium failed: Invalid argument
   | done.
   | mount: mounting aufs on /root/ failed: Invalid argument
   | mount aufs on /root/ failed with option -o noatime,noxino,dirs=/live/overlay/=rw://filesystem/=rr+wh
   | Rebooting automatically due to panic= boot argument
   |
   |
   | BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
   | Enter 'help' for a list of built-in commands.
   |
   | /bin/sh: can't access tty; job control turned off
   | (initramfs) # then it slept another three seconds and gave me ANOTHER shell.
   | (initramfs) exit
   | mount: mounting //filesystem on /live/rootfs/filesystem failed: Invalid argument
   | done.
   | Begin: Configuring fstab ... /init: line 68: can't create /root/etc/fstab: nonexistent directory
   | /init: line 68: can't create /root/etc/fstab: nonexistent directory
   | done.
   | Begin: Preconfiguring networking ... /init: line 68: can't create /root/etc/network/interfaces: nonexistent directory
   | /init: line 68: can't create /root/etc/network/interfaces: nonexistent directory
   | done.
   | /init: line 68: 6: Bad file descriptor
   | [   28.568265] Kernel panic - not syncing: Attempted to kill init!
   | [   28.569203] Pid: 1, comm: init Tainted: G         C   3.2.0-4-amd64 #1 Debian 3.2.51-1
   | [   28.570402] Call Trace:
   | [   28.570784]  [<ffffffff813488bb>] ? panic+0x95/0x1a2
   | [   28.571557]  [<ffffffff81049d87>] ? do_exit+0x95/0x713
   | [   28.572405]  [<ffffffff8104a685>] ? do_group_exit+0x74/0x9e
   | [   28.573262]  [<ffffffff8104a6be>] ? sys_exit_group+0xf/0xf
   | [   28.574061]  [<ffffffff81354212>] ? system_call_fastpath+0x16/0x1b
   | [   28.574992] Rebooting in 3 seconds..

When live-boot is installed but not used, the problem is actually
worse -- exiting the shells that shouldn't appear several times still
doesn't make it reboot.

   | # kvm -m 512 -nographic -kernel vmlinuz -initrd initrd.img -append 'console=ttyS0 loglevel=1 panic=3 rootdelay=1 root=/dev/canthappen'
   | Loading, please wait...
   | Begin: Loading essential drivers ... done.
   | Begin: Running /scripts/init-premount ... done.
   | Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
   | Begin: Waiting for root file system ... done.
   | Gave up waiting for root device.  Common problems:
   |  - Boot args (cat /proc/cmdline)
   |    - Check rootdelay= (did the system wait long enough?)
   |    - Check root= (did the system wait for the right device?)
   |  - Missing modules (cat /proc/modules; ls /dev)
   | ALERT!  /dev/canthappen does not exist.  Dropping to a shell!
   | Rebooting automatically due to panic= boot argument
   |
   |
   | BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
   | Enter 'help' for a list of built-in commands.
   |
   | /bin/sh: can't access tty; job control turned off
   | (initramfs)
   | (initramfs) exit
   | Gave up waiting for root device.  Common problems:
   |  - Boot args (cat /proc/cmdline)
   |    - Check rootdelay= (did the system wait long enough?)
   |    - Check root= (did the system wait for the right device?)
   |  - Missing modules (cat /proc/modules; ls /dev)
   | ALERT!  /dev/canthappen does not exist.  Dropping to a shell!
   | Rebooting automatically due to panic= boot argument
   |
   |
   | BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
   | Enter 'help' for a list of built-in commands.
   |
   | /bin/sh: can't access tty; job control turned off
   | (initramfs) exit
   | Gave up waiting for root device.  Common problems:
   |  - Boot args (cat /proc/cmdline)
   |    - Check rootdelay= (did the system wait long enough?)
   |    - Check root= (did the system wait for the right device?)
   |  - Missing modules (cat /proc/modules; ls /dev)
   | ALERT!  /dev/canthappen does not exist.  Dropping to a shell!
   | Rebooting automatically due to panic= boot argument
   |
   |
   | BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
   | Enter 'help' for a list of built-in commands.
   |
   | /bin/sh: can't access tty; job control turned off
   | (initramfs) exit
   | Gave up waiting for root device.  Common problems:
   |  - Boot args (cat /proc/cmdline)
   |    - Check rootdelay= (did the system wait long enough?)
   |    - Check root= (did the system wait for the right device?)
   |  - Missing modules (cat /proc/modules; ls /dev)
   | ALERT!  /dev/canthappen does not exist.  Dropping to a shell!
   | Rebooting automatically due to panic= boot argument
   |
   |
   | BusyBox v1.20.2 (Debian 1:1.20.0-7) built-in shell (ash)
   | Enter 'help' for a list of built-in commands.
   |
   | /bin/sh: can't access tty; job control turned off
   | (initramfs)

If live-boot is *NOT INSTALLED*, the problem goes away and the
expected behaviour is present (this is a different ramdisk):

   | # kvm -m 512 -nographic -kernel vmlinuz -initrd initrd.img -append 'console=ttyS0 loglevel=1 panic=3 rootdelay=1 root=/dev/canthappen'
   | Loading, please wait...
   | Begin: Loading essential drivers ... done.
   | Begin: Running /scripts/init-premount ... done.
   | Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
   | Begin: Waiting for root file system ... done.
   | Gave up waiting for root device.  Common problems:
   |  - Boot args (cat /proc/cmdline)
   |    - Check rootdelay= (did the system wait long enough?)
   |    - Check root= (did the system wait for the right device?)
   |  - Missing modules (cat /proc/modules; ls /dev)
   | ALERT!  /dev/canthappen does not exist.  Dropping to a shell!
   | Rebooting automatically due to panic= boot argument
   | [    5.932175] Restarting system.


Reply to: