Bug#685659: initramfs-tools: please use blkid to resolve LABEL= and UUID=
Package: initramfs-tools
Version: 0.107
Severity: wishlist
Tags: patch
It would be nice if the following chage (see attached patch) was made
to /usr/share/initramfs-tools/init, which changes the script to uses
blkid instead of /dev/disk/by-{label,uuid}. The reason why I consider
this an improvement is that it allows df to show the actual device:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 73759976 21773136 48240024 32% /
udev 10240 0 10240 0% /dev
tmpfs 1610688 816 1609872 1% /run
/dev/sdc1 73759976 21773136 48240024 32% /
without this patch, you end up with a much uglier df output, which looks especially horrid for those of us who like 80 character terminals:
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 73759976 21773136 48240024 32% /
udev 10240 0 10240 0% /dev
tmpfs 1610688 816 1609872 1% /run
/dev/disk/by-uuid/a623d491-1394-41c9-a820-eedafb2981cf 73759976 21773136 48240024 32% /
I've made this change locally, but I suspect other people would
appreciate this and consider it an improvement.
Thanks, regards,
- Ted
--- /usr/share/initramfs-tools/init.orig 2012-07-09 13:03:57.000000000 -0400
+++ /usr/share/initramfs-tools/init 2012-08-22 21:18:21.028984845 -0400
@@ -95,10 +95,10 @@
ROOT="${newroot}"
fi
esac
- ROOT="/dev/disk/by-label/${ROOT}"
+ ROOT=$(blkid -L ${ROOT})
;;
UUID=*)
- ROOT="/dev/disk/by-uuid/${ROOT#UUID=}"
+ ROOT=$(blkid -U ${ROOT#UUID=})
;;
/dev/nfs)
[ -z "${BOOT}" ] && BOOT=nfs
-- System Information:
Debian Release: wheezy/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.5.0-00076-g0cf1598 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages initramfs-tools depends on:
ii cpio 2.11-8
ii klibc-utils 2.0.1-1
ii kmod 8-2
ii module-init-tools 8-2
ii udev 175-3.1
Versions of packages initramfs-tools recommends:
pn busybox | busybox-initramfs | busybox-static <none>
Versions of packages initramfs-tools suggests:
ii bash-completion 1:2.0-1
-- no debconf information
-- debsums errors found:
debsums: changed file /usr/share/initramfs-tools/init (from initramfs-tools package)
Reply to: