Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-08 Thread phelep . sebastien
[Petter Reinholdtsen]> Any error messages or anything else you can tell us to make it easier> to pinpoint the problem?Well, I must admit I didn't investigate that much.Just tried the patch, seen that the boot process hanged in the same way (as far as I can remember, the only difference was fsck complaining about rootdev instead of /dev/shm/root), and gave up.> Good.  How did you downgrade when the system was unbootable?  Did you> have to use a rescue CD?I'm that kind of lucky guy who had installed an amd64 system next to my i386 one.As I don't dist-upgrade it as frequently as the i386 one, the boot process ran fine, and I was able to mount my i386 root filesystem, chroot to it and launch dpkg for downgrade.I would have tested initscript from svn with great pleasure, but unfortunately I won't be back at home until sunday evening. Maybe a little too late to be useful ...Anyway, thanks for your great job !Avec Neuf, on peut envoyer jusqu'à 9Go par mail.Decouvrez Neuf Gigahttp://www.neufgiga.com



Bug#386347: [Pkg-sysvinit-devel] Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-08 Thread Wouter Bolsterlee
På Fri, Sep 08, 2006 at 09:18:33AM +0200, Petter Reinholdtsen skrev:
> [Sébastien Phélep]
> > Just in case other readers experience this same problem, I've been able to 
> > solve it by downgrading to 2.86.ds1-1 (as found in sarge).

> Good.  How did you downgrade when the system was unbootable?  Did you
> have to use a rescue CD?

I had to:

- boot in single-user mode
- manually mount -o remountrw my / partition
- manually initialize all lvm groups
- manually mount /usr
- manually mount /var
- manually set $PATH to include /usr/bin
- run apt-cache show initscripts |grep Version
- manually ifconfig/dhclient my network interface
- run apt-get install initscripts=2.86.ds1-15
- sync; reboot

In short: a disaster.

  hth, Wouter

-- 
:wq   mail [EMAIL PROTECTED]
  web http://uwstopia.nl

i awake to see that no one is free :: we're all fugitives-- coldplay


signature.asc
Description: Digital signature


Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-08 Thread Wouter Bolsterlee
På Fri, Sep 08, 2006 at 08:59:01AM +0200, Sébastien Phélep skrev:
> Just in case other readers experience this same problem, I've been able to
> solve it by downgrading to 2.86.ds1-1 (as found in sarge).

Downgrading to 2.86.ds1-15 works too.

  mvrgr, Wouter

-- 
:wq   mail [EMAIL PROTECTED]
  web http://uwstopia.nl

you asked me to kill your headache :: use a gun -- sneaker pimps


signature.asc
Description: Digital signature


Bug#386347: [Pkg-sysvinit-devel] Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-08 Thread Petter Reinholdtsen
[Sébastien Phélep]
> I gave it try, but it did not solve the problem, my system was still
> unbootable ...

Strange.  When I test the commands used in the patch, it work for me.
Any error messages or anything else you can tell us to make it easier
to pinpoint the problem?

> Just in case other readers experience this same problem, I've been able to 
> solve it by downgrading to 2.86.ds1-1 (as found in sarge).

Good.  How did you downgrade when the system was unbootable?  Did you
have to use a rescue CD?

Friendly,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-08 Thread Sébastien Phélep
[Petter Reinholdtsen]
> Did you test the patch?  Did it work?

I gave it try, but it did not solve the problem, my system was still 
unbootable ...

Just in case other readers experience this same problem, I've been able to 
solve it by downgrading to 2.86.ds1-1 (as found in sarge).

-- 
BOFH excuse #389:
/dev/clue was linked to /dev/null


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-07 Thread Petter Reinholdtsen
[Chip Salzenberg]
> Hrm.  Shirley, there's some name in there it could use safely...?
> Whatever that name is, checkroot.sh could mount a tmpfs on
> /dev/shm/ and create the root dev node under it.  BTW,
> checkroot.sh *does* remove the 'root' node, once the fsck is done,
> so what's the pollution issue?

I do not believe it is a good idea.  First of all, the current version
of checkroot.sh do not remove /dev/shm/root after it is done with it,
so at the moment there is name polution.  Second, /dev/shm/ is ment
for the shm* funcitions in glibc only. And checkroot isn't the only
one trying to misuse /dev/shm/, so I believe it is best for it to
stop, and for the others to stop as well.

Did you test the patch?  Did it work?

> What's the mtab.sh problem?

/etc/mtab isn't updated by mount early in the boot, because /etc/mtab
isn't writable.  If we could tell mount to write to some other tmpfs
during boot, we did not have to try to recreate it in mtab.sh, and
could just copy it over to /etc/, or leave /etc/mtab as a symlink into
the tmpfs file.  This would make it easier for diskless machines
(those booting from read-only NFS file systems like LTSP and
lessdisks), as they no longer have to work around the fact that
/etc/mtab is written to.

Friendly,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-07 Thread Chip Salzenberg
On Thu, Sep 07, 2006 at 04:11:07PM +0200, Petter Reinholdtsen wrote:
> [Chip Salzenberg]
> > The checkroot.sh init script sometimes needs to mknod the root
> > filesystem device as /dev/shm/root so it can fsck. [...]
> 
> Right.  Good point.  I have forgotten about that code.  It need to
> stop using /dev/shm/, as it is poluting the shm namespace.

Hrm.  Shirley, there's some name in there it could use safely...?  Whatever
that name is, checkroot.sh could mount a tmpfs on /dev/shm/ and
create the root dev node under it.  BTW, checkroot.sh *does* remove the
'root' node, once the fsck is done, so what's the pollution issue?

> An option might be to mount a private tmpfs (aka mounting it, chdir
> into it and umounting it, thus making it available only to the process
> running within it), but this will not make the life of mtab.sh easier.

What's the mtab.sh problem?
-- 
Chip Salzenberg <[EMAIL PROTECTED]>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-07 Thread Petter Reinholdtsen
[Chip Salzenberg]
> The checkroot.sh init script sometimes needs to mknod the root
> filesystem device as /dev/shm/root so it can fsck.  This worked
> fine, until the recent change that mounts /dev/shm with the nodev
> option.  Now, any system that fscks /dev/shm/root is unbootable.

Right.  Good point.  I have forgotten about that code.  It need to
stop using /dev/shm/, as it is poluting the shm namespace.

> I suppose the right fix is having checkroot.sh mount a new tmpfs as
> /dev/check; mknod /dev/check/root; fsck /dev/check/root; umount
> /dev/check.

Creating stuff under /dev/ is not an option, as /dev/ might be
read-only when checkroot.sh is running.

I suspect we need to revitalize the discussion on mounting a tmpfs on
/run/ or /lib/run/, to have some writable area available during boot.
This would make the mtab handling easier as well.

An option might be to mount a private tmpfs (aka mounting it, chdir
into it and umounting it, thus making it available only to the process
running within it), but this will not make the life of mtab.sh easier.

Ideas for solutions are welcome.  If we do not find a solution in the
next few days, I suggest we drop the nodev option on /dev/shm/ until
we do come up with a working solution.

Friendly,
-- 
Petter Reinholdtsen


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-07 Thread Petter Reinholdtsen
[Petter Reinholdtsen]
> An option might be to mount a private tmpfs (aka mounting it, chdir
> into it and umounting it, thus making it available only to the process
> running within it), but this will not make the life of mtab.sh easier.

Here is a draft patch for the private tmpfs approach.  It is untested,
as I am unsure how to provoke the test environment to actually try to
do fsck like that.  Can you test it?

It mounts on /tmp/ (randomly picked, it is not supposed to be writable
nor mounted at this point in the boot, so I believe it should be safe
to mount on top of it.  Next, it move into /tmp/, and finally umounts
/tmp/, removing all traces of the file system for all processes except
the running checkroot script.  After that, it behaves as before, with
the slight exception that it chdir out of the private temp directory
when it is no longer used by checkroot.  The path give to fsck need to
ve relative, as it only work as long as the current working directory
is the private tmpfs partition.

Index: debian/initscripts/etc/init.d/checkroot.sh
===
--- debian/initscripts/etc/init.d/checkroot.sh  (revisjon 855)
+++ debian/initscripts/etc/init.d/checkroot.sh  (arbeidskopi)
@@ -144,12 +144,15 @@
then
rootdev=/dev/root
else
+   # Using lazy umount, only available from kernel 2.4.11
if \
-   rm -f /dev/shm/root \
-   && mknod -m 600 /dev/shm/root b 
${rdev%:*} ${rdev#*:} \
-   && [ -e /dev/shm/root ]
+   mount -n -t tmpfs tmpfs /tmp \
+   && cd /tmp \
+   && umount -l /tmp \
+   && mknod -m 600 rootdev b ${rdev%:*} 
${rdev#*:} \
+   && [ -e rootdev ]
then
-   rootdev=/dev/shm/root
+   rootdev=rootdev
else
rootfatal=yes
fi
@@ -162,6 +165,7 @@
#
if [ "$rootfatal" = yes ]
then
+   cd / # Get out of the private tmpfs system if we moved in there
log_failure_msg "The device node $rootdev for the root 
filesystem is missing or incorrect 
 or there is no entry for the root filesystem listed in /etc/fstab. 
 The system is also unable to create a temporary node in /dev/shm. 
@@ -275,6 +279,7 @@
log_end_msg $FSCKCODE
fi
fi
+   cd / # Get out of the private tmpfs system if we moved in there
 
#
# If there was a failure, drop into single-user mode.



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Bug#386347: initscripts: BOOT FAILURE: checkroot.sh can't fsck /dev/shm/root because /dev/shm is mounted nodev

2006-09-06 Thread Chip Salzenberg
Package: initscripts
Version: 2.86.ds1-16
Severity: critical
Justification: breaks the whole system

The checkroot.sh init script sometimes needs to mknod the root filesystem
device as /dev/shm/root so it can fsck.  This worked fine, until the recent
change that mounts /dev/shm with the nodev option.  Now, any system that
fscks /dev/shm/root is unbootable.

I suppose the right fix is having checkroot.sh mount a new tmpfs as
/dev/check; mknod /dev/check/root; fsck /dev/check/root; umount /dev/check.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]