chroot

Tamas Selmeci tselmeci at gmail.com
Wed Mar 8 09:13:59 UTC 2006


Hello!

I'm new to the list and I confess, I haven't read the whole uClibc mailing
list archive. If my question was answered several times, simply ignore it...

I'm in the process of creating my own Linux distribution. It's primary goal
is to work on an old i486 and to provide download features. I plan to locate
this machine in a place in the house where no one's being disturbed by its
noise (although this 486-DX66 has no CPU fan at all). It should run a
minimal Linux (made by me), a minimal X server (xc?) and GNOME due to the
system resources (32 MB RAM, low CPU horsepower). Its primary task is to
download big files to its hard disk, and I want to control downloads from
another machine through VNC connection.

I tried to complete LFS, CLFS steps but both of them failed. Maybe due to my
Fedora Core 4 system... (they suggest not to use FC4). Then I had the idea:
if I use buildroot then I get a uClibc-based toolchain optimized for i486,
and additionally it generates a basic filesystem for me with the most
essential programs. After that, I copy that filesystem to a partition,
chroot into it and go on building up my system.

The problem is with the chroot:

chroot /mnt/i486 /usr/bin/env -i /bin/bash

this seemed not to work correctly, because despite of the env -i command (it
should ignore all the environment variables inherited from the host system),
all the environment variables are still existing. Furthermore, it ignored
PS1 variable's value and the bash's prompt remained untouched. (When I was
working with LFS, after chroot-ing the command prompt managed to change, and
in that case, it really worked perfectly)

Does anyone knows how to chroot correctly? The target system contains env
and bash too, including local i486-uclibc-linux-gcc toolchain and libraries.
I want to compile my programs (including the kernel) on that partition as if
I was really logged in and if the system was booted from there...

Thanks in advance!

Bye
--
[- Selmeci Tamas
[- tselmeci.nop.hu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/uclibc/attachments/20060308/8edca7a6/attachment.htm 


More information about the uClibc mailing list