Bootable buildd xenial images go to initramfs on boot

Bug #1923865 reported by Michał Sawicz
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-images
In Progress
Undecided
Unassigned
Xenial
New
Undecided
Unassigned
livecd-rootfs (Ubuntu)
New
Undecided
Unassigned

Bug Description

This image:

http://cloud-images.ubuntu.com/daily/server/buildd/daily/xenial/current/xenial-server-cloudimg-amd64-disk.img

Fails to boot, with either UEFI or MBR:

```
error: can't find command `hwmatch'.
error: no such device: root.
```

Then it goes straight into initramfs.

Every once in a while there's more context written:

```
mount: can't find /root in /etc/fstab
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /run on /root/run failed: No such file or directory
run-init: current directory on the same filesystem as the root: error 0
Target filesstem doesn't have requested /sbin/init.
run-init: current directory on the same filesystem as the root: error 0
...
No init found. Try passing init= bootarg.
```

Revision history for this message
Joshua Powers (powersj) wrote :

Per LP: #1915571 as soon as I set console=ttyS0 in the kernel cmdline, the image is able to boot in qemu with output to the console. As such, I think this is really a duplicate of bug LP: #1915571.

To test this out I downloaded the image, modified /boot/grub/grub.cfg to remove quiet and add "console=ttyS0", and then booted the image with:

qemu-system-x86_64 \
  -cpu host -machine type=q35,accel=kvm -m 2048 \
  -nographic \
  -snapshot \
  -netdev id=net00,type=user,hostfwd=tcp::2222-:22 \
  -device virtio-net-pci,netdev=net00 \
  -drive if=virtio,format=qcow2,file=xenial-server-cloudimg-amd64-disk.img \
  -drive if=virtio,format=raw,file=seed.img

Prior to this change, I did not get any output to the console and it appeared like the image was not booting.

I'll mark this as incomplete for now. Thoughts?

Changed in cloud-images:
status: New → Incomplete
Revision history for this message
Michał Sawicz (saviq) wrote :

Hey, making the ttyS0 change did enable the serial console, of course, but I'm still dropped into initramfs on ttyS0, whether importing the image into virt-manager or using your line (without seed.img).

My qemu line:

qemu-system-x86_64 \
  -cpu host -machine type=q35,accel=kvm -m 2048 \
  -snapshot \
  -netdev id=net00,type=user,hostfwd=tcp::22222-:22 \
  -device virtio-net-pci,netdev=net00 \
  -drive if=virtio,format=qcow2,file=xenial-test.qcow2

And after Ctrl+Alt+3:

Begin: Will now check file system ... fsck from util-linux 2.27.1
Checking all file systems.
done.
mount: can't find /root in /etc/fstab
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... mount: mounting /dev on /root/dev failed: No such file or directory
done.
mount: mounting /run on /root/run failed: No such file or directory
run-init: current directory on the same filesystem as the root: error 0
Target filesystem doesn't have requested /sbin/init.
run-init: current directory on the same filesystem as the root: error 0
run-init: current directory on the same filesystem as the root: error 0
run-init: current directory on the same filesystem as the root: error 0
run-init: current directory on the same filesystem as the root: error 0
run-init: current directory on the same filesystem as the root: error 0
No init found. Try passing init= bootarg.

BusyBox v1.22.1 (Ubuntu 1:1.22.0-15ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

Revision history for this message
Joshua Powers (powersj) wrote :

Marking confirmed

# Steps to reproduce

1. wget http://cloud-images.ubuntu.com/daily/server/buildd/daily/xenial/current/xenial-server-cloudimg-amd64-disk.img
2. Modify /etc/boot/grub.cfg to add "console=ttyS0" to kernel command line
3. Boot using the following qemu CLI:

qemu-system-x86_64 \
  -cpu host -machine type=q35,accel=kvm -m 2048 \
  -snapshot \
  -nographic \
  -netdev id=net00,type=user,hostfwd=tcp::22222-:22 \
  -device virtio-net-pci,netdev=net00 \
  -drive if=virtio,format=qcow2,file=xenial-server-cloudimg-amd64-disk.img

# Expected behavior

Boot to login

# Actual behavior

Boot drops to an initramfs busy box console

Changed in cloud-images:
status: Incomplete → Confirmed
Revision history for this message
Gauthier Jolly (gjolly) wrote :

Hi,

Checking the cmdline, the root filesystem is not set:

/boot/vmlinuz-4.4.0-21-generic root= ro quiet splash $vt_handoff

If I change it to "root=PARTUUID=fb561bdb-b68a-44ae-a884-a5fd70f80cf7" it's booting.

I see also two other errors during boot:

[ 0.075065] core perfctr but no constraints; unknown hardware!
fsck: error 2 (No such file or directory) while executing fsck.ext4 for /dev/vda1
fsck exited with status code 8

The fsk issue is also present in the bionic images I tried but not the perfctr one.

I just think something went/was wrong when grub was updated during build.

Gauthier Jolly (gjolly)
Changed in cloud-images:
status: Confirmed → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.