[Vmdebootstrap-devel] Bug#764596: vmdebootstrap generated sid images fail to boot on fsck error loop

Axel Beckert abe at debian.org
Sat Oct 25 23:00:36 UTC 2014


Control: affects -1 xen-tools

Hi,

Ben Hutchings wrote:
> > I just tried to build an image of current sid for running autopkgtests
> > in:
> > 
> >   $ sudo vmdebootstrap --verbose --serial-console --distribution=sid --user=adt/adt --size=2000000000 --mbr --image=adt-sid.raw
> > 
> > This worked in the past, but now they are stuck in a boot failure
> > loop;
> > 
> >   $ kvm -m 2048 -snapshot -drive file=adt-sid.raw,if=virtio -monitor none -nographic -serial stdio
> >   [...]
> >   Begin: Loading essential drivers ... done.
> >   Begin: Running /scripts/init-premount ... done.
> >   Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
> >   Begin: Running /scripts/local-premount ... done.
> >   Begin: Checking root file system ... fsck from util-linux 2.25.1
> >   fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/vda1
> >   fsck exited with status code 8
> >   done.
> [...]

Same counts for Sid Xen DomU bootstrapped via xen-tools (at least with
the git version, both with the modification mentioned below as well as
with an unmodified git checkout):

$ xen-create-image --dist sid --hostname domu1 --force --lvm vg0 --dhcp --verbose --pygrub --noaccounts --boot; xl console domu1
[...]
Begin: Checking root file system ... fsck from util-linux 2.25.2
fsck: error 2 (No such file or directory) while executing fsck.ext3 for /dev/xvda2
fsck exited with status code 8
done.
Failure: An automatic file system check (fsck) of the root filesystem failed.
A manual fsck must be performed, then the system restarted.
The fsck should be performed in maintenance mode with the
root filesystem mounted in read-only mode.
Warning: The root filesystem is currently mounted in read-only mode.
A maintenance shell will now be started.
After performing system maintenance, press CONTROL-D
to terminate the maintenance shell and restart the system.
sulogin: cannot open password database!
[    3.510843] sulogin[84]: segfault at 8 ip 00000000004018e0 sp 00007fff8510bce0 error 4 in sulogin[400000+3000]
Segment violation
Failure: Attempt to start maintenance shell failed.
Will restart in 5 seconds.
[    8.518847] reboot: Restarting system

> > This might be a regression from recent util-linux, or some
> > misconfiguration, or incompatibility with extlinux, not sure.
> > fsck.ext4 definitively exists (i. e. e2fsprogs is installed), and
> > /dev/vda1 also exists; it's also apparently able to map the root UUID
> > to /dev/vda1.
> [...]
> 
> fsck.ext4 is not present in the initramfs, probably because
> initramfs-tools was installed before e2fsprogs.  Unfortunately, we
> cannot simply make initramfs-tools depend on the appropriate package
> because it depends on which filesystem is used for root.
> 
> vmdebootstrap should install the kernel last so that all programs that
> may be wanted in the initramfs will be available when the initramfs is
> built.

I expected that this would count for xen-tools as well and tried to
fix it by explicitly installing e2fsprogs before initramfs-tools and
the kernel. But the above still happens despite I used this code to
install e2fsprogs, initramfs-tools and kernel:

        installDebianPackage ${prefix} e2fsprogs
        installDebianPackage ${prefix} initramfs-tools
        installDebianPackage ${prefix} $KERNEL_PKG

So I doubt that this can be fixed by reordering the package
installations.

The following fsck binary is in the initrd:

# lsinitramfs -l /mnt/tmp//boot/initrd.img-3.16-3-amd64  | fgrep fsck
-rwxr-xr-x   1 root     root        35664 Oct 24 19:02 sbin/fsck
#

		Regards, Axel
-- 
 ,''`.  |  Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE
  `-    |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5



More information about the Vmdebootstrap-devel mailing list