Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] udev changes

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Arjan Bouter <abouter AT sourcemage.org>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] udev changes
  • Date: Tue, 17 May 2011 22:05:34 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 17 May 2011 21:24:16 +0200
Ladislav Hagara <ladislav.hagara AT unob.cz> wrote:

> >>>> GIT changes to devel-udev grimoire by Ladislav Hagara <hgr AT vabo.cz>:
> >>>>
> >>>> New branch 'devel-udev' available with the following commits:
> >>>> commit 28514f9f4cb11c0ae3b3b5e8a12e1c264cbbb147
> >>>> Author: Ladislav Hagara <hgr AT vabo.cz>
> >>>> Commit: Ladislav Hagara <hgr AT vabo.cz>
> >>>>
> >>>> init.d 2.2.8, /run mounted for udev
> >>>>
> >>>> commit 4a54e7764d0fb38fd650a7c54a754e5e28985676
> >>>> Author: Ladislav Hagara <hgr AT vabo.cz>
> >>>> Commit: Ladislav Hagara <hgr AT vabo.cz>
> >>>>
> >>>> udev 168, /run created
> >>>
> >>> Please test.
> >>> I created /run by udev spell, seems init.d could create it instead of
> >>> udev.
> >>>
> >>> No idea why, by time to time (I restarted my box several times) boot
> >>> fails during mountroot.sh (checking root file system, no /dev/sda6) but
> >>> after CTRL-D works like a charm. Need testing.
> >>
> >>
> >> I have tested this.
> >>
> >> I regularly got problems:
> >>
> >> non-existent file fsck.ext3 whiletrying to open /dev/sda7 -
> >> mountroot.sh
> >> failed.
> >>
> >> the subsequent reboot also failed.
> >>
> >> After several attempts, I disabled PARALLEL_INIT in /etc/syconfig/init
> >> and
> >> things started sucessfully
> >
> >
> >
> > On my box I don't use PATALLEL_INIT.
> > Having some time I was playing with it.
> > I added some debug info into mountroot.sh and found out that really the
> > file /dev/sda5 hadn't been created. When I added sleep 10 and tested
> > again the file /dec/sda6 had been already created. What to do with this?
> >
> >
> >
> > echo "Checking root file system..."
> > echo "HIHIHI"
> > echo /proc/mounts
> > cat /proc/mounts
> > echo ls -l /dev/s
> > ls -ld /dev/s*
> > echo "HIHIHI"
> > sleep 10
> > echo "NEXT ATTEMPT"
> > ls -ld /dev/s*
> > echo "HIHIHI"
> > /sbin/fsck -T -C $FIX $FORCE /
> > evaluate_retval
> >
>
>
> Instead of sleep 10 is possible to use:
>
> while ! -b /dev/sda6; do sleep 1; done
> :-)
>
>
> I found out and set these two variables in kernel (from 2.6.32):
>
> # zgrep CONFIG_DEVTMPFS /proc/config.gz
> CONFIG_DEVTMPFS=y
> CONFIG_DEVTMPFS_MOUNT=y
>
> >From http://cateee.net/lkddb/web-lkddb/DEVTMPFS.html :
>
> This creates a tmpfs filesystem, and mounts it at bootup and mounts it
> at /dev. The kernel driver core creates device nodes for all registered
> devices in that filesystem. All device nodes are owned by root and have
> the default mode of 0600. Userspace can add and delete the nodes as
> needed. This is intended to simplify bootup, and make it possible to
> delay the initial coldplug at bootup done by udev in userspace. It
> should also provide a simpler way for rescue systems to bring up a
> kernel with dynamic major/minor numbers. Meaningful symlinks,
> permissions and device ownership must still be handled by userspace.
>
>
> Imho, it is good idea to have it enabled. After we must remove this from
> %DEV/devices
>
> echo "Mounting ramfs at $udev_root"
> mount -n -t ramfs none $udev_root
>
>
> I updated init.d in devel-udev branch.
> Please test.
>
> Any protest?
>
> --
> Ladislav Hagara
>
>
>
>
>
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss

- From what I understand, you're having a couple of issues...

Devices not being available when filesystems are mounted caused by
PARALLEL_INIT sounds like it's caused by initscripts being started before the
previous runlevel is finished. PARALLEL_INIT should be limited to the current
runlevel.
This can easily be fixed by adding a --timeout=<seconds> to "udevadm settle".


The other issue, /run, is not related to PARALLEL_INIT in any way.
As I said on IRC, /run should be a tmpfs mounted as early as possible,
preferably somewhere in the top of the devices init script. Other distros are
doing it in initramfs from what I heard. It needs to be there as soon as
possible to avoid files in there disappearing when a tmpfs is mounted over
it.

Just my 0.02
Arjan

+=======
Source Mage GNU/Linux developer,
http://www.sourcemage.org
GnuPG Key 79D4B14E = 94AD 3FD1 E259 67ED 632E 2B06 CFBE 1154 79D4 B14E
+===
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk3S1Q4ACgkQz74RVHnUsU6XoQCePSOsJ0C6fPm8mWy/tbgIWeUE
8PQAnA/ol31EupcH9MOPc8mSencDsNzG
=bKrk
-----END PGP SIGNATURE-----



Archive powered by MHonArc 2.6.24.

Top of Page