Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: Ramdisk and partial remastering in Knoppix 7

  1. #1
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    Ramdisk and partial remastering in Knoppix 7

    .
    Another un-advertised new feature in Knoppix 7

    Klaus K has included a new 'ramdisk' element in Knoppix 7 for serial
    collection of LiveUSB program changes that may be individually compacted
    which may then be expanded and added in overlay fashion to the basic
    operating system at boot.

    A brief description of the use 'ramdisk' to achieve an alternative to
    wholesale re-mastering occurs on debian-knoppix at:
    http://lists.debian.org/debian-knopp.../msg00005.html

  2. #2
    Moderator Moderator
    Join Date
    Nov 2010
    Location
    Germany/ Dietzenbach
    Posts
    1,124
    Be aware, this only works if you don't have peristent memory.

  3. #3
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Greetings, Werner.

    I'm thinking that the KNOPPIX1, KNOPPIX2, etc idea might be a good way to segment the
    remastering that one does over time. Into chunks. Some programs here, Some personal tweaks there.
    A way to organize things.

    Klaus's choices of which directories to save is a puzzlement to me.

    For one thing, with an 8 Gb LiveUSB, I mostly can just save the whole overlay as a backup.
    My needs for re-mastering have almost disappeared.

    I can see where Klaus can use larger chunks of compressed material,
    for example a set of non-free programs to go with the CeBIT DVD as KNOPPIX1.

    It is a new feature worth calling attention-to.
    But it's not all that different than the old update.tar.gz approach.
    Last edited by utu; 06-07-2012 at 08:21 PM.

  4. #4
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    A progress report on my ramdisk experience

    .
    First, a historic note:

    In post #1 I called some attention to Klaus K's recent murmurings about using
    'ramdisk' as an alternative to some of the more recent re-mastering schemes that
    use lots of resources and time.
    You may be interested to know this is not something new or even new to Knoppix.
    Just take a look at:
    http://www.oreillynet.com/sysadmin/b...s_wow_jus.html

    Now, for something closer to home:

    In posts elsewhere on this forum I have touted a little scheme of I think-of as
    'partial backups'. I try to keep track of the tweaks I use and where they go, so
    I can collect these in a file update*.tar.gz. I then use the cheatcode note about
    how to get this file overlaid on KNOPPIX-DATA and become a part of
    knoppix-data.img. I've used this all through Knoppix 6 to back-up my LiveUSB when
    I ruin my knoppix-data.img by some inadvertent mistake. Maybe a little clumsy, but
    it serves the purpose. my tweaks in update*.tar.gz amount to about 50 Mb which
    I store on /mnt-system/ in-between uses.

    It turns out, I can read this 50 Mb update*.tar.gz into the Knoppix 7 ramdisk and
    produce an equivalent 30 Mb KNOPPIX1. I have to do some juggling with reboots
    and using the knoppix noimage cheatcode to accomplish this, but it works.
    There are two hidden bonuses in this approach. First, you needn't be very
    fastidious about noting your tweaks and where they go. Ramdisk does this for you.
    It only retains the directories, and contents thereof it needs to record differences
    from an initial compressed image. Second, after all the manipulations you may
    once again re-install a persistence file to record retain any additional
    changes you might decide to investigate on a more tentative basis than the
    ramdisk approach.

    You don't need a second system to accomplish all this. I bootstrapped my 8 Gb
    Knoppix 7.0.2 LiveUSB from an update*.tar.gz state to a ramdisk-modified version
    with persistence using only two special commands and the cheatcode 'knoppix noimage'.
    A second system would be a good idea as a backup, but this is just to let you
    know it's possible to do without.

    The two commands that are crucial are: To transfer update*.tar.gz to /ramdisk/;
    Code:
    sudo tar -xzf /mnt-system/update*.tar.gz - C /ramdisk
    and, To create the file KNOPPIX1 you will need to complete this task:
    Code:
    sudo mkisofs -R -U home etc KNOPPIX-DATA var (or whatever the ramdisk dirs were) \
            | create_compressed_fs  -B 131072 -m - - >/tmp/KNOPPIX1
    I'll work out a turn-by-turn list eventually,

    but the first step is rebooting with knoppix noimage to bring in the ramdisk;
    next read update*.tar.gz into ramdisk;
    next get rid of your original knoppix-data.img and KNOPPIX-DATA;
    next make your directory list and issue the second command to produce KNOPPIX1;
    next move KNOPPIX1 into the directory that has KNOPPIX and formerly held
    KNOPPIX-DATA as well; and
    last, but not least, reboot and re-establish persistence, when prompted to do so.

    I may have thrown in a few re-boots here and there along the way to see how
    things were going. I'll have to make some notes. But the preceeding gives you
    the broad outline.

    I think there is a sequel to this that Klaus K has defined which describes
    how to combine compressed images, but I've not progressed that far yet.

    I'm interested to hear the experiences of others with Knoppix 7's ramdisk.
    Last edited by utu; 06-14-2012 at 07:47 PM.

  5. #5
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    Houston, I have a problem.

    .
    I have developed a number of changes to Knoppix 7.0.2 and
    used the following procedure to save these changes to KNOPPIX1 and
    re-establish persistence:

    1. In a normal, bare Knoppix 7.0.2, I establish a LiveUSB with
    persistence and develop certain changes and try them out, noting
    all the steps necessary.
    2. I reboot with the cheatcode 'knoppix noimage' and repeat all
    the same necessary change steps.
    3. I use Klaus K's formula to capture the ramdisk information in
    KNOPPIX1, using all the directories I note using 'ls' in ramdisk and no others.
    4. I transfer KNOPPIX1 into the same /mnt-system/KNOPPIX/ directory
    as the original KNOPPIX file itself.
    5. I delete knoppix-data.img, reboot and re-establish persistence.
    6. I am pleased that KNOPPIX1 us now doing its job.

    Here's what is not going right for me:
    I go through steps 1 through 5 with some different changes and
    develop and install KNOPPIX2, but without the success in step 6.

    The simplest instances of this are to simply use Install-Components or
    Aptitude to bring in Flash or ntfs-3g. The ntfs-3g exercise is the one
    Klaus K uses to showcase the stacking of KNOPPIX1, KNOPPIX2,.. etc.
    I presume this is supposed to work, but I can't seem to make it so.

    Any suggestions as to what to look for are welcome.

  6. #6
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    I found the magic words.

    .
    To stack permanent serial compressed image upgrades to KNOPPIX, use the magic incantation,
    assuming KNOPPIX1 was the previous upgrade:

    cd /
    sudo mkisofs -R -U KNOPPIX-DATA | create_compressed_fs -B 131072 -m - - > /mnt-system/\
    KNOPPIX/KNOPPIX2

    (Sorry this line a little too long for this forum, so used the '\' sign to show it here.)

    Then reboot to see if it all works like it did in the previous persistence file.
    If so, move knoppix-data.img from /mnt-system/KNOPPIX/ to /mnt-system/ temporarily and reboot.
    Re-establish persistence and again verify that KNOPPIX2 is doing what if ought.
    When you are really sure KNOPPIX2 and persistence are ok, remove knoppix-data.img.

    Dont count on PCManFM to remove things; use root and rm to do this.
    init's mountunion() looks like you may have up to ten such upgrades, if you have enough space
    on your LiveUSB

  7. #7
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    Careful, here.

    Quote Originally Posted by utu View Post
    .
    When you are really sure KNOPPIX2 and persistence are ok, remove knoppix-data.img.
    By this I mean the 'old' knoppix-data.img in /mnt-system/,
    not the 'new' one in /mnt-system/KNOPPIX/.

  8. #8
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631

    Another oops to avoid.

    Quote Originally Posted by utu View Post
    .
    Then reboot to see if it all works like it did in the previous persistence file.
    USB
    This first reboot should be with 'knoppix noimage' or 'knoppix64 noimage'
    cheatcode, depending on what kernel you were last using.
    This allows you to temporarily ignore the current knoppix-data.img without moving or removing it.

    On the next reboot, after moving the initial knoppix-data.img, the absence of this
    .img is what triggers a request to (re-)establish a persistence file.

  9. #9
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    508
    Quote Originally Posted by utu View Post
    I'm interested to hear the experiences of others with Knoppix 7's ramdisk.
    Hello utu!

    When I read Klaus Knopper's post on the mailing list I decided to try the remastering procedure from the live system myself.

    I use a kind of Poor man's install of Knoppix V 7.0.2 inside a VirtualBox 4.1.16. I copied the content of the DVD to the directory knx702 and use Grub as bootloader.

    I think that a typical session looks as follows.

    1. Boot with "noimage" cheat code.

    2. Open root terminal.

    3. Issue the following commands.
    Code:
    apt-get update
    apt-get install flashplugin-nonfree
    apt-get clean
    Of course, there are many more useful packages that are not included in the public version of Knoppix 7.0.2 since they are not free like unrar for example.

    4. Create the archive file KNOPPIX1 from the ramdisk. The options used for makeisofs are the usual ones taken from the "Remastering howto". I use a temporary file on the virtual HDD since I do not have more than 1 GB of RAM available inside my virtual machine. I exclude some directories with files I consider not useful for the archive. Maybe there are more directories.
    Code:
    mkisofs -R -U -V "KNOPPIX1 filesystem" -P "KNOPPIX1" \
     -hide-rr-moved -cache-inodes -no-bak -pad \
     -x /ramdisk/var/lib/apt/lists -x /ramdisk/dev \
     -x /ramdisk/var/log -x /ramdisk/var/run /ramdisk | nice -5 \
     /usr/sbin/create_compressed_fs -b -B 65536 \
     -f /mnt-system/knx702/isotemp - /mnt-system/knx702/KNOPPIX/KNOPPIX1
    5. Reboot and enjoy Flash videos in Iceweasel.

    Comments and suggestions are always welcome.

  10. #10
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Greetings. Klaus2008.
    Nice to hear from you.

    Glad to see someone carry-through on Klaus K's example.
    I thought his example was hard to follow, myself.
    Also, it left me puzzled on how to carry-on for subsequent images.

    You are using a lot of options, I'd like to know more about each of these.
    In some of my prior efforts I tried to cast out anything that had Cache or cache
    in its name.

    I like this one of Klaus K's idea because I can do it all within the resources
    of my 8 Gb SDHC. No additional system, virtual or otherwise, no additional
    workspace needed, no hours-long processing needed.

    As an unexpected plus, I just cloned a new 8 Gb SDHC, and would-you-believe?
    The clone has KNOPPIX1, KNOPPIX2 and persistence right away, ready to go.

    Anxious to hear how you progress thru KNOPPIX2, KNOPPIX3, etc.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •