[Bug 1582899] Re: in-target: mkinitramfs: failed to determine device for /
TJ
ubuntu at iam.tj
Wed May 18 00:58:54 UTC 2016
I added "set -x" to the start of /usr/share/initramfs-tools/hook-
functions::dep_add_modules_mount() and after it failed I grabbed the
output from /var/log/apt/term.log:
The link /initrd.img is a dangling linkto /boot/initrd.img-4.4.0-21-generic
vmlinuz(/boot/vmlinuz-4.4.0-21-generic
) points to /boot/vmlinuz-4.4.0-21-generic
(/boot/vmlinuz-4.4.0-21-generic) -- doing nothing at /var/lib/dpkg/info/linux-image-4.4.0-21-generic.postinst line 491.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-21-generic /boot/vmlinuz-4.4.0-21-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-21-generic /boot/vmlinuz-4.4.0-21-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-21-generic
+ local dir dev_node FSTYPE
+ local modules=
+ dir=/
+ [ ! -d /sys/devices/ ]
+ read dev mp fs opts rest
+ [ / = / ]
+ [ ext4 != rootfs ]
+ printf dev_node=/dev/sda3\nFSTYPE=ext4
+ break
+ eval dev_node=/dev/sda3
FSTYPE=ext4
+ dev_node=/dev/sda3
+ FSTYPE=ext4
+ [ / != / ]
+ [ ext4 = ubifs ]
+ [ / = / ]
+ [ /dev/sda3 = /dev/root ]
+ [ -z /dev/sda3 ]
+ readlink -f /dev/sda3
+ dev_node=/dev/sda3
+ [ -b /dev/sda3 ]
+ echo mkinitramfs: failed to determine device for /
mkinitramfs: failed to determine device for /
+ echo mkinitramfs: workaround is MODULES=most, check:
mkinitramfs: workaround is MODULES=most, check:
+ echo grep -r MODULES /etc/initramfs-tools/
grep -r MODULES /etc/initramfs-tools/
+ echo
+ echo Error please report bug on initramfs-tools
Error please report bug on initramfs-tools
+ echo Include the output of 'mount' and 'cat /proc/mounts'
Include the output of 'mount' and 'cat /proc/mounts'
+ exit 1
update-initramfs: failed for /boot/initrd.img-4.4.0-21-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-4.4.0-21-generic.postinst line 1052.
The bug looks to be a missing $ symbol to denote the dev_node variable in the second test:
# recheck device
if [ -z "$dev_node" ] || ! dev_node="$(readlink -f ${dev_node})" \
|| ! [ -b "$dev_node" ]; then
! dev_node="$(readlink -f ${dev_node})"
should, I think, be:
! $dev_node="$(readlink -f ${dev_node})"
** Also affects: initramfs-tools (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to base-installer in Ubuntu.
https://bugs.launchpad.net/bugs/1582899
Title:
in-target: mkinitramfs: failed to determine device for /
Status in base-installer package in Ubuntu:
New
Status in initramfs-tools package in Ubuntu:
New
Bug description:
Sysadmin reported in #ubuntu (later #ubuntu-kernel) the 16.04 ubuntu-
server failed due to being unable to configure linux-
image-4.4.0-21-generic.
Lots of diagnostics and one SSH remote session later we seem to have
narrowed it down to the installer.
The cause of the error message appears to be that the symlink names in
/dev/disk/by-uuid/ haven't been updated after the partitioning stage
if there were pre-existing partitions and file-systems on the install
device, *and* the sysadmin chose to format the existing partitions
when selecting mountpoints.
In this case a hardware RAID device presents:
/dev/sda1 (/boot/)
/dev/sda2 (swap)
/dev/sda3 (/)
From the shell I noticed:
root at tmpstorage:/# ll /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 May 17 19:39 130e4419-4bfd-46d2-87f9-62e5379bf591 -> ../../sda1
lrwxrwxrwx 1 root root 10 May 17 19:39 127d3fa1-c07c-48e4-9e26-1b926d37625c -> ../../sda3
lrwxrwxrwx 1 root root 10 May 17 19:39 78b88456-2b0b-4265-9ed2-5db61522d887 -> ../../sda2
lrwxrwxrwx 1 root root 9 May 17 19:39 2016-04-20-22-45-29-00 -> ../../sr1
drwxr-xr-x 6 root root 120 May 17 19:39 ..
drwxr-xr-x 2 root root 120 May 17 19:39 .
root at tmpstorage:/# blkid /dev/sda*
/dev/sda: PTUUID="a84e60fd" PTTYPE="dos"
/dev/sda1: UUID="61365714-8ff7-47a2-8035-8aed9e3191a6" TYPE="ext4" PARTUUID="a84e60fd-01"
/dev/sda2: UUID="78b88456-2b0b-4265-9ed2-5db61522d887" TYPE="swap" PARTUUID="a84e60fd-02"
/dev/sda3: UUID="75f68451-9472-47c7-9efc-ed032bfa9987" TYPE="ext4" PARTUUID="a84e60fd-03"
More details to follow.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-installer/+bug/1582899/+subscriptions
More information about the foundations-bugs
mailing list