Bug#488865: initramfs-tools: buggy check for read-only /boot
Package: initramfs-tools
Version: 0.85h
Severity: normal
Tags: patch
The script /usr/sbin/update-initramfs checks if /boot is mounted read-only,
and aborts if so. Unfortunately, the test also triggers in other cases,
e.g. on option errors=continue (because this phrase contains 'ro').
A simple fix (check for 'ro' delimited by commas or the begging or the
end of options string):
--- /usr/sbin/update-initramfs.0 2008-07-01 20:31:03.000000000 +0200
+++ /usr/sbin/update-initramfs 2008-07-01 20:31:44.000000000 +0200
@@ -237,7 +237,7 @@
ro_boot_check()
{
[ -r /proc/mounts ] || return 0
- boot_opts=$(awk '/boot/{if (match($4, /ro/) && $2 == "/boot")
+ boot_opts=$(awk '/boot/{if (match($4, /(^|,)ro($|,)/) && $2 == "/boot")
print "ro"}' /proc/mounts)
if [ -n "${boot_opts}" ]; then
echo "WARNING: /boot is ro mounted."
-- System Information:
Omitted because reporting from different installation.
Reply to: