LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Gentoo
User Name
Password
Gentoo This forum is for the discussion of Gentoo Linux.

Notices

Reply
 
Search this Thread
Old 02-08-2011, 08:46 PM   #1
nokangaroo
Member
 
Registered: Nov 2009
Posts: 137

Rep: Reputation: 23
installing gentoo from ubuntu - network access from chroot


(Moderators please move this post into another place if appropriate. I ran into this problem while installing Gentoo from ubuntu, but it might also apply to Linux from Scratch, for instance)

I found an instruction for installing Gentoo from ubuntu but it turned out to be incomplete (http://www.wikihow.com/Install-Gentoo-Linux-from-Ubuntu). I also posted the following there.

The stage 3 tarball lacks a "portage" user and group, for some reason, which will cause emerge to fail from inside the chroot. If you use schroot you will have to create the portage user and group on your host system (ubuntu maverick in my case); the passwd and group files in /mnt/gentoo/etc will be overwritten if you modify them directly. After adding the portage user & group to the host system chrooting in the ordinary way should also work with network access. I used schroot with the following configuration:


#/etc/schroot/schroot.conf (on host system; <host> is your username on the host). The name in square brackets can be anything you like, but you have to call schroot with that name.

[gent00]
description=gentoo
type=directory
directory=/mnt/gentoo
priority=3
users=<host>
groups=<host>,portage
root-users=<host>
root-groups=root,<host>,portage
aliases=gentoo


#adding portage user and group on host system:
sudo useradd -M -g portage -s /bin/false -u 250 portage

#which adds the following lines to /mnt/gentoo/etc/passwd (probably flawed - /home/portage does not exist - but I added the group manually in Users and Groups. Anyway, it works):
portage:x:250:250::/home/portage:/bin/false

#and to /mnt/gentoo/etc/group:
portage:x:250:<host>

#the schroot command for emerge --sync:
schroot -c gent00 -- emerge --sync

#if you get an rsync error like "mkstemp failed .... permission denied", do from inside the chroot:
chown -R 250 usr/portage

#for classic chrooting:
sudo mount --bind /dev /mnt/gentoo/dev
sudo mount --bind /dev/pts /mnt/gentoo/dev/pts
sudo mount --bind /proc /mnt/gentoo/proc
sudo mount --bind /sys /mnt/gentoo/sys
sudo cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf #(not sure if this does anything; /etc/resolv.conf is blank except for a comment)
sudo chroot /mnt/gentoo
 
Old 02-08-2011, 08:56 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
This may work, but it is probably best to follow the official gentoo documentation.


5. Installing Gentoo from an existing Linux distribution


http://www.gentoo.org/doc/en/altinstall.xml#doc_chap5
 
Old 03-22-2011, 05:01 AM   #3
centh0
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
Yes is possible

---------- Post added 03-22-11 at 05:01 AM ----------

http://www.flickr.com/photos/60967642@N08/5549813400/
 
Old 03-22-2011, 05:04 AM   #4
centh0
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
http://www.flickr.com/photos/60967642@N08/5549813402/
 
  


Reply

Tags
chroot, gentoo, install, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] installing old ubuntu version into a chroot Tamaros Ubuntu 0 12-15-2010 05:17 PM
Ubuntu 8.04 in mixed Mac & Windows network Internet access but no access to network. traveller7 Linux - Networking 1 01-10-2009 07:53 PM
Trouble installing Gentoo through WPA network. Jonathanius Linux - Newbie 4 08-20-2008 03:48 PM
after installing gentoo network and grub don;t work yeyal Linux - Hardware 1 02-09-2005 04:37 PM
gentoo, no network after chroot exodist Linux - Distributions 23 07-22-2004 02:49 AM


All times are GMT -5. The time now is 02:02 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration