Hi Hmm. Not only how to chroot - but to really tie it down, how to su and chroot without copying in a load of /lib, /bin etc
Heres my solution... my uml is on /home/todd - under a user todd make a /home/todd/tmp copy linux into /home/todd/linux (chmod a+x) make a /home/todd/proc (so we have a /proc/mm in the chroot) mount (as root) proc on /home/todd/proc then run this perl script (i tried doing it with the shell, but its an arse about as you need bash and su copying into your chroot, which means you nead to get the .so's these need, and /etc/passwd etc) #!/usr/bin/perl use POSIX; #chroot("/home/todd"); POSIX::setuid(1004); # todds uid POSIX::setgid(100); # todds gid #print "uid=",POSIX::getuid()," gid=",POSIX::getgid(),"\n"; exec( "./linux", "ubd0=./todd-root", "ubd1=./todd-swap", "devfs=nomount","mem=200M", "con=null", "eth0=tuntap,,,192.168.30.41"); To get the tuntap network working too, I had to copy /lib/libc.so.6 into /home/todd/lib/libc.so.6 copy /usr/bin/uml_net into /home/todd/usr/bin/uml_net mkdir /home/todd/dev/net mknod /home/todd/dev/net/tun c 10 200 YMMV !!! Cheers Dave On Thu, 2005-04-07 at 02:01 -0300, itamar wrote: > how to run a uml in chroot mode ? > > > Itamar Reis Peixoto > +55 (34) 3238 3845 > e-mail : [EMAIL PROTECTED] > http://www.ispbrasil.com.br > > ------------------------------------------------------- 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://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user