[Hardy]setting up linux-ubuntu-modules fails with WARNING: /boot is ro mounted

Bug #197470 reported by sibidiba
6
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Medium
Ben Collins

Bug Description

Binary package hint: linux-ubuntu-modules-2.6.24-10-generic

When installing linux-ubuntu-modules-2.6.24-10-generic, the following error occurs:

$ sudo aptitude reinstall linux-ubuntu-modules-2.6.24-10-generic
(...)
Setting up linux-ubuntu-modules-2.6.24-10-generic (2.6.24-10.14) ...
WARNING: /boot is ro mounted.
update-initramfs: Not updating /boot/initrd.img-2.6.24-10-generic

/boot is an ext3 partition, mounted rw for sure, with free space available.

Revision history for this message
sibidiba (sibidiba) wrote :

More worse, the kernel doesn't boot up, I opened a separate bug report for that:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/197480

Revision history for this message
Daniel Hahler (blueyed) wrote :

Assigning the bug to update-initramfs, which appears to be the root of the problem here.

Changed in linux-ubuntu-modules-2.6.24:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Leann Ogasawara (leannogasawara) wrote :

Hi Gabor,

You had mentioned that bug 197480 is resolved for you with 2.6.24-11. Just curious if this bug is also resolved? Thanks.

Changed in initramfs-tools:
status: Triaged → Incomplete
Revision history for this message
sibidiba (sibidiba) wrote :
Download full text (5.3 KiB)

No it didn't:

$ sudo aptitude reinstall linux-image-2.6.24-11-generic
[sudo] password for czigola:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages will be REINSTALLED:
  linux-image-2.6.24-11-generic
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/19,9MB of archives. After unpacking 0B will be used.
Writing extended state information... Done
(Reading database ... 200045 files and directories currently installed.)
Preparing to replace linux-image-2.6.24-11-generic 2.6.24-11.17 (using .../linux-image-2.6.24-11-generic_2.6.24-11.17_i386.deb) ...
Done.
Unpacking replacement linux-image-2.6.24-11-generic ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.24-11-generic
Found kernel: /vmlinuz-2.6.24-8-generic
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done
Setting up linux-image-2.6.24-11-generic (2.6.24-11.17) ...
Running depmod.

WARNING: /boot is ro mounted.
update-initramfs: Not updating /boot/initrd.img-2.6.24-11-generic

Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.24-11.17 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.24-11.17 was configured last, according to dpkg)
Running postinst hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.24-11-generic
Found kernel: /vmlinuz-2.6.24-8-generic
Found kernel: /memtest86+.bin
Updating /boot/grub/menu.lst ... done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done

Indeed /boot/initrd.img-2.6.24-11-generic is present, but was not touched.

I moved /boot/initrd.img-2.6.24-11-generic to /tmp , and tried to reinstall the package again, now I got an error:
Preparing to replace linux-image-2.6.24-11-generic 2.6.24-11.17 (using .../linux-image-2.6.24-11-generic_2.6.24-11.17_i386.deb) ...
Done.
Unpacking replacement linux-image-2.6.24-11-generic ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /vmlinuz-2.6.24-11-generic
Found kernel: /vmlinuz-2.6.24-8-generic
Found kernel: /memtest86+.bin
Replacing config file /va...

Read more...

Revision history for this message
sibidiba (sibidiba) wrote :

The warning message comes from the postinst script (line 836 for linux-image-2.6.24-11-generic).
The script would execute: update-initramfs -u -k 2.6.24-11-generic

And
$ sudo update-initramfs -u -k `uname -r`
WARNING: /boot is ro mounted.
update-initramfs: Not updating /boot/initrd.img-2.6.24-11-generic

$ sudo strace -f -o /tmp/strace.update-initramfs update-initramfs -u -k `uname -r`
reveals the source of the problem:

98 13113 open("/proc/mounts", O_RDONLY) = 3
99 13113 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf8551b8) = -1 ENOTTY (Inappropriate ioctl for device)
100 13113 read(3, "rootfs / rootfs rw 0 0\nnone /sys"..., 4096) = 1016
101 13113 read(3, "", 3080) = 0
102 13113 fstat64(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
103 13113 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7f6b000
104 13113 close(3) = 0
105 13113 write(1, "ro\n", 3 <unfinished ...>
106 13112 <... read resumed> "ro\n", 128) = 3
107 13113 <... write resumed> ) = 3
108 13112 read(3, <unfinished ...>
109 13113 close(1 <unfinished ...>
110 13112 <... read resumed> "", 128) = 0
111 13113 <... close resumed> ) = 0
112 13112 close(3 <unfinished ...>
113 13113 munmap(0xb7f6b000, 4096 <unfinished ...>
114 13112 <... close resumed> ) = 0
115 13113 <... munmap resumed> ) = 0
116 13112 wait4(-1, <unfinished ...>
117 13113 close(2) = 0
118 13113 exit_group(0) = ?
119 13112 <... wait4 resumed> [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 13113
120 13112 --- SIGCHLD (Child exited) @ 0 (0) ---
121 13112 write(1, "WARNING: /boot is ro mounted.\n", 30) = 30
122 13112 write(1, "update-initramfs: Not updating /"..., 66) = 66

Whereby the corresponding line of /proc/mounts is:
/dev/sda1 /boot ext3 rw,noatime,errors=remount-ro,data=ordered 0 0

There is a matching ro in the line.
If I remounted /boot without the errors=remount-ro option, the bug was gone!

update-initramfs does not match correctly for 'ro' in /proc/mounts

Changed in initramfs-tools:
assignee: nobody → gab++
status: Incomplete → In Progress
Revision history for this message
sibidiba (sibidiba) wrote :

fix attached

Changed in initramfs-tools:
assignee: gab++ → ubuntu-kernel-team
status: In Progress → Triaged
Changed in initramfs-tools:
assignee: ubuntu-kernel-team → ben-collins
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.85eubuntu30

---------------
initramfs-tools (0.85eubuntu30) hardy; urgency=low

  * Fix check for "ro" on /boot
    - LP: #197470

 -- Ben Collins <email address hidden> Tue, 11 Mar 2008 14:41:15 -0400

Changed in initramfs-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.