FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 07-01-2008, 06:54 PM
Zbyszek Szmek
 
Default 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.



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 07-02-2008, 09:55 AM
maximilian attems
 
Default Bug#488865: initramfs-tools: buggy check for read-only /boot

On Tue, Jul 01, 2008 at 08:54:49PM +0200, Zbyszek Szmek wrote:
>
> 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):

right old kernels would print all options there.
anyway fixed in unstable version, just get it from backports.

> --- /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.
>
>
>
> --
> To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>



--
To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 06:40 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org