Just to add to the methods for building root file systems,
here is the script I used to create some sparse 1G systems
based on my host install, this does not create a really good
filesystem but it is quick, or just want to make a upgrade,
this just copies most of the important directories into the
root_fs, this was setup with the /usr on hostfs which I
mounted on /mnt/hostfs with a symlink from /usr to
/mnt/hostfs/usr
I have used this to quickly create test systems from
my RH8 & 9 installs, the file system can use some editing
to correct etc/fstab and hwclock (ln to true) but otherwise
I have pretty much my normal environment in the UML
including both my user and root passwords
If you have enough space adding the /usr and perhaps
/var to the cp -a command will make a better fs
I use devfs so I don't need entries in the dev directory
I leave the /root and /home directories empty but they
could also be copied
Enjoy
-------------------
dd if=/dev/zero of=root_fs seek=$((1024 * 1024)) bs=1k count=1
mke2fs -j -F root_fs
mkdir mnt
mount -o loop root_fs mnt
cd mnt
cp -a /bin /sbin /etc /lib .
mkdir -p dev home initrd mnt/hostfs opt proc root tmp
mkdir -p var/lib var/lock var/log var/run var/spool var/tmp var/state
var/subsys
echo "/dev/ubd/0 / ext3 defaults 1 1" >> etc/fstab
echo "hostfs /mnt/hostfs hostfs ro" >> etc/fstab
ln -s mnt/hostfs usr
sed -e "s/tty\([0-9]\)/ttys\/\1/" </etc/inittab >etc/inittab
for i in `seq 10`
do
echo ttys/$i >> etc/securetty
echo vc/$i >> etc/securetty
echo tty$i >> etc/securetty
done
________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
|