Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
cannot find name for group ID 11(chroot pblm)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Off the Wall
View previous topic :: View next topic  
Author Message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Thu Jul 03, 2008 11:07 am    Post subject: cannot find name for group ID 11(chroot pblm) Reply with quote

padoor ~ # chroot /mnt/hda9 /bin/bash
id: cannot find name for group ID 11
root@padoor:/#

what is problem?
it does take commands from the ubuntu installation in /dev/hda9
but i cannot compile a kernel for the ubuntu.
the installed livecd kernel died in the update the new kernel it installed drops me to (initramfs) shell.
is there any way out to restore old kernel?
i cannot chroot into gentoo (shown above)

i can provide more info if asked for what likes

help is appreciated. :)
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
Sadako
Advocate
Advocate


Joined: 05 Aug 2004
Posts: 3788
Location: sleeping in the bathtub

PostPosted: Thu Jul 03, 2008 11:49 am    Post subject: Reply with quote

Looks like there is no group in the chroot with the same GID as that of the user's (root, I presume?) default group.

what does `groups && echo $GROUPS` return?
_________________
"You have to invite me in"
Back to top
View user's profile Send private message
padoor
Advocate
Advocate


Joined: 30 Dec 2005
Posts: 4185
Location: india

PostPosted: Thu Jul 03, 2008 12:32 pm    Post subject: Reply with quote

padoor ~ # chroot /mnt/hda9 /bin/bash
id: cannot find name for group ID 11
root@padoor:/# groups && echo $GROUPS
root daemon bin sys adm disk uucp id: cannot find name for group ID 11
11 dialout tape sudo
root@padoor:/#

the ubuntu does not have root login. only user login.
only sudo
so how i can chroot?
_________________
reach out a little bit more to catch it (DON'T BELIEVE the advocate part under my user name)
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Mon Feb 03, 2014 1:15 pm    Post subject: Reply with quote

Exactly the same problem here when chroot from gentoo to ubuntu.

Has anyone got updates?
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16702

PostPosted: Mon Feb 03, 2014 3:14 pm    Post subject: Reply with quote

Not much to go on. The few times I've had issues with the chroot, the problem has been something I didn't do correctly in the setup prior to running chroot.

I'd reboot and try again and capture output for everything up to that point. Maybe more info will help.
_________________
Ladies and gentlemen, allow me to present, Man Not Caring. -- Perry Cox
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Mon Feb 03, 2014 4:06 pm    Post subject: Reply with quote

padoor wrote:
padoor ~ # chroot /mnt/hda9 /bin/bash
id: cannot find name for group ID 11
root@padoor:/# groups && echo $GROUPS
root daemon bin sys adm disk uucp id: cannot find name for group ID 11
11 dialout tape sudo
root@padoor:/#

the ubuntu does not have root login. only user login.
only sudo
so how i can chroot?
chroot only changes the root directory and invokes a programme with that new root directory. it does not modify anything about the user environment unless you specifically tell it to. the list of effective groups is a process parameter, so those are inherited and not modified.

in short, the root user outside of your chroot has different groups than those that exist inside the chroot. as a band aid you could copy /etc/groups to $CHROOT/etc/groups - make a backup before you do so, just to be on the safe side. this should, however, not affect your ability to compile anything - it's merely a warning, so if your host kernel dies while trying to compile in the chroot, something else is amiss as well.

did you mount --bind /proc, /dev, /dev/pts, /dev/shm and /sys from out of the chroot to the inside? things tend to get hairy if you don't do that...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 16702

PostPosted: Mon Feb 03, 2014 4:59 pm    Post subject: Reply with quote

@mdeininger: FYI, padoor's thread was from 2008. diablo465 is the new interested party.
_________________
Ladies and gentlemen, allow me to present, Man Not Caring. -- Perry Cox
Back to top
View user's profile Send private message
notageek
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2008
Posts: 131
Location: MA, USA

PostPosted: Mon Feb 03, 2014 5:01 pm    Post subject: Reply with quote

pjp wrote:
@mdeininger: FYI, padoor's thread was from 2008. diablo465 is the new interested party.
:lol: :lol: :lol: :lol:
_________________
"Defeat is a state of mind. No one is ever defeated, until defeat has been accepted as a reality." -- Bruce Lee
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Tue Feb 04, 2014 3:17 am    Post subject: Reply with quote

seems rather complected than chrooting gentoo from other operating system, according to the specification in gentoo quick install guide[/url]http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml:

Code:


Code Listing 2.14: Chroot
livecd usr # cd /
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount --rbind /dev /mnt/gentoo/dev
livecd / # mount --rbind /sys /mnt/gentoo/sys
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # source /etc/profile

Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Feb 04, 2014 9:43 am    Post subject: Reply with quote

pjp wrote:
@mdeininger: FYI, padoor's thread was from 2008. diablo465 is the new interested party.
It seemed odd to quote someone saying "me too". :oops::roll:

GOODDAMN NECROMANCERS :twisted:
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Feb 04, 2014 9:45 am    Post subject: Reply with quote

diablo465 wrote:
seems rather complected than chrooting gentoo from other operating system, according to the specification in gentoo quick install guide[/url]http://www.gentoo.org/doc/en/gentoo-x86-quickinstall.xml:

Code:


Code Listing 2.14: Chroot
livecd usr # cd /
livecd / # mount -t proc proc /mnt/gentoo/proc
livecd / # mount --rbind /dev /mnt/gentoo/dev
livecd / # mount --rbind /sys /mnt/gentoo/sys
livecd / # cp -L /etc/resolv.conf /mnt/gentoo/etc/
livecd / # chroot /mnt/gentoo /bin/bash
livecd / # source /etc/profile

If you mean "complicated", then I kind of fail to see how typing six commands can be that bad...
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
diablo465
Apprentice
Apprentice


Joined: 10 Sep 2013
Posts: 194

PostPosted: Tue Feb 04, 2014 2:23 pm    Post subject: Reply with quote

Thanks @mdeininger for your push, I decided to get to the bottom of this problem.

In fact the group in Ubuntu with UID 11 is called floppy, which controls the privilege to use floppy driver. This is the group that default gentoo install doesn't include and hence causes the problem proposed in this thread.

Making a backup for /etc/group in Ubuntu and replacing that file in Ubuntu with that in gentoo before chrooting can ensure the consistency of /etc/group between the host system and guest system. However, this adds the risk of messing up the files of two systems.

Given the fact that group 11 named as floopy is not quite useful nowadays, I simply delete that group in Ubuntu.

Now I can use the following script to chroot from gentoo to ubuntu without any warnings.

Code:
#!/bin/bash
mount /dev/sda5 /mnt/Ubuntu
cd /mnt/Ubuntu
mount -t proc proc /mnt/Ubuntu/proc
mount --rbind /dev /mnt/Ubuntu/dev
mount --rbind /sys /mnt/Ubuntu/sys
cp -L /etc/resolv.conf /mnt/Ubuntu/etc/
chroot /mnt/Ubuntu /bin/bash
source /etc/profile


Last edited by diablo465 on Tue Feb 04, 2014 3:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
mdeininger
Veteran
Veteran


Joined: 15 Jun 2005
Posts: 1740
Location: Emerald Isles, observing Dublin's docklands

PostPosted: Tue Feb 04, 2014 2:38 pm    Post subject: Reply with quote

Well, glad you got it sorted then ;).
_________________
"Confident, lazy, cocky, dead." -- Felix Jongleur, Otherland

( Twitter | Blog | GitHub )
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Off the Wall All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum