Results 1 to 7 of 7

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

Hybrid View

  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
  •  


G5T03 Dell Intel DC S3700 Series 800GB SATA 6Gb/s 2.5

G5T03 Dell Intel DC S3700 Series 800GB SATA 6Gb/s 2.5" SSD 0G5T03 SSDSC2BA800G3E

$55.00



HPGYT DELL 960GB SATA 6Gb/s 2.5in Internal SSD 0HPGYT MTFDDAK960TCB picture

HPGYT DELL 960GB SATA 6Gb/s 2.5in Internal SSD 0HPGYT MTFDDAK960TCB

$69.00



WD 500GB My Passport SSD, Portable External Solid State Drive WDBAGF5000ARD-WESN picture

WD 500GB My Passport SSD, Portable External Solid State Drive WDBAGF5000ARD-WESN

$59.99



SanDisk 2TB Ultra 3D NAND SSD, Internal Solid State Drive - SDSSDH3-2T00-G26 picture

SanDisk 2TB Ultra 3D NAND SSD, Internal Solid State Drive - SDSSDH3-2T00-G26

$149.99



Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5

Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot

$13.99



Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot picture

Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot

$12.59



Crucial - 500GB Internal SATA Solid State M2 Drives picture

Crucial - 500GB Internal SATA Solid State M2 Drives

$20.00



800GB SATA SSD SSDSC2BX800G4 Intel 2.5

800GB SATA SSD SSDSC2BX800G4 Intel 2.5" Enterprise SSD Drive S3610 Series

$37.91



Fanxiang SSD 512GB 1TB 2TB 4TB 2.5'' SSD SATA III Internal Solid State Drive lot picture

Fanxiang SSD 512GB 1TB 2TB 4TB 2.5'' SSD SATA III Internal Solid State Drive lot

$107.99



Fanxiang SSD 512GB 1TB 2TB 4TB 2.5''SATA III Internal Solid State Hard Drive LOT picture

Fanxiang SSD 512GB 1TB 2TB 4TB 2.5''SATA III Internal Solid State Hard Drive LOT

$188.99