On Monday 10 January 2005 03:48 am, Henrik Nordstrom wrote: > On Mon, 10 Jan 2005, Rob Landley wrote: > > Did you read second sentence in the bit you just quoted? How, exactly, > > could I chroot into there and compile stuff if ld isn't there? > > Is the permissions on your hostfs tree set correctly? Yup. I tried chown -R all the files to knoppix, and I tried running uml as root. No major difference I could spot. And again, it works fine via chroot. > Can you execute ld manually? Yes. > And again, have you tried with the -bb UML kernels? Just did. The result is much more stable than the previous one: it seems to boot up without error and give me a shell prompt reliably. Nice work. Attempting to actually _use_ still fails the same way: can't find ld. My first attempt I forgot to remount the hostfs rw and it went into an endless loop eating CPU until I killed it. I admit I had it set up wrong, but an endless loop probably isn't the correct behavior there... The second time I tried adding rw to the command line. Nice trick that, I was trying ,rw appended to the rootfs flags and it didn't work. Here's what happened then (with gratuitous wordwrap of long vmlinux command line provided by kmail): root@ttyp3[linux-2.6.9]# ./vmlinux rootfstype=hostfs rootflags=/home/knoppix/newbuild/build rw init=/bin/bash ... All bugs added by David S. Miller SCTP: Hash tables configured (established 512 bind 1024) Initializing stdio console driver VFS: Mounted root (hostfs filesystem). bash-2.05b# ld ld: no input files bash-2.05b# gcc hello.c collect2: cannot find `ld' bash-2.05b# exit Then I chrooted into the directory: root@ttyp3[linux-2.6.9]# chroot ~knoppix/newbuild/build bash-2.05b# gcc hello.c bash-2.05b# ls -l a.out -rwxr-xr-x 1 root root 3447 Jan 10 23:41 a.out bash-2.05b# strip a.out bash-2.05b# ls -l a.out -rwxr-xr-x 1 root root 2164 Jan 10 23:41 a.out bash-2.05b# ./a.out Hello world! bash-2.05b# > http://www.user-mode-linux.org/~blaisorblade/patches/guest/uml-2.6.9-bb4/ Yup. Applied the big patch. It definitely helped stabilize things, just didn't fix this problem. > > C) I've compiled this project on a machine with 32 megs of ram and no > > swap, and my laptop actually has 128 megs so if UML isn't giving itself > > at least 32 it's making a bad decision... > > UML gives itself as much memory as you tell it to on the kernel command > line. Default to 32 MB IIRC. Of which 28 megs or so are free after the kernel grabs its structures, that matches what I'm seeing. That should definitely be enough to compile hello.c, and probably enough to run my whole build process. Here, try it for yourself. I just uploaded "http://www.landley.net/build.tar.bz2", which is 10.2 megabytes. It's what my build process from the earlier website results in. (Okay, a slightly more up to date version than the one on the website, but the differences don't matter for this.) There are a few other miscelanous components, but the bulk of it is uclibc, busybox, gcc, and binutils. "tar xvjpf build.tar.bz2" (as root) should extract the build directory with all the permissions intact, then you can chroot into it, drop a hello world executable in there (it's got busybox vi) and compile it with gcc. This should work. Then try doing the same thing with uml (as root, so as not to worry about permissions, or chown to taste if you're not up for that). This doesn't work for me. Attached is the config I used to build 2.6.9-bb4. The command line I used to run it was mentioned earlier in this message. > Regards > Henrik Rob