Bug#451151: initramfs-tools: update-initramfs mistakes errors=remount-ro mount option as read-only
Package: initramfs-tools
Version: 0.91b
Severity: important
update-initramfs does not update initrd.img if /proc/mounts contains
errors=remount-ro. Instead, I get the following message:
WARNING: /boot is ro mounted.
update-initramfs: Not updating /boot/initrd.img-2.6.24-rc2-x61s
Reason for this behaviour is the awk expression in line 524 of
update-initramfs, which just checks for the presence of the string "ro".
Instead, it should check for 'ro' at the beginning of the string, or
following a , separator:
boot_opts=$(awk '/boot/{if (match($4, /^ro/) || match($4, /,ro/) && $2 == "/boot") print "ro"}' /proc/mounts)
-- Package-specific info:
-- /proc/cmdline
root=/dev/mapper/x61s-root ro resume=/dev/sda3 usbcore.autosuspend=1
-- /proc/filesystems
cramfs
ext3
-- lsmod
Module Size Used by
i915 22144 2
drm 73748 3 i915
rfcomm 36624 0
l2cap 22784 5 rfcomm
bluetooth 52948 4 rfcomm,l2cap
uinput 8640 1
ppdev 8580 0
parport_pc 32728 0
lp 10860 0
parport 34056 3 ppdev,parport_pc,lp
acpi_cpufreq 8660 1
cpufreq_powersave 1664 0
cpufreq_stats 5004 0
cpufreq_userspace 4012 0
cpufreq_conservative 7112 0
ipv6 232968 12
tun 10816 1
firewire_sbp2 13964 0
loop 16068 0
arc4 1920 2
ecb 3392 2
snd_hda_intel 264092 0
pcmcia 36852 0
snd_pcm_oss 37792 0
snd_mixer_oss 15168 1 snd_pcm_oss
snd_pcm 70596 2 snd_hda_intel,snd_pcm_oss
sdhci 16388 0
thinkpad_acpi 46240 0
iwl4965 182816 0
nvram 8328 2 thinkpad_acpi
ac 5828 2
battery 13060 0
power_supply 9796 2 ac,battery
mmc_core 46852 1 sdhci
yenta_socket 24460 1
rsrc_nonstatic 11648 1 yenta_socket
pcmcia_core 36628 3 pcmcia,yenta_socket,rsrc_nonstatic
firmware_class 9280 2 pcmcia,iwl4965
i2c_i801 8336 0
rtc 12312 0
snd_timer 20804 1 snd_pcm
video 18320 0
output 3584 1 video
psmouse 35792 0
button 8208 0
i2c_core 22336 1 i2c_i801
mac80211 112716 1 iwl4965
serio_raw 6596 0
pcspkr 2880 0
evdev 10816 7
snd 48340 5 snd_hda_intel,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
cfg80211 13192 1 mac80211
soundcore 7364 1 snd
snd_page_alloc 9928 2 snd_hda_intel,snd_pcm
intel_agp 22868 1
agpgart 31348 3 drm,intel_agp
ext3 121608 4
jbd 43412 1 ext3
mbcache 8192 1 ext3
sha256_generic 11072 0
aes_generic 26600 0
aes_i586 32500 4
geode_aes 5896 0
cbc 4352 2
blkcipher 6340 3 ecb,geode_aes,cbc
dm_crypt 13060 1
dm_mirror 21376 0
dm_snapshot 16740 0
dm_mod 52528 14 dm_crypt,dm_mirror,dm_snapshot
generic 4228 0 [permanent]
piix 7300 0 [permanent]
ide_core 108164 2 generic,piix
sd_mod 26624 4
ata_piix 16836 0
ahci 25988 3
ata_generic 7236 0
libata 140240 3 ata_piix,ahci,ata_generic
firewire_ohci 16576 0
firewire_core 38984 2 firewire_sbp2,firewire_ohci
crc_itu_t 2048 1 firewire_core
scsi_mod 138016 3 firewire_sbp2,sd_mod,libata
uhci_hcd 23120 0
ehci_hcd 31500 0
usbcore 131752 3 uhci_hcd,ehci_hcd
e1000 110912 0
thermal 15708 0
processor 34112 4 acpi_cpufreq,thermal
fan 4420 0
-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
relative_links = yes
do_bootloader = no
do_bootfloppy = no
do_initrd = yes
link_in_boot = no
-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
BOOT=local
DEVICE=eth0
NFSROOT=auto
-- /etc/crypttab
sda5_crypt /dev/sda5 none luks
sda6_crypt /dev/sda6 none luks,swap
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.24-rc1-x61s (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages initramfs-tools depends on:
ii cpio 2.9-6 GNU cpio -- a program to manage ar
ii klibc-utils 1.5.7-2 small statically-linked utilities
ii module-init-tools 3.3-pre11-4 tools for managing Linux kernel mo
ii udev 0.114-2 /dev/ and hotplug management daemo
Versions of packages initramfs-tools recommends:
ii busybox 1:1.1.3-5 Tiny utilities for small and embed
-- no debconf information
Reply to: