-
ANNOUNCE: UML inside Knoppix using compr. /KNOPPIX fs
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...-uml-image.bz2
Uncompress it:
Code:
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...ort-helper.bz2
uncopress both and put it into your path
Now an UML Knoppix instance can be startet with:
Code:
linux ubd0=/tmp/cowfile,knoppix-uml-image hostfs=/KNOPPIX
see 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
-
Senior Member
registered user
I am confused. Do you mean your run a modified KNOPPIX under UML ? I am under the impression that UML needs kernel patch or do you mean it is already there in the current KNOPPIX distribution and I can run any UML under it ? I want to try out UML but until still don't quite understand how it works.
-
You can run this with an ordinary Knoppix. The three files (user
mode kernel, filesystem image, port-helper) are all you need.
UML doesn't depend on the kernel of the base system. UML uses
its own kernel which is patched to run in user space just like any
other binary.
This linux.bz2 is a UML kernel which can be unpacked and started
on top of any Linux system - in this case Knoppix. You can just
start this binary withou parameters and it will boot until its trying
to mount the root filesystem. So what you have to do is specify
a filesystem on the command line.
The special thing about this particular filesystem image is that it
mounts the /KNOPPIX read-only filesystem (as the normal Knoppix
does). So what you get is Knoppix running inside Knoppix!
In order to enable e.g. networking between the base Knoppix and
the UML Knoppix one would need the UML-tools. This should be
installed on a customized Knoppix. It also would be a good idea, to
add the SKAS patch to the Knoppix kernel which leads to a
significant performance increase for UML.
-
Senior Member
registered user
thanks for the explanation. Now if UML's COW fs feature can be used on knoppix image, that would open a whole new world.
Eager to try it out, need more reading.
-
using the cow file to store changes of the /KNOPPIX filesystem
would be really cool. This would mean, that Knoppix could be
used like a hd installation with every file being writeable!
I've had this idea, too, but this can't be done without hacking
the kernel. At least it seems to me, that it could be done.
At the moment the /KNOPPIX fs is mounted read-only inside the
UML image just like in the ramdisk. And as in the ramdisk only
a few files can be modified, the rest are symbolic links to
/KNOPPIX. One benefit is that the cow-file can be stored somewhere,
so you have a "persistent ramdisk".
-
Senior Member
registered user
I am experimenting with the transluency module for the moment which is similar in concept to the COW on UML though it is implemented at the system call level and there is some situation that it doesn't work yet. I did tried a few apt-get install and it works. But if COW of UML works on clooped file, it should be better as that is at the block level and should have less 'patches' as in translucency.
BTW, how can I create a sparse file which contains the ext2 image ? Currently I only do "dd" to create an empty file and mke2fs on it.
-
My goal is to get UML running on Knoppix to use it for teaching.
I won't go deeper into this cow for Knoppix issue.
Regarding UNL root filesystems, have a look at
http://www.stearns.org/mkrootfs/rootfs.html
Similar Threads
-
By Fabianx in forum Customising & Remastering
Replies: 12
Last Post: 08-20-2011, 01:09 AM
-
By Fabianx in forum Ideas
Replies: 3
Last Post: 11-24-2004, 07:36 PM
-
Replies: 0
Last Post: 08-23-2004, 05:20 AM
-
By probono in forum Ideas
Replies: 1
Last Post: 04-19-2003, 06:05 PM
-
By monkymind in forum News
Replies: 37
Last Post: 03-20-2003, 05:45 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
![Lot of Old Vintage Computer PC SIMM DIMM RAM picture](/store/img/g/kiMAAOSw6FxmdFmF/s-l225/Lot-of-Old-Vintage-Computer-PC-SIMM-DIMM-RAM.jpg)
Lot of Old Vintage Computer PC SIMM DIMM RAM
$25.00
![Lot of Old Vintage Computer PC SIMM DIMM RAM picture](/store/img/g/VrwAAOSweI1mdEzs/s-l225/Lot-of-Old-Vintage-Computer-PC-SIMM-DIMM-RAM.jpg)
Lot of Old Vintage Computer PC SIMM DIMM RAM
$29.00
![Vintage Programmers Aid Cartridge Commodore Vic-1212 Bi33 - VERY NICE Tested picture](/store/img/g/mFIAAOSwy6dmdBH3/s-l225/Vintage-Programmers-Aid-Cartridge-Commodore-Vic-12.jpg)
Vintage Programmers Aid Cartridge Commodore Vic-1212 Bi33 - VERY NICE Tested
$20.00
![Vintage Dot Matrix Printer Contin Feed Paper 8.5 x 11. Lots of 5 to 250 sheets. picture](/store/img/g/498AAOSwJTdl1MqH/s-l225/Vintage-Dot-Matrix-Printer-Contin-Feed-Paper-8-5-x.jpg)
Vintage Dot Matrix Printer Contin Feed Paper 8.5 x 11. Lots of 5 to 250 sheets.
$4.00
![COMMODORE 64 USER'S GUIDE - vintage computer book picture](/store/img/g/w90AAOSwA2Vmc83U/s-l225/COMMODORE-64-USER-S-GUIDE-vintage-computer-book.jpg)
COMMODORE 64 USER'S GUIDE - vintage computer book
$9.98
![NOS Vintage IBM PC Convertible Computer Game Control Adapter 1501300 picture](/store/img/g/MPIAAOSwrgRmbybv/s-l225/NOS-Vintage-IBM-PC-Convertible-Computer-Game-Contr.jpg)
NOS Vintage IBM PC Convertible Computer Game Control Adapter 1501300
$15.00
![BlueSCSI V2 WiFi (Narrow DB25) - Modern Storage for Vintage Computers picture](/store/img/g/-Q4AAOSwI3hmPnUb/s-l225/BlueSCSI-V2-WiFi-Narrow-DB25-Modern-Storage-for-Vi.jpg)
BlueSCSI V2 WiFi (Narrow DB25) - Modern Storage for Vintage Computers
$51.50
![BlueSCSI V2 WiFi (Desktop) Modern Storage for Vintage Computers Latest Model picture](/store/img/g/GXUAAOSwWZRmPnHK/s-l225/BlueSCSI-V2-WiFi-Desktop-Modern-Storage-for-Vintag.jpg)
BlueSCSI V2 WiFi (Desktop) Modern Storage for Vintage Computers Latest Model
$53.50
![Lot of Assorted Vintage Computer and Electronic Parts Heatsinks Brackets Drives picture](/store/img/g/IDsAAOSwp8RmczaO/s-l225/Lot-of-Assorted-Vintage-Computer-and-Electronic-Pa.jpg)
Lot of Assorted Vintage Computer and Electronic Parts Heatsinks Brackets Drives
$37.49
![Epson MBM-2095-E Vintage Monochrome Monitor (Does not Turn On) picture](/store/img/g/RWQAAOSwCFNlt-Ff/s-l225/Epson-MBM-2095-E-Vintage-Monochrome-Monitor-Does-n.jpg)
Epson MBM-2095-E Vintage Monochrome Monitor (Does not Turn On)
$105.26