From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <5bb2fcc60808241623j30a6ee35q3e3ef71818233826@mail.gmail.com> Date: Sun, 24 Aug 2008 18:23:07 -0500 From: "Alex Lee" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [9fans] lguest on 2.6.25 Topicbox-Message-UUID: 06ca6916-ead4-11e9-9d60-3106f5b1d025 Hi all, I'd like to set up a cpu/auth/file server for my home network. I already have a laptop server running Ubuntu 8.04, so the idea is to also get Plan 9 running on it, via lguest. It's mostly working, but I'm encountering a few problems. Here's what I've done so far (maybe it's excessive list every single step, but just in case...): 1. Grab relevant files. - Download 9lguestcpu.2.6.25.elf and RUNLGUEST from Ron's contrib directory - Get thx9.img out http://9grid.net/rminnich/src/lguest/thnx9.bz2 - Download the 2.6.25 kernel: linux-2.6.25.tar.bz2 (dated 2008-04-17; I tried the latest version, 2.6.25.16, but encountered the same problems that were reported in http://9fans.net/archive/2008/07/690) 2. Compile and install kernel - I start with the stock 2.6.25 kernel. I then copy in my current config (Ubuntu 2.6.24-19-generic), run 'make oldconfig', then answer the config prompts with mostly the defaults. - Then I configure the LGUEST, LGUEST_LGUEST, VIRTIO, etc. config entries as per the lguest.txt documentation. - Then I compile (here the debian way, with 'make-kpkg kernel_image kernel_headers'). - I also run 'make' in Documentation/lguest to get my 'lguest' binary. 3. Prepare host machine - Install the new kernel on the host machine and reboot. - modprobe lg syscall_vector=64 - iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE - echo 1 > /proc/sys/net/ipv4/ip_forward 4. Run Plan 9 in lguest - I modified RUNLGUEST so that the command is: ./lguest 256 9lguestcpu.2.6.25.elf --block=thx9.img --tunnet=192.168.19.1 'venti=#S/sd00/arenas;bootdisk=local!#S/sd00/fossil;bootargs=local!#S/sd00/fossil' - sudo ./RUNLGUEST Eventually it prompts for the filesystem, and I pick the default. Here is the output from that point onwards: root is from (tcp, il, local)[local!#S/sd00/fossil]: disk is #S/sd00/fossil AUTHENTICATE ... time... GET VENTI ENV! #S/sd00/arenas IN THERE AND nf is 1 F 0 is #S/sd00/arenas venti...configloopbackk!!!!!!!!!!!!!!!!!!!!!!!!!!!!! DID CONFIG LOOPBACK setenv venti to tcp!127.1!17034 fossil(#S/sd00/fossil)...version...time... init[0] = init init[1] = -c LGATTACH edev c0440b90 ctlr c0440dd0 LGINIT SETMAC: NO ETHERIN: devno 3 ring 0 irq 34 ETHEROUT: devno 3 ring 0 irq 35 lguestnetwork is ndb/dns: can't read my ip address rc (cpurc): null list in concatenation init: starting /bin/rc % Networking wasn't working at first. So I modified /lib/ndb/local so that the dns entry pointed to my router (192.168.1.1), and then I ran the following: % ip/ipconfig -g 192.168.19.1 ether /net/ether0 192.168.19.2 255.255.255.0 % ndb/dns -r And then I can resolve names and ping out. So far, so good, but there are three problems that I'm still trying to figure out: 1. How can I avoid having to manually configure networking each time I boot? 2. I can ping from the host machine to the lguest interface (192.168.19.2), but when I try to connect with drawterm the connection is refused. 3. lguest always runs at full CPU. How can I figure out why this is happening? (I don't feel comfortable running lguest for more than a few minutes at a time -- the laptop gets pretty hot.) Any advice or pointers on these issues would be greatly appreciated. Thanks! Alex -- Alex Lee