jsteffan
06-20-2003, 10:32 PM
Hi,
I've just managed to get user mode linux runnig inside
Knoppix.
I made an ext2 image containing the filestructure that
is normaly created inside the ramdisk. A few lines where
added to the init script (/etc/init.d/rcS) to mount the
/KNOPPIX directory from the base knoppix instance on
/KNOPPIX inside the uml instance.
To make this work the static ash shell from the bootdisk
(miniroot.gz) was included and /etc/init.d/rcS changed to
use /static/ash instead of /bin/sh (which isn't there when
the script is called).
Beside of this I only changed the default runlevel in
/etc/inittab to 2 (no X) and reduced the number of
consoles to one (I don't want my screen cluttered)
Next thing to be done is to remove all the autoconfiguraton
stuff which makes no sense inside UML.
The image is a sparse file which takes only 4.8MB on
disk. The filesystem inside however can grow upto 128MB,
which should be enough for most cases as the whole
knoppix filesystem is available.
A nice thing about UML is that changes to the filesystem
can be written to an overlay 'copy on write' (cow) file, so
the actual image can stay on the read-only medium.
UML, its utilities and this image add less than 10MB to
Knoppix.
OK, want to try it out?
boot knoppix
download the image from
http://www.ito.tu-darmstadt.de/staff/Jan/knoppix-uml-image.bz2
Uncompress it:
cp -p --sparse=always <( cat knoppix-uml-image.bz2 | \
bunzip2 -c - ) knoppix-uml-image
Then you a UML kernel and at least a small utiliy programm
which UML needs to open console windows.
Get it from the UML deb packages or download it here:
http://www.ito.tu-darmstadt.de/staff/Jan/linux.bz2
http://www.ito.tu-darmstadt.de/staff/Jan/port-helper.bz2
uncopress both and put it into your path
Now an UML Knoppix instance can be startet with:
linux ubd0=/tmp/cowfile,knoppix-uml-image hostfs=/KNOPPIX
see
linux --help for more options. Most Knoppix
boot parameters like 'lang' work too.
BTW: there's another really nice Linux Boot-CD based on
Redhat which contains UML:
http://dc.qut.edu.au/adios/adios-project.html
Jan
I've just managed to get user mode linux runnig inside
Knoppix.
I made an ext2 image containing the filestructure that
is normaly created inside the ramdisk. A few lines where
added to the init script (/etc/init.d/rcS) to mount the
/KNOPPIX directory from the base knoppix instance on
/KNOPPIX inside the uml instance.
To make this work the static ash shell from the bootdisk
(miniroot.gz) was included and /etc/init.d/rcS changed to
use /static/ash instead of /bin/sh (which isn't there when
the script is called).
Beside of this I only changed the default runlevel in
/etc/inittab to 2 (no X) and reduced the number of
consoles to one (I don't want my screen cluttered)
Next thing to be done is to remove all the autoconfiguraton
stuff which makes no sense inside UML.
The image is a sparse file which takes only 4.8MB on
disk. The filesystem inside however can grow upto 128MB,
which should be enough for most cases as the whole
knoppix filesystem is available.
A nice thing about UML is that changes to the filesystem
can be written to an overlay 'copy on write' (cow) file, so
the actual image can stay on the read-only medium.
UML, its utilities and this image add less than 10MB to
Knoppix.
OK, want to try it out?
boot knoppix
download the image from
http://www.ito.tu-darmstadt.de/staff/Jan/knoppix-uml-image.bz2
Uncompress it:
cp -p --sparse=always <( cat knoppix-uml-image.bz2 | \
bunzip2 -c - ) knoppix-uml-image
Then you a UML kernel and at least a small utiliy programm
which UML needs to open console windows.
Get it from the UML deb packages or download it here:
http://www.ito.tu-darmstadt.de/staff/Jan/linux.bz2
http://www.ito.tu-darmstadt.de/staff/Jan/port-helper.bz2
uncopress both and put it into your path
Now an UML Knoppix instance can be startet with:
linux ubd0=/tmp/cowfile,knoppix-uml-image hostfs=/KNOPPIX
see
linux --help for more options. Most Knoppix
boot parameters like 'lang' work too.
BTW: there's another really nice Linux Boot-CD based on
Redhat which contains UML:
http://dc.qut.edu.au/adios/adios-project.html
Jan