Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Ramdisk and partial remastering in Knoppix 7

Hybrid View

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

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

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

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

    Look at mountunion() in init

    Quote Originally Posted by utu View Post
    init's mountunion() looks like you may have up to ten such upgrades, if you have enough space on your LiveUSB
    From an earlier post.

  5. #5
    Senior Member registered user
    Join Date
    Feb 2010
    Posts
    512
    You can read more about the options I used in the man page of mkisofs ( 8 )
    -cache-inodes
    Cache inode and device numbers to find hard links to files. If mkisofs finds a hard link (a file with multiple names), then the file will only appear once on the CD. This helps to save space on the CD. The option -cache-inodes is default on UNIX like operating systems. Be careful when using this option on a filesystem without unique inode numbers as it may result in files containing the wrong content on CD.
    -hide-rr-moved
    Rename the directory RR_MOVED to .rr_moved in the Rock Ridge tree. It seems to be impossible to completely hide the RR_MOVED directory from the Rock Ridge tree. This option only makes the visible tree better to understand for people who don't know what this directory is for. If you need to have no RR_MOVED directory at all, you should use the -D option. Note that in case that the -D option has been specified, the resulting filesystem is not ISO9660 level-1 compliant and will not be readable on MS-DOS. See also NOTES section for more information on the RR_MOVED directory.
    -no-bak
    Do not include backup files files on the iso9660 filesystem. If the -no-bak option is specified, files that contain the characters '~' or '#' or end in '.bak' will not be included (these are typically backup files for editors under unix).
    -pad
    Pad the end of the whole image by 150 sectors (300 kB). If the option -B is used, then there is a padding at the end of the iso9660 partition and before the beginning of the boot partitions. The size of this padding is chosen to make the first boot partition start on a sector number that is a multiple of 16.

    The padding is needed as many operating systems (e.g. Linux) implement read ahead bugs in their filesystem I/O. These bugs result in read errors on one or more files that are located at the end of a track. They are usually present when the CD is written in Track at Once mode or when the disk is written as mixed mode CD where an audio track follows the data track.

    To avoid problems with I/O error on the last file on the filesystem, the -pad option has been made the default.
    -x path
    Exclude path from being written to CDROM. path must be the complete pathname that results from concatenating the pathname given as command line argument and the path relative to this directory. Multiple paths may be excluded. Example:
    Code:
     mkisofs -o cd -x /local/dir1 -x /local/dir2 /local
    NOTE: The -m and -x option description should both be updated, they are wrong. Both now work identical and use filename globbing. A file is excluded if either the last component matches or the whole path matches.
    At least -pad seems to be unnecessary with new versions of mkisofs.

  6. #6
    Senior Member registered user
    Join Date
    May 2006
    Location
    Columbia, Maryland USA
    Posts
    1,631
    Thanks, klaus2008. This helps a lot.

    I still am confused over man mkisofs and the die.net version of mkisofs(8). For example, the B option seems to be quite different. Is there really much hazard for the less experienced Knoppix user, such as myself, to disregard many-if not all of these options, and just do something 'simple' like the following ?
    Code:
     sudo mkisofs -R -U KNOPPIX-DATA | create_compressed_fs -B 131072 -m - - > /mnt-system/KNOPPIX/KNOPPIX2
    On the excludes, will wild-card specs work? I've found these handy to lighten things up. Such as the excludes in tar:
    Code:
     --exclude=*/Cache/* --exclude=*/cache/*

  7. #7
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802

    Minimizing and minimizing..

    Quote Originally Posted by utu View Post
    .
    This is not to take away from heretofore 'standard' re-mastering procedure(s) but to
    highlight a subtle refinement in using Knoppix that accomplishes much of what one hopes to
    achieve by re-mastering, or making backups of some kind. This alternative is elegant
    in minimizing the resources required in re-mastering, including time.
    A full remastering of a Poor Man's Install using squashfs needs about 12GB temporary space, for example on a Windows partition, and it can take 15-20 minutes. For precise timings of an actual process, see my squashfs report, #7 in http://knoppix.net/forum/threads/298...l=1#post127051 So while minimization is obviously correct, the savings achieved may be less than impressive. IMHO, the relevant reasons for using this kind of scheme is to improve workflow, backup safety etc. That a full remastering can be done with a minimum of work, doesn't mean one should do it. On the contrary, the easier it is, the more careful one should be about checking out alternatives.

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

    How things are stacking-up

    .
    I've had great success in successively updating my Knoppix 7.0.2 DVD-size LiveUSB
    using the process of stacking successive compressed images mentioned by Klaus K in
    the link noted in my Post #1. This is a LiveUSB on an 8 Gb Class 10 SDHC made using
    a Knoppix 7.0.2 LiveCD. At present, I have 230 Mb unused of my 500 Mb persistence,
    and have 3.1 GB unused in /mnt-system.

    I consider success in this instance is in being able to efficiently save whatever
    small increments I develop in my LiveUSB, and to do so in such a fashion that
    the occasional inadvertent ruination of tweaks stored only temporarily is 'no big deal'.

    My KNOPPIX1, in 31 Mb, contains the bulk of my usual tweaks, except flash;
    my KNOPPIX2, in 85 Mb, contains flash, an ntfs revision and Hidden Gems.
    My current KNOPPIX-DATA has only a few new tweaks, so it hardly qualifies yet
    for moving to the safety of KNOPPIX3.
    These two new compressed images added about eight seconds to my boot-up time.

    If one starts out with a LiveUSB and persistence, one may disregard ramdisk as a
    necessary special case. The little program I use for this progression is as follows.
    I have only chosen to automate a few of the steps, leaving several simple procedures
    that require some judgment to the process as outlined in my Post #14.

    Code:
    #!/bin/bash
    # Declare Integer count
    #
    # ~/text/smite: remember to do 'chmod +x backup' & 'chown root:root smite'
    # Activate in /home/knoppix/text as sudo ./smite
    #
    IMGDIR=/mnt-system/KNOPPIX/; count=1
    cd $IMGDIR; for dir in KNOPPIX[0-9]; do let count++; done
    UPDIMG=$IMGDIR'KNOPPIX'$count
    
    # No more than 9 images allowed
    if [ "$count" -gt  9 ]; then echo 'Too many images; exiting.'; exit 0; fi
    
    cd /KNOPPIX-DATA/; sudo mkisofs -x '*[Cc]ache*' -x '*.wine*' -R -U etc home root usr var| \
    create_compressed_fs -B 131072 -m - - > $UPDIMG
    
    exit 0
    So far, it is my impression that for the purpose of progressing one's LiveUSB by
    stacking successive images one may disregard a lot of the mkisofs options that are
    required to define an iso for a bootable CD or for handling non-Linux files.
    The exclude option is one that IS essential, to allow editing of what's ultimately saved.

    I'd be pleased to hear of anyone else's experience with this stacking idea.

  9. #9
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    Just one technical remark about number of images handled. I haven't tried the cloops, but for ordinary loop the busybox version used seems to be limited in number. Has anybody tried how many will actually be mounted of KNOPPIX..KNOPPIX9? All, as we should hope for, or less?

    BTW, I wonder how a subversion repo would work for persistent store backup with the modest amount of data/files we have there after remastering. I think about trying it myself, but if anybody already has, it would be interesting to hear about the experiences. The rationale is that it is inefficient to back up the image file often when the actual changes made are only to a limited number of files.

  10. #10
    Senior Member registered user
    Join Date
    Sep 2006
    Posts
    802
    Init's mountunion() has no influence on busybox's capabilitites, I would think.

Page 2 of 2 FirstFirst 12

Posting Permissions

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


OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN picture

OPNsense pfSense 8-Core Atom C3758 2.2GHz 8GB DDR4 64GB SSD 8x NIC QAT AES VPN

$145.00



pfSense Firewall 16-Core Atom C3958 8GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN picture

pfSense Firewall 16-Core Atom C3958 8GB DDR4 RAM 64GB SSD 8x 1Gbe QAT AES-NI VPN

$184.99



OPNsense pfSense 16-Core Atom C3958 16GB ECC RAM 512GB SSD 8-Port QAT AES-NI VPN picture

OPNsense pfSense 16-Core Atom C3958 16GB ECC RAM 512GB SSD 8-Port QAT AES-NI VPN

$258.00



Fortinet FortiGate FG-40F Network Security Firewall NO RACK EARS picture

Fortinet FortiGate FG-40F Network Security Firewall NO RACK EARS

$49.99



Fortinet FortiGate 60F FG-60F P24286-03-13 Network Firewall Security Appliance picture

Fortinet FortiGate 60F FG-60F P24286-03-13 Network Firewall Security Appliance

$155.75



OPNsense Firewall VPN QAT 8-Core Atom C3758 2.20GHz 16GB DDR4 128GB SSD 8xNIC picture

OPNsense Firewall VPN QAT 8-Core Atom C3758 2.20GHz 16GB DDR4 128GB SSD 8xNIC

$175.00



Fortinet FortiGate 60F FG-60F UTM UTP License Until 2027 Network Security FW VPN picture

Fortinet FortiGate 60F FG-60F UTM UTP License Until 2027 Network Security FW VPN

$229.99



Palo Alto PA-220 Next-Gen Firewall 520-000309-00J picture

Palo Alto PA-220 Next-Gen Firewall 520-000309-00J

$40.00



Cisco Meraki MX67-HW Security Appliance Firewall NEW Unused Unclaimed picture

Cisco Meraki MX67-HW Security Appliance Firewall NEW Unused Unclaimed

$202.50



NETGEAR ProSafe 8-Port Gigabit VPN Firewall FVS318G NEW IN BOX picture

NETGEAR ProSafe 8-Port Gigabit VPN Firewall FVS318G NEW IN BOX

$69.99