linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* starting with an empty /dev
@ 2004-02-13 10:24 Marco d'Itri
  2004-02-13 17:58 ` Mike Frysinger
  0 siblings, 1 reply; 2+ messages in thread
From: Marco d'Itri @ 2004-02-13 10:24 UTC (permalink / raw)
  To: linux-hotplug

IIRC initramfs already contains these devices, but anyway it's important
to remember that if they are removed everything will break.
Should we start thinking about how udev could be used in the real world?

----- Forwarded message from mat@nask.pl -----

From: mat@nask.pl
To: Marco d'Itri <md@Linux.IT>
Subject: Re: [udev] howto

On Wed, 4 Feb 2004, Marco d'Itri wrote:

> On Feb 04, mat@nask.pl wrote:
>
>  >Can You please explain me how to do it? Or point me to some link where it is
> You don't. Currently udev is experimental and uses /udev to not mess
> with your system. If you feel brave then make a symlink from /dev.

Maybe you dont care but I have installed udev and it is working for me great.
But there were some problems.

I have found that devices:
/dev/null,
/dev/console

are needed befode /etc/init.d/udev starts (/etc/rcS.d/S37udev) so I twisted
the init script not to remove those file during shutdown, and to create it
during booting only if needed.

I didnt know where should I send this thing (maybe this is only my problem) but
I use your debs so I am sending it to you.

Bye


-mat


This is the patch:


--- ./orig/udev	2004-02-03 22:23:02.000000000 +0100
+++ /etc/init.d/udev	2004-02-12 08:45:26.000000000 +0100
@@ -28,7 +28,19 @@
       export DEVPATH=${j#/sys}
       class=${DEVPATH#/class/}
       class=${class%/*}
-#      echo -n " $DEVPATH($class)"
+
+      special=${DEVPATH#/class/}
+      special=${special#$class/}
+      case "$special" in
+        null | console)
+           [ -c "/dev/$special" ] && continue
+           echo "/dev/$special included."
+           ;;
+        *)
+           #echo "$special -> udev."
+           ;;
+      esac
+      #echo -n " $DEVPATH($class)"
       { $UDEV $class || echo -n " failed: $DEVPATH"; } &
     done
   done
@@ -62,7 +74,7 @@
     [ -d /udev ] || mkdir /udev
     mount_sysfs
     export ACTION­d
-    echo -n "Creating initial udev device nodes..."
+    echo "Creating initial udev device nodes..."
     synthesize_events
     make_extra_nodes
     echo "done."


>
> --
> ciao, |
> Marco | [4460 diQvhSSO5SlHk]
>

-mat

----- End forwarded message -----

-- 
ciao, |
Marco | [4582 ig78KWqxlsXk.]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: starting with an empty /dev
  2004-02-13 10:24 starting with an empty /dev Marco d'Itri
@ 2004-02-13 17:58 ` Mike Frysinger
  0 siblings, 0 replies; 2+ messages in thread
From: Mike Frysinger @ 2004-02-13 17:58 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 1725 bytes --]

On Friday 13 February 2004 05:24 am, Marco d'Itri wrote:
> IIRC initramfs already contains these devices, but anyway it's important
> to remember that if they are removed everything will break.
> Should we start thinking about how udev could be used in the real world?

the devices that are needed are somewhat distro (well, init scripts) 
dependent ...

> Maybe you dont care but I have installed udev and it is working for me
> great. But there were some problems.

using /udev never even occurred to me ... i've been using udev on my /dev 
since 002 :x

> I have found that devices:
> /dev/null,
> /dev/console

like i said above, this is specific to your init scripts ...
/dev/console is needed if you want to see output from your init scripts ... 
you can boot *just fine* without it ... just wait a while into the getty's 
pop up :)
/dev/null is needed by your _init scripts_ ... many boot up scripts just pump 
their output into /dev/null and then when there are errors, they output happy 
little errors for the user to understand ... if, before you've loaded up 
udev, you try to pump into /dev/null and your / is ro, the init scripts are 
going to think the command it just tried to run failed and so in general, 
everything dies

i've already created a small patch for inclusion with the Gentoo baselayout to 
handle the case when /dev/null doesnt exist (yeah, i like to `rm -rf /dev/* ; 
sync ; reboot -nf` for fun ... no seriously, i do) that way if you dont have 
anything in /dev/, your machine will boot up and you can login to create 
whatever nodes you may need in order to have a 'normal' bootup (which is kind 
of where you're at matt, /dev/console and /dev/null)
-mike

[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-13 17:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-13 10:24 starting with an empty /dev Marco d'Itri
2004-02-13 17:58 ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).