public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] contents of /dev after initial installation
@ 2005-12-02  2:35 Matthias Langer
  2005-12-02  2:47 ` Stephen Bennett
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Matthias Langer @ 2005-12-02  2:35 UTC (permalink / raw
  To: gentoo-dev@lists.gentoo.org

I'm just a more or less simple user of gentoo who somtimes tries to look
a bit behind the curtain, so if you think this posting doesn't belong to
gentoo-dev let me know.

However, maybe this is interesting to you:

Recently i've got serious trouble with one of my hard drives, so that i
was forced to move my gentoo root partition from one hd to another. I
successfully did so by mainly rsync -av source dest directory after
diretcory. However, there are /proc, /dev and /sys which are different.
Especially on the /dev part i was unsure how to do this, so i looked at
the gentoo-udev guide once again, and found out, that for a working
udev, which i can confirm as i'm writing this mail, only the nodes
console and null are requred to exist in the /dev diretory initially.
That's the reason why i was i little bit surprised as

# mkdir test
# mount --bind / test
# cd test/dev
# ls

revealed that there are in fact hundrets of premade device nodes in the /dev directory. 
And this is not only true for the box where i discovered this, which was brought up from a
2004.x cd, but also true for the box where i just installed gentoo from 2005.1-r1.

Is there any reason for this ?

Matthias


-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  2:35 [gentoo-dev] contents of /dev after initial installation Matthias Langer
@ 2005-12-02  2:47 ` Stephen Bennett
  2005-12-02  3:45   ` Georgi Georgiev
  2005-12-02 14:15 ` Petteri Räty
  2005-12-24 15:43 ` Bjarke Istrup Pedersen
  2 siblings, 1 reply; 16+ messages in thread
From: Stephen Bennett @ 2005-12-02  2:47 UTC (permalink / raw
  To: gentoo-dev

On Fri, 02 Dec 2005 03:35:23 +0100
Matthias Langer <mlangc@gmx.at> wrote:

> revealed that there are in fact hundrets of premade device nodes in
> the /dev directory. And this is not only true for the box where i
> discovered this, which was brought up from a 2004.x cd, but also true
> for the box where i just installed gentoo from 2005.1-r1.
> 
> Is there any reason for this ?

Not all systems use udev or devfs. Plus, it's nice to be able to boot
the system when your dynamic /dev management fails for whatever reason.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  2:47 ` Stephen Bennett
@ 2005-12-02  3:45   ` Georgi Georgiev
  2005-12-02  3:57     ` Stephen Bennett
                       ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Georgi Georgiev @ 2005-12-02  3:45 UTC (permalink / raw
  To: gentoo-dev

maillog: 02/12/2005-02:47:55(+0000): Stephen Bennett types
> On Fri, 02 Dec 2005 03:35:23 +0100
> Matthias Langer <mlangc@gmx.at> wrote:
> 
> > revealed that there are in fact hundrets of premade device nodes in
> > the /dev directory. And this is not only true for the box where i
> > discovered this, which was brought up from a 2004.x cd, but also true
> > for the box where i just installed gentoo from 2005.1-r1.
> > 
> > Is there any reason for this ?
> 
> Not all systems use udev or devfs. Plus, it's nice to be able to boot
> the system when your dynamic /dev management fails for whatever reason.

I don't need a fully populated /dev to get a working shell with
init=/bin/bash on the kernel cmdline. And at that point it is easy to
run /dev/MAKEDEV and get whatever devices are needed for
troubleshooting.

I of course assume that if the dynamic /dev management fails, then we
need to *recover* instead of trying to get the system up as usual. And I
also assume that the init scripts will anyway tell me "fatal error: give
root password for maintenance or Ctrl-D to continue" if I have something
vital missing from /dev.

-- 
 /   Georgi Georgiev    / Darth Vader sleeps with a Teddywookie.      /
\     chutz@gg3.net    \                                             \
 / http://www.gg3.net/  /                                             /
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  3:45   ` Georgi Georgiev
@ 2005-12-02  3:57     ` Stephen Bennett
  2005-12-02  5:32       ` Georgi Georgiev
  2005-12-02  4:43     ` Greg KH
  2005-12-02 13:16     ` Mike Frysinger
  2 siblings, 1 reply; 16+ messages in thread
From: Stephen Bennett @ 2005-12-02  3:57 UTC (permalink / raw
  To: gentoo-dev

On Fri, 2 Dec 2005 12:45:00 +0900
Georgi Georgiev <chutz@gg3.net> wrote:

> I don't need a fully populated /dev to get a working shell with
> init=/bin/bash on the kernel cmdline. And at that point it is easy to
> run /dev/MAKEDEV and get whatever devices are needed for
> troubleshooting.

Still more effort than booting into a system that is pretty much
fully-functional already to fix it.

> I of course assume that if the dynamic /dev management fails, then we
> need to *recover* instead of trying to get the system up as usual.
> And I also assume that the init scripts will anyway tell me "fatal
> error: give root password for maintenance or Ctrl-D to continue" if I
> have something vital missing from /dev.

See above. And that still doesn't address the issue that some people
don't even want dynamic device management in the first place.
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  3:45   ` Georgi Georgiev
  2005-12-02  3:57     ` Stephen Bennett
@ 2005-12-02  4:43     ` Greg KH
  2005-12-02 13:17       ` Mike Frysinger
  2005-12-02 13:16     ` Mike Frysinger
  2 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2005-12-02  4:43 UTC (permalink / raw
  To: gentoo-dev

On Fri, Dec 02, 2005 at 12:45:00PM +0900, Georgi Georgiev wrote:
> maillog: 02/12/2005-02:47:55(+0000): Stephen Bennett types
> > On Fri, 02 Dec 2005 03:35:23 +0100
> > Matthias Langer <mlangc@gmx.at> wrote:
> > 
> > > revealed that there are in fact hundrets of premade device nodes in
> > > the /dev directory. And this is not only true for the box where i
> > > discovered this, which was brought up from a 2004.x cd, but also true
> > > for the box where i just installed gentoo from 2005.1-r1.
> > > 
> > > Is there any reason for this ?
> > 
> > Not all systems use udev or devfs. Plus, it's nice to be able to boot
> > the system when your dynamic /dev management fails for whatever reason.
> 
> I don't need a fully populated /dev to get a working shell with
> init=/bin/bash on the kernel cmdline. And at that point it is easy to
> run /dev/MAKEDEV and get whatever devices are needed for
> troubleshooting.
> 
> I of course assume that if the dynamic /dev management fails, then we
> need to *recover* instead of trying to get the system up as usual. And I
> also assume that the init scripts will anyway tell me "fatal error: give
> root password for maintenance or Ctrl-D to continue" if I have something
> vital missing from /dev.

If udev fails, and you have a completly empty /dev, you will not get any
console output at all for this type of message to be shown :(

So it's better to be safe than sorry.

That being said, my boxes have an empty /dev...

thanks,

greg k-h
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  3:57     ` Stephen Bennett
@ 2005-12-02  5:32       ` Georgi Georgiev
  0 siblings, 0 replies; 16+ messages in thread
From: Georgi Georgiev @ 2005-12-02  5:32 UTC (permalink / raw
  To: gentoo-dev

maillog: 02/12/2005-03:57:20(+0000): Stephen Bennett types
> On Fri, 2 Dec 2005 12:45:00 +0900
> Georgi Georgiev <chutz@gg3.net> wrote:
> 
> > I don't need a fully populated /dev to get a working shell with
> > init=/bin/bash on the kernel cmdline. And at that point it is easy to
> > run /dev/MAKEDEV and get whatever devices are needed for
> > troubleshooting.
> 
> Still more effort than booting into a system that is pretty much
> fully-functional already to fix it.
> 
> > I of course assume that if the dynamic /dev management fails, then we
> > need to *recover* instead of trying to get the system up as usual.
> > And I also assume that the init scripts will anyway tell me "fatal
> > error: give root password for maintenance or Ctrl-D to continue" if I
> > have something vital missing from /dev.
> 
> See above. And that still doesn't address the issue that some people
> don't even want dynamic device management in the first place.

Crap! I was so positive there's a use flag for udev somewhere. Since you
have to accommodate for all possibilities, I'd have to agree with you
here.

-- 
()   Georgi Georgiev   () <lux> if macOS is for the computer         ()
()    chutz@gg3.net    () illiterate, then windoze is for the        ()
() http://www.gg3.net/ () computer masochists                        ()
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  3:45   ` Georgi Georgiev
  2005-12-02  3:57     ` Stephen Bennett
  2005-12-02  4:43     ` Greg KH
@ 2005-12-02 13:16     ` Mike Frysinger
  2 siblings, 0 replies; 16+ messages in thread
From: Mike Frysinger @ 2005-12-02 13:16 UTC (permalink / raw
  To: gentoo-dev

On Fri, Dec 02, 2005 at 12:45:00PM +0900, Georgi Georgiev wrote:
> maillog: 02/12/2005-02:47:55(+0000): Stephen Bennett types
> > On Fri, 02 Dec 2005 03:35:23 +0100
> > Matthias Langer <mlangc@gmx.at> wrote:
> > 
> > > revealed that there are in fact hundrets of premade device nodes in
> > > the /dev directory. And this is not only true for the box where i
> > > discovered this, which was brought up from a 2004.x cd, but also true
> > > for the box where i just installed gentoo from 2005.1-r1.
> > > 
> > > Is there any reason for this ?
> > 
> > Not all systems use udev or devfs. Plus, it's nice to be able to boot
> > the system when your dynamic /dev management fails for whatever reason.
> 
> I don't need a fully populated /dev to get a working shell with
> init=/bin/bash on the kernel cmdline. And at that point it is easy to
> run /dev/MAKEDEV and get whatever devices are needed for
> troubleshooting.

assuming the user knows what MAKEDEV is let alone how to use it
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  4:43     ` Greg KH
@ 2005-12-02 13:17       ` Mike Frysinger
  2005-12-02 17:00         ` Greg KH
  0 siblings, 1 reply; 16+ messages in thread
From: Mike Frysinger @ 2005-12-02 13:17 UTC (permalink / raw
  To: gentoo-dev

On Thu, Dec 01, 2005 at 08:43:32PM -0800, Greg KH wrote:
> That being said, my boxes have an empty /dev...

you so sure about that ?  if your /dev is completely empty, you wont
get any init output because the kernel cant find /dev/console ... and
the init scripts will get pissed when they try to pipe output into
/dev/null (before udev is started) and the command errors out with
/dev being read-only
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  2:35 [gentoo-dev] contents of /dev after initial installation Matthias Langer
  2005-12-02  2:47 ` Stephen Bennett
@ 2005-12-02 14:15 ` Petteri Räty
  2005-12-02 14:46   ` Mike Frysinger
  2005-12-24 15:43 ` Bjarke Istrup Pedersen
  2 siblings, 1 reply; 16+ messages in thread
From: Petteri Räty @ 2005-12-02 14:15 UTC (permalink / raw
  To: gentoo-dev

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

Matthias Langer wrote:
> revealed that there are in fact hundrets of premade device nodes in the /dev directory. 
> And this is not only true for the box where i discovered this, which was brought up from a
> 2004.x cd, but also true for the box where i just installed gentoo from 2005.1-r1.
> 
> Is there any reason for this ?
> 
> Matthias
> 
> 

# UDEV OPTION:
# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev does not handle/know about.

RC_DEVICE_TARBALL="no"

Do you have this set to yes in /etc/conf.d/rc ?

Regards,
Petteri

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02 14:15 ` Petteri Räty
@ 2005-12-02 14:46   ` Mike Frysinger
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Frysinger @ 2005-12-02 14:46 UTC (permalink / raw
  To: gentoo-dev

On Fri, Dec 02, 2005 at 04:15:30PM +0200, Petteri R??ty wrote:
> Matthias Langer wrote:
> > revealed that there are in fact hundrets of premade device nodes in the /dev directory. 
> > And this is not only true for the box where i discovered this, which was brought up from a
> > 2004.x cd, but also true for the box where i just installed gentoo from 2005.1-r1.
> 
> # UDEV OPTION:
> # Set to "yes" if you want to save /dev to a tarball on shutdown
> # and restore it on startup.  This is useful if you have a lot of
> # custom device nodes that udev does not handle/know about.
> 
> RC_DEVICE_TARBALL="no"
> 
> Do you have this set to yes in /etc/conf.d/rc ?

he's talking about the /dev that is on the / partition, not the /dev
that gets mounted for udev
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02 13:17       ` Mike Frysinger
@ 2005-12-02 17:00         ` Greg KH
  2005-12-02 18:08           ` Mike Frysinger
  0 siblings, 1 reply; 16+ messages in thread
From: Greg KH @ 2005-12-02 17:00 UTC (permalink / raw
  To: gentoo-dev

On Fri, Dec 02, 2005 at 01:17:38PM +0000, Mike Frysinger wrote:
> On Thu, Dec 01, 2005 at 08:43:32PM -0800, Greg KH wrote:
> > That being said, my boxes have an empty /dev...
> 
> you so sure about that ?  if your /dev is completely empty, you wont
> get any init output because the kernel cant find /dev/console ... and
> the init scripts will get pissed when they try to pipe output into
> /dev/null (before udev is started) and the command errors out with
> /dev being read-only

No, all of the /dev/null reliance has been fixed.  You just don't get
any console output if you don't have that device node present until init
finishes.

But I did just check, and I do have 2 device nodes in my /dev/  I'll
work on making things work better if they aren't present...

thanks,

greg k-h
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02 17:00         ` Greg KH
@ 2005-12-02 18:08           ` Mike Frysinger
  2005-12-02 20:18             ` Matthijs van der Vleuten
  0 siblings, 1 reply; 16+ messages in thread
From: Mike Frysinger @ 2005-12-02 18:08 UTC (permalink / raw
  To: gentoo-dev

On Fri, Dec 02, 2005 at 09:00:25AM -0800, Greg KH wrote:
> On Fri, Dec 02, 2005 at 01:17:38PM +0000, Mike Frysinger wrote:
> > On Thu, Dec 01, 2005 at 08:43:32PM -0800, Greg KH wrote:
> > > That being said, my boxes have an empty /dev...
> > 
> > you so sure about that ?  if your /dev is completely empty, you wont
> > get any init output because the kernel cant find /dev/console ... and
> > the init scripts will get pissed when they try to pipe output into
> > /dev/null (before udev is started) and the command errors out with
> > /dev being read-only
> 
> No, all of the /dev/null reliance has been fixed.

sure, in Gentoo it's been fixed (i know cause i fixed it), but every
other distro i know of the boot system would bomb

my e-mail was just a follow up because a lot of people think they can
safely nuke /dev and then dont understand why their machines dont boot
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02 18:08           ` Mike Frysinger
@ 2005-12-02 20:18             ` Matthijs van der Vleuten
  2005-12-02 20:40               ` Mike Frysinger
  0 siblings, 1 reply; 16+ messages in thread
From: Matthijs van der Vleuten @ 2005-12-02 20:18 UTC (permalink / raw
  To: gentoo-dev

On 12/2/05, Mike Frysinger <vapier@gentoo.org> wrote:
> sure, in Gentoo it's been fixed (i know cause i fixed it), but every
> other distro i know of the boot system would bomb

Since when is Gentoo supporting other distro's boot systems?

-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02 20:18             ` Matthijs van der Vleuten
@ 2005-12-02 20:40               ` Mike Frysinger
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Frysinger @ 2005-12-02 20:40 UTC (permalink / raw
  To: gentoo-dev

On Fri, Dec 02, 2005 at 09:18:24PM +0100, Matthijs van der Vleuten wrote:
> On 12/2/05, Mike Frysinger <vapier@gentoo.org> wrote:
> > sure, in Gentoo it's been fixed (i know cause i fixed it), but every
> > other distro i know of the boot system would bomb
> 
> Since when is Gentoo supporting other distro's boot systems?

you missed the point

i didnt want an e-mail that says 'an empty /dev is A-OK, your system
will boot' hanging around for people to locate via google
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-02  2:35 [gentoo-dev] contents of /dev after initial installation Matthias Langer
  2005-12-02  2:47 ` Stephen Bennett
  2005-12-02 14:15 ` Petteri Räty
@ 2005-12-24 15:43 ` Bjarke Istrup Pedersen
  2005-12-24 18:59   ` Mike Frysinger
  2 siblings, 1 reply; 16+ messages in thread
From: Bjarke Istrup Pedersen @ 2005-12-24 15:43 UTC (permalink / raw
  To: gentoo-dev

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

Matthias Langer skrev:
> I'm just a more or less simple user of gentoo who somtimes tries to look
> a bit behind the curtain, so if you think this posting doesn't belong to
> gentoo-dev let me know.
> 
> However, maybe this is interesting to you:
> 
> Recently i've got serious trouble with one of my hard drives, so that i
> was forced to move my gentoo root partition from one hd to another. I
> successfully did so by mainly rsync -av source dest directory after
> diretcory. However, there are /proc, /dev and /sys which are different.
> Especially on the /dev part i was unsure how to do this, so i looked at
> the gentoo-udev guide once again, and found out, that for a working
> udev, which i can confirm as i'm writing this mail, only the nodes
> console and null are requred to exist in the /dev diretory initially.
> That's the reason why i was i little bit surprised as
> 
> # mkdir test
> # mount --bind / test
> # cd test/dev
> # ls
> 
> revealed that there are in fact hundrets of premade device nodes in the /dev directory. 
> And this is not only true for the box where i discovered this, which was brought up from a
> 2004.x cd, but also true for the box where i just installed gentoo from 2005.1-r1.
> 
> Is there any reason for this ?
> 
> Matthias
> 
> 

I know this topic is quiet old.
On my systems I only have /dev/{null,console} , and let udev managed the
rest.
When I do the install, I remove all the files in /dev (except those
two), and run mount --bind /dev /mnt/gentoo/dev , then I do the install,
and it works fine.

Is there any reason for not doing this, and then recommend that the
users that don't use udev/devfs to run MAKEDEV ?

Bjarke
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFDrWyhO+Ewtpi9rLERAmBcAKCmrYf4h0ToZXY5RjyfC+CG0Fu+wgCfazZm
QyPdHTlEF1vQR8XfMGyfNmw=
=byxb
-----END PGP SIGNATURE-----
-- 
gentoo-dev@gentoo.org mailing list



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

* Re: [gentoo-dev] contents of /dev after initial installation
  2005-12-24 15:43 ` Bjarke Istrup Pedersen
@ 2005-12-24 18:59   ` Mike Frysinger
  0 siblings, 0 replies; 16+ messages in thread
From: Mike Frysinger @ 2005-12-24 18:59 UTC (permalink / raw
  To: gentoo-dev; +Cc: Bjarke Istrup Pedersen

On Saturday 24 December 2005 10:43, Bjarke Istrup Pedersen wrote:
> Is there any reason for not doing this, and then recommend that the
> users that don't use udev/devfs to run MAKEDEV ?

because the process can easily go wrong leaving new users without a clue of 
whats going on
-mike
-- 
gentoo-dev@gentoo.org mailing list



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

end of thread, other threads:[~2005-12-24 19:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-02  2:35 [gentoo-dev] contents of /dev after initial installation Matthias Langer
2005-12-02  2:47 ` Stephen Bennett
2005-12-02  3:45   ` Georgi Georgiev
2005-12-02  3:57     ` Stephen Bennett
2005-12-02  5:32       ` Georgi Georgiev
2005-12-02  4:43     ` Greg KH
2005-12-02 13:17       ` Mike Frysinger
2005-12-02 17:00         ` Greg KH
2005-12-02 18:08           ` Mike Frysinger
2005-12-02 20:18             ` Matthijs van der Vleuten
2005-12-02 20:40               ` Mike Frysinger
2005-12-02 13:16     ` Mike Frysinger
2005-12-02 14:15 ` Petteri Räty
2005-12-02 14:46   ` Mike Frysinger
2005-12-24 15:43 ` Bjarke Istrup Pedersen
2005-12-24 18:59   ` Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox