diff -Nru initramfs-tools-0.103ubuntu4.2/debian/changelog initramfs-tools-0.103ubuntu4.3/debian/changelog --- initramfs-tools-0.103ubuntu4.2/debian/changelog 2014-06-04 00:02:30.000000000 -0400 +++ initramfs-tools-0.103ubuntu4.3/debian/changelog 2016-02-23 11:31:48.000000000 -0500 @@ -1,3 +1,13 @@ +initramfs-tools (0.103ubuntu4.3) trusty; urgency=medium + + * Add resolve_device to initramfs-tools so that actual devices show up + in df and /proc/self/mountinfo instead of the UUID symlink. This is + a backport of commits f135e7cf, be18fee1, f1d6fb37 from + git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/initramfs-tools + (LP: #1535349) + + -- Dave Chiluk Tue, 23 Feb 2016 09:52:07 -0500 + initramfs-tools (0.103ubuntu4.2) trusty; urgency=medium * Default to a rootdelay of 180 on powerpc/ppc64/ppc64el to account diff -Nru initramfs-tools-0.103ubuntu4.2/init initramfs-tools-0.103ubuntu4.3/init --- initramfs-tools-0.103ubuntu4.2/init 2013-03-13 20:39:22.000000000 -0400 +++ initramfs-tools-0.103ubuntu4.3/init 2016-02-23 11:09:08.000000000 -0500 @@ -76,41 +76,11 @@ ;; root=*) ROOT=${x#root=} - case $ROOT in - LABEL=*) - ROOT="${ROOT#LABEL=}" - - # support any / in LABEL= path (escape to \x2f) - case "${ROOT}" in - */*) - if command -v sed >/dev/null 2>&1; then - ROOT="$(echo ${ROOT} | sed 's,/,\\x2f,g')" - else - if [ "${ROOT}" != "${ROOT#/}" ]; then - ROOT="\x2f${ROOT#/}" - fi - if [ "${ROOT}" != "${ROOT%/}" ]; then - ROOT="${ROOT%/}\x2f" - fi - IFS='/' - newroot= - for s in $ROOT; do - newroot="${newroot:+${newroot}\\x2f}${s}" - done - unset IFS - ROOT="${newroot}" - fi - esac - ROOT="/dev/disk/by-label/${ROOT}" - ;; - UUID=*) - ROOT="/dev/disk/by-uuid/${ROOT#UUID=}" - ;; - /dev/nfs) - [ -z "${BOOT}" ] && BOOT=nfs - ;; - esac - ;; + ROOT=$(resolve_device "$ROOT") + if [ -z "${BOOT}" ] && [ "$ROOT" = "/dev/nfs" ]; then + BOOT=nfs + fi + ;; rootflags=*) ROOTFLAGS="-o ${x#rootflags=}" ;; diff -Nru initramfs-tools-0.103ubuntu4.2/scripts/functions initramfs-tools-0.103ubuntu4.3/scripts/functions --- initramfs-tools-0.103ubuntu4.2/scripts/functions 2013-10-24 16:38:58.000000000 -0400 +++ initramfs-tools-0.103ubuntu4.3/scripts/functions 2016-02-23 11:09:08.000000000 -0500 @@ -503,3 +503,45 @@ command -v udevadm >/dev/null 2>&1 || return 0 udevadm settle ${1:+--timeout=$1} } + +# Resolve device node from a name. This expands any LABEL or UUID. +# $1=name +# Resolved name is echoed. +resolve_device() { + DEV="$1" + + case $DEV in + LABEL=*) + DEV="${DEV#LABEL=}" + + # support any / in LABEL= path (escape to \x2f) + case "${DEV}" in + */*) + if command -v sed >/dev/null 2>&1; then + DEV="$(echo ${DEV} | sed 's,/,\\x2f,g')" + else + if [ "${DEV}" != "${DEV#/}" ]; then + DEV="\x2f${DEV#/}" + fi + if [ "${DEV}" != "${DEV%/}" ]; then + DEV="${DEV%/}\x2f" + fi + IFS='/' + newroot= + for s in $DEV; do + newroot="${newroot:+${newroot}\\x2f}${s}" + done + unset IFS + DEV="${newroot}" + fi + esac + DEV="/dev/disk/by-label/${DEV}" + ;; + UUID=*) + DEV="/dev/disk/by-uuid/${DEV#UUID=}" + ;; + esac + # Only canonicalise if a valid file, in case $DEV isn't a filename + [ -e "$DEV" ] && DEV=$(readlink -f "$DEV") + echo "$DEV" +} diff -Nru initramfs-tools-0.103ubuntu4.2/scripts/local initramfs-tools-0.103ubuntu4.3/scripts/local --- initramfs-tools-0.103ubuntu4.2/scripts/local 2014-06-04 00:02:30.000000000 -0400 +++ initramfs-tools-0.103ubuntu4.3/scripts/local 2016-02-23 11:11:24.000000000 -0500 @@ -84,6 +84,8 @@ run_scripts /scripts/local-premount [ "$quiet" != "y" ] && log_end_msg + ROOT=$(resolve_device "$ROOT") + if [ "${readonly}" = "y" ] && \ [ -z "$LOOP" ]; then roflag=-r