linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* group ownership in initrd
@ 2005-06-21 22:17 rich turner
  2005-06-21 22:50 ` Kay Sievers
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rich turner @ 2005-06-21 22:17 UTC (permalink / raw)
  To: linux-hotplug

i am starting udev in my initrd and it is creating the devices with the
correct MODE permissions but it is not creating it with the correct
group permissions.

what i have in my initrd, among other things, is the entire /etc/udev
directory and the /sbin/udev and /sbin/udevstart executables. is there
something else i am missing that will create my device nodes with the
correct user and group ownership?



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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] 6+ messages in thread

* Re: group ownership in initrd
  2005-06-21 22:17 group ownership in initrd rich turner
@ 2005-06-21 22:50 ` Kay Sievers
  2005-06-21 23:17 ` rich turner
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2005-06-21 22:50 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Jun 21, 2005 at 03:17:24PM -0700, rich turner wrote:
> i am starting udev in my initrd and it is creating the devices with the
> correct MODE permissions but it is not creating it with the correct
> group permissions.
> 
> what i have in my initrd, among other things, is the entire /etc/udev
> directory and the /sbin/udev and /sbin/udevstart executables. is there
> something else i am missing that will create my device nodes with the
> correct user and group ownership?

Do you use numerical id's? If not, make sure initrd can resolve the name
to the uid/gid with prepared udev.

Kay


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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] 6+ messages in thread

* Re: group ownership in initrd
  2005-06-21 22:17 group ownership in initrd rich turner
  2005-06-21 22:50 ` Kay Sievers
@ 2005-06-21 23:17 ` rich turner
  2005-06-21 23:30 ` Kay Sievers
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rich turner @ 2005-06-21 23:17 UTC (permalink / raw)
  To: linux-hotplug

are the numerical id's you refer to the group ownership id's indicated
in the rules file?

are you saying that if i want to use udev in an initrd i will need to
include /etc/group (and perhaps /etc/passwd) in the initrd if my
ownership id's are names rather than numbers in my rules files?

On Wed, 2005-06-22 at 00:50 +0200, Kay Sievers wrote:
> On Tue, Jun 21, 2005 at 03:17:24PM -0700, rich turner wrote:
> > i am starting udev in my initrd and it is creating the devices with the
> > correct MODE permissions but it is not creating it with the correct
> > group permissions.
> > 
> > what i have in my initrd, among other things, is the entire /etc/udev
> > directory and the /sbin/udev and /sbin/udevstart executables. is there
> > something else i am missing that will create my device nodes with the
> > correct user and group ownership?
> 
> Do you use numerical id's? If not, make sure initrd can resolve the name
> to the uid/gid with prepared udev.
> 
> Kay



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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] 6+ messages in thread

* Re: group ownership in initrd
  2005-06-21 22:17 group ownership in initrd rich turner
  2005-06-21 22:50 ` Kay Sievers
  2005-06-21 23:17 ` rich turner
@ 2005-06-21 23:30 ` Kay Sievers
  2005-06-22 17:33 ` rich turner
  2005-06-22 17:47 ` Kay Sievers
  4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2005-06-21 23:30 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Jun 21, 2005 at 04:17:54PM -0700, rich turner wrote:
> On Wed, 2005-06-22 at 00:50 +0200, Kay Sievers wrote:
> > On Tue, Jun 21, 2005 at 03:17:24PM -0700, rich turner wrote:
> > > i am starting udev in my initrd and it is creating the devices with the
> > > correct MODE permissions but it is not creating it with the correct
> > > group permissions.
> > > 
> > > what i have in my initrd, among other things, is the entire /etc/udev
> > > directory and the /sbin/udev and /sbin/udevstart executables. is there
> > > something else i am missing that will create my device nodes with the
> > > correct user and group ownership?
> > 
> > Do you use numerical id's? If not, make sure initrd can resolve the name
> > to the uid/gid with prepared udev.

> are the numerical id's you refer to the group ownership id's indicated
> in the rules file?
> 
> are you saying that if i want to use udev in an initrd i will need to
> include /etc/group (and perhaps /etc/passwd) in the initrd if my
> ownership id's are names rather than numbers in my rules files?

Well, how could udev know the numbers? The kernel does not care about
your group names and therefore you have to avoid names or provide
everything neccessary to resolve it in initrd.

Kay


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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] 6+ messages in thread

* Re: group ownership in initrd
  2005-06-21 22:17 group ownership in initrd rich turner
                   ` (2 preceding siblings ...)
  2005-06-21 23:30 ` Kay Sievers
@ 2005-06-22 17:33 ` rich turner
  2005-06-22 17:47 ` Kay Sievers
  4 siblings, 0 replies; 6+ messages in thread
From: rich turner @ 2005-06-22 17:33 UTC (permalink / raw)
  To: linux-hotplug

i must still be missing something.

i have now included /etc/group and /etc/passwd in my initrd and the
ownership still is not getting created properly.

here is the rule that is used for /dev/pty* devices. it is found
in /etc/udev/rules.d/50-udev.rules:
KERNEL="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k",
GROUP="tty", MODE="666", OPTIONS="ignore_scripts"

when udev starts in my initrd it creates all of the pty devices but with
the wrong group ownership (the same result if i did not put /etc/passwd
and /etc/group in the initrd):
# ls -l /dev/ptya0
crw-rw-rw- 1 0   0   2,176  /dev/ptya0

when the system boots up, i can delete /dev/ptya0, run udevstart, and it
creates it properly. i must be missing something in my initrd.

On Wed, 2005-06-22 at 01:30 +0200, Kay Sievers wrote:
> On Tue, Jun 21, 2005 at 04:17:54PM -0700, rich turner wrote:
> > On Wed, 2005-06-22 at 00:50 +0200, Kay Sievers wrote:
> > > On Tue, Jun 21, 2005 at 03:17:24PM -0700, rich turner wrote:
> > > > i am starting udev in my initrd and it is creating the devices with the
> > > > correct MODE permissions but it is not creating it with the correct
> > > > group permissions.
> > > > 
> > > > what i have in my initrd, among other things, is the entire /etc/udev
> > > > directory and the /sbin/udev and /sbin/udevstart executables. is there
> > > > something else i am missing that will create my device nodes with the
> > > > correct user and group ownership?
> > > 
> > > Do you use numerical id's? If not, make sure initrd can resolve the name
> > > to the uid/gid with prepared udev.
> 
> > are the numerical id's you refer to the group ownership id's indicated
> > in the rules file?
> > 
> > are you saying that if i want to use udev in an initrd i will need to
> > include /etc/group (and perhaps /etc/passwd) in the initrd if my
> > ownership id's are names rather than numbers in my rules files?
> 
> Well, how could udev know the numbers? The kernel does not care about
> your group names and therefore you have to avoid names or provide
> everything neccessary to resolve it in initrd.
> 
> Kay
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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] 6+ messages in thread

* Re: group ownership in initrd
  2005-06-21 22:17 group ownership in initrd rich turner
                   ` (3 preceding siblings ...)
  2005-06-22 17:33 ` rich turner
@ 2005-06-22 17:47 ` Kay Sievers
  4 siblings, 0 replies; 6+ messages in thread
From: Kay Sievers @ 2005-06-22 17:47 UTC (permalink / raw)
  To: linux-hotplug

On Wed, Jun 22, 2005 at 10:33:17AM -0700, rich turner wrote:
> On Wed, 2005-06-22 at 01:30 +0200, Kay Sievers wrote:
> > On Tue, Jun 21, 2005 at 04:17:54PM -0700, rich turner wrote:
> > > On Wed, 2005-06-22 at 00:50 +0200, Kay Sievers wrote:
> > > > On Tue, Jun 21, 2005 at 03:17:24PM -0700, rich turner wrote:
> > > > > i am starting udev in my initrd and it is creating the devices with the
> > > > > correct MODE permissions but it is not creating it with the correct
> > > > > group permissions.
> > > > > 
> > > > > what i have in my initrd, among other things, is the entire /etc/udev
> > > > > directory and the /sbin/udev and /sbin/udevstart executables. is there
> > > > > something else i am missing that will create my device nodes with the
> > > > > correct user and group ownership?
> > > > 
> > > > Do you use numerical id's? If not, make sure initrd can resolve the name
> > > > to the uid/gid with prepared udev.
> > 
> > > are the numerical id's you refer to the group ownership id's indicated
> > > in the rules file?
> > > 
> > > are you saying that if i want to use udev in an initrd i will need to
> > > include /etc/group (and perhaps /etc/passwd) in the initrd if my
> > > ownership id's are names rather than numbers in my rules files?
> > 
> > Well, how could udev know the numbers? The kernel does not care about
> > your group names and therefore you have to avoid names or provide
> > everything neccessary to resolve it in initrd.

> i must still be missing something.
> 
> i have now included /etc/group and /etc/passwd in my initrd and the
> ownership still is not getting created properly.
> 
> here is the rule that is used for /dev/pty* devices. it is found
> in /etc/udev/rules.d/50-udev.rules:
> KERNEL="pty[pqrstuvwxyzabcdef][0123456789abcdef]", NAME="%k",
> GROUP="tty", MODE="666", OPTIONS="ignore_scripts"

You need to be able to resolve the names:
  o use klibc which does that by default
  o by compiling in a passwd parser to a static glibc build
  o or put the needed shared libs for glibc into your image

Kay


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id\x16492&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] 6+ messages in thread

end of thread, other threads:[~2005-06-22 17:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-21 22:17 group ownership in initrd rich turner
2005-06-21 22:50 ` Kay Sievers
2005-06-21 23:17 ` rich turner
2005-06-21 23:30 ` Kay Sievers
2005-06-22 17:33 ` rich turner
2005-06-22 17:47 ` Kay Sievers

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).