On Tuesday 07 December 2004 10:13, Jason Clark wrote: > Hey gang, just thought I would post this quick and dirty on how to build > gentoo from stage 1 inside of a 2.6.9-bb4 UML. BTW, the bb4 patch seems > to be really solid. I haven't run into a single issue with it thus far.
Ok, it means that the uml-extramask fix was the only needed one... I'm *really* happy with that. Also, remember to promptly report everything as 2.6.10 will contain 2.6.9-bb4 fixes. Also, I'm happy to see that since Roger Sala had experienced various issues when building a Gentoo root_fs. They were very likely related to the previous stability issues of -bb4! Finally, I think that if I get the time, I will start building my own Gentoo root fs, and following your instructions. > Building gentoo from stage 1 inside a UML > First create root_fs (creates a 2gig sparse file) > dd of=root_fs bs=1024 count=2000000 seek=0 > mkfs.ext3 root_fs > > mount root_fs > mkdir uml > mount root_fs uml -o loop > > unzip stage1 into root_fs > cd uml > tar xvjf ../stage1-x86-2004.3.tar.bz2 > > copy mount, route and ifconfig or ip into root_fs. Note that if you are > using the iproute2 package you only need to copy ip and mount over. > cp `which ifconfig` usr/bin > cp `which ip` usr/bin > cp `which mount` usr/bin > cp `which route` usr/bin They are *not* inside the root_fs? Oh, yes... normal Gentoo assumes you configure the network outside the chroot, so they're not needed! > unmount uml > cd .. > umount uml > boot uml, this assumes your host IP is 192.168.1.1. You can build the > tuntap stuff by hand if you want, but for an install, the net helper is > fine. > linux ubd0=root_fs mem=128M eth0=tuntap,,,192.168.1.1 rw > mount filesystems inside uml > mount proc /proc -t proc > mount none /dev/pts -t devpts > bring up eth0 using ip > ip addr add 192.168.1.111/24 brd + dev eth0 > ip link set eth0 up > ip route add default via 192.168.1.1 > OR > bring up eth0 using ifconfig > ifconfig eth0 192.168.1.111 netmask 255.255.255.0 broadcast > 192.168.1.255 up route add default gateway 192.168.1.1 dev eth0 > edit make.conf to look like the following > CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer" > CHOST="i386-pc-linux-gnu" > CXXFLAGS="${CFLAGS}" > FEATURES="-sandbox" > The -sandbox is very important, if you don't do this you will get a bunch > of errors like this one > ACCESS DENIED open_wr: /dev/console > The short answer is that we dont really need gentoo to sandbox itself > since we aren't in a chroot like stage1 expects but are instead in a full > on uml. At this point, you can follow the stage1 build directions > without modification. I'll make a purdy version soon. Enjoy! I'd like to add a note for who wants to follow this HOWTO: never enable nptl USE flags for glibc in the guest, since UML is NPTL-incompatible... and there is no possibility to get back by renaming /lib/tls! Bye > Jason > We the willing, led by the unknowning, are doing the impossible, for the > ungrateful. We have done so much, for so long, with so little. We are now > qualified to do anything with nothing. -- Paolo Giarrusso, aka Blaisorblade Linux registered user n. 292729 http://www.user-mode-linux.org/~blaisorblade ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ User-mode-linux-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user