Results 1 to 7 of 7

Thread: ANNOUNCE: UML inside Knoppix using compr. /KNOPPIX fs

  1. #1

    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
    Code:
    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

  2. #2
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    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.

  3. #3
    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.

  4. #4
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    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.

  5. #5
    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".

  6. #6
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    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.

  7. #7
    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

  1. [ANNOUNCE] Remastering Knoppix - With Klaus scripts
    By Fabianx in forum Customising & Remastering
    Replies: 12
    Last Post: 08-20-2011, 01:09 AM
  2. Replies: 3
    Last Post: 11-24-2004, 07:36 PM
  3. VMWare Inside KNOPPIX
    By p2o5 in forum Ideas
    Replies: 0
    Last Post: 08-23-2004, 05:20 AM
  4. Get VMware to run *inside* Knoppix?
    By probono in forum Ideas
    Replies: 1
    Last Post: 04-19-2003, 06:05 PM
  5. 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
  •  


VINTAGE APPLE MACINTOSH POWERBOOK 180 ( M4440) Powers On picture

VINTAGE APPLE MACINTOSH POWERBOOK 180 ( M4440) Powers On

$100.00



Vintage Apple Macintosh Plus 1MB Model M0001A - For parts picture

Vintage Apple Macintosh Plus 1MB Model M0001A - For parts

$91.99



Vintage Apple Macintosh PowerBook 190 Series -  NO POWER FOR PARTS picture

Vintage Apple Macintosh PowerBook 190 Series - NO POWER FOR PARTS

$69.99



Vintage Apple Computer Mac M0110A Keyboard w/ Cable Japan picture

Vintage Apple Computer Mac M0110A Keyboard w/ Cable Japan

$75.00



Vintage Apple Macintosh Plus 1MB M0001A Desktop Computer - Powers On / Bad Video picture

Vintage Apple Macintosh Plus 1MB M0001A Desktop Computer - Powers On / Bad Video

$109.99



Apple Macintosh Startup Disk for Vintage Mac - System 1.1 w/ MacWrite & MacPaint picture

Apple Macintosh Startup Disk for Vintage Mac - System 1.1 w/ MacWrite & MacPaint

$9.99



Macintosh 1980's Vintage Rainbow Apple Computer Carry Bag Case Tote Mac picture

Macintosh 1980's Vintage Rainbow Apple Computer Carry Bag Case Tote Mac

$69.00



Vintage Apple Macintosh 8100/100AV Computer M1688 - Untested picture

Vintage Apple Macintosh 8100/100AV Computer M1688 - Untested

$79.95



Apple Macintosh Performa 466 Vintage Computer | SKU 146754 picture

Apple Macintosh Performa 466 Vintage Computer | SKU 146754

$149.95



Vintage Apple Macintosh PowerBook G3 M4753 w/ Power Adapter picture

Vintage Apple Macintosh PowerBook G3 M4753 w/ Power Adapter

$149.00