update-initramfs, wubi: bad check for read-only /boot partition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: initramfs-tools
This bug appears on a gutsy wubi installation, but I think it is a general problem in update-initramfs (version 0.85eubuntu20).
EDIT: Debian already fixed this. See Debian bug #451151
update-initramfs checks whether /boot is mounted read-only with this awk line (l. 263-264):
> (awk '/boot/{if (match($4, /ro/) && $2 == "/boot") print "ro"}' /proc/mounts
However, on my machine the corresponding line in /proc/mounts says:
> /dev/disk/
I'm not an expert in awk, but I think it is matching the 'ro' from 'gROup'. The result is that update-initramfs refuses to work:
> sudo update-initramfs -vu
> WARNING: /boot is ro mounted.
> update-initramfs: Not updating /boot/initrd.
An ugly fix would be to match the pattern /^ro/ because all mounts in /proc/mounts seem to have the rw/ro state in the first position, but there is probably a more elegant way.
In ver 0.85eubuntu21 = current hardy package, it is still the same.
description: | updated |
Changed in initramfs-tools: | |
status: | New → Fix Released |
running 8.04 server and was getting same thing with
UUID=f13f0150- 047b-40bc- abb9-64e8d43a5e 09 /boot ext2 suid,errors= remount- ro,dev, exec 0 2
the string in /usr/sbin/ update- initramfs was
boot_opts=$(awk '/boot/{if (match($4, /([^a-zA- Z0-9]|^ )ro([^a- zA-Z0-9] |$)/) && $2 == "/boot") print "ro"}' /proc/mounts)
I added "\-"
boot_opts=$(awk '/boot/{if (match($4, /([^a-zA- Z0-9\-] |^)ro([ ^a-zA-Z0- 9]|$)/) && $2 == "/boot") print "ro"}' /proc/mounts)
its it no longer picks up the "remount-ro"