Results 1 to 10 of 10

Thread: persistence to HD when booting from DVD

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Location
    Sonoma County, California
    Posts
    7

    persistence to HD when booting from DVD

    I miss the persistence that was available in 5.x and earlier. Basically, I don't want to have to copy the DVD to an HD partition - I just want a blob of data and config changes to be available. I don't want to have to remaster the disc and store the data to the disc, because it should be able to change with use.

    Ideally, I could persist to a USB stick, which would accompany the DVD, but say when running Knoppix as a virtual host on a PC, I'd just as soon mount the ISO and boot that, than dedicate another 4G of HD to _that_ virtual config (when I can use the ISO - or a real disc - for multiple VMs).

    Creating a filesystem image isn't a problem, though I'm at a bit of a loss as to how I might manually mount it without chuffing everything

    # mount host media
    mount /media/sda1
    # create ~1.5G image file on already mounted host media
    dd if=/dev/zero of=/media/sda1/knoppix-data.img bs=1M count=1500
    # format it
    mke2fs /media/sda1/knoppix-data.img

    # create mountpoint and mount the image
    mkdir /KNOPPIX-DATA
    mount -o loop /media/sda1/knoppix-data.img /KNOPPIX-DATA
    # here's where I'm fuzzy - this will solidly hose the aufs stacked filesystem
    mount -t aufs -o "prepend:/KNOPPIX-DATA=rw:/ramdisk=ro,noplink" unionfs /UNIONFS
    #(br, and append both seem to act the same, killing the fs stack as well)

    To reiterate: I don't want to have to install the entire Knoppix distro to HD or a USB stick, I just want to store the persistent data to one and continue to boot from disc, much as I was able to in 5.x. Yea, I got it that the aufs content won't necessarily port nice to the next release.

    Any assistance would be greatly appreciated.

  2. #2
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423
    I am not sure what you seek in supported "out-of-the-box" or not, maybe it's one of the cheat codes. I think there is probably a need for this feature, but not very much, because flash and harddisk are big these days. If I am prepared to store things on harddisk, I could spare the additional disk space to install the entire knoppix. The "poor-man" install is only consisting of a few files, it does not "polute" the harddisk that much. More importantly, DVD is slow compared to harddisk. After having using the harddisk, using DVD will become so unbearably slow.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Location
    Sonoma County, California
    Posts
    7
    I appreciate your reply, but it doesn't address my question, which is how to mount a persistent filesystem from HD.

    Some counterpoints:
    1. Availability of CD/DVD boot is far more reliable than USB on older hardware. yes, I'm aware that I can clone knoppix to USB, then use a CD to boot and point to the USB for the root FS. I don't want to do that.

    2. If I'm running a config within MS Virtual PC (and I do), I cannot use USB, period. I can however mount the ISO (from HD), so the speed difference between Knoppix on CD vs, Knoppix on HD is nominal (though I'm still taking a memory hit), therefore, no need to have the disc in the physical drive. Also, if I run multiple vms, I can use the same ISO image to host each of them - meaning FAR less disk usage. Dunno about you, but _I_ believe in backups, and as a result, I'm a bit picky about wasting storage space.

    3. Raw speed is less of an issue as compared to needing to back up multiple copies of the data.

    4. persistent fs overlay images allow for cloning stable configs - I can copy the data file for safekeeping, and easily "roll back" to it if necessary.

    Mostly, I just need to update some CPAN stuff, and say, fprot or clamav to use a knoppix boot to check suspect files on a network share. Knoppix is not my primary work environment, so I'd just as soon not dedicate 8GB+ of my HD to it just to run a few tools, when half a gig would more than suffice.

  4. #4
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423
    Assuming there is no ready feature for it and you want to accomplish something outside the capability of KNOPPIX today, then you will have to customize.

    But yet you don't want to remaster - what is definition of remaster here ?

    The two things above are contraditory to each other. So how could it be possible ?

    Assuming the current KNOPPIX is not supporting the feature, you would have to modify 'minirt.gz' for the minimum! That is probably not called 'remaster', but you need to modify the minirt.gz on the iso.

  5. #5
    Junior Member
    Join Date
    Oct 2009
    Location
    Sonoma County, California
    Posts
    7
    I'm fine with running a script after startup, if aufs can be merged in that way. Ultimately though, if I must remaster the DVD ISO, I still only want to have to remaster it to add support for an HD based persistence file.

    Is persistence without a tohd install really a capability nobody else was using before?

  6. #6
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423
    Quote Originally Posted by sstraw View Post
    Is persistence without a tohd install really a capability nobody else was using before?
    I think so. If you look at the script 'init' inside minirt.gz, you will understand knoppix operations a lot better.
    ( Google around for remaster knoppix thingie, you will find some doc about how to view/modify minirt.gz. Basically 'minirt.gz' is a gzipped cpio archive. ).

    Somewhere inside the script 'init', there is a function mountdata(). I would suggest you modify it. Right now, KNOPPIX only looks for knoppix-data.img under /mnt-system/KNOPPIX directory ( the /mnt-system is where KNOPPIX is located, so in your case, it's the DVD), so you can very simply modify it to look for knoppix-data.img at any other locations of your choice. This will likely be the only place you need to modify to accomplish what you want to do.

  7. #7
    Junior Member
    Join Date
    Oct 2009
    Location
    Sonoma County, California
    Posts
    7
    I've been in minirt.gz several times. Enough to know that the older versions were ext fs, while the newer ones in 6.x are cpio.

    I've already seen where I could for instance, add KNOPPIXn.IMG files to have them automatically be mounted in a stack below the ramdrive aufs. However, all of those would be mounted _read_only_, not rw. Not what I'm looking for.

    I'd like to know the aufs syntax I'd be using is legit. The absence of an aufs manpage is curious (no mount.aufs, or aufs mention in the mount manpage either).

    I guess I'd use getbootparam (shell script function) to grab the parameters from the kernel commandline and check for something like "persist", and just reinstate some selected code from 5.x (with necessary changes of course).

    Was just really hoping someone had already gone down that road.

  8. #8
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423
    Quote Originally Posted by sstraw View Post
    I've already seen where I could for instance, add KNOPPIXn.IMG files to have them automatically be mounted in a stack below the ramdrive aufs. However, all of those would be mounted _read_only_, not rw. Not what I'm looking for.
    I BELIEVE it is because you stack it up too late, after the ramdrive.

    Only the first one, is stacked as rw, anything stacked up later will become readonly. When the script 'init' inside minirt.gz found a knoppix-data.img, it will mount it as the first one, thereby making it readwrite (it will skip mounting the ramdrive in this case). If you do these things as a script after booting, the ramdrive is already mounted as the first one, you missed the chance.

    That's what I deduced by looking through the script. I might be wrong.

  9. #9
    Moderator Moderator
    Join Date
    Jan 2010
    Location
    Asheville, NC, USA
    Posts
    528
    Here are some cheatcodes that may be helpful:


    Code:
    knoppix nonetworkmanager            Don't start network manager
    knoppix home=/dev/sda1/knoppix.img  Mount loopback file for overlay
    knoppix toram                       Copy to RAM and run from there
    knoppix tohd=/dev/sda1              Copy to Harddisk and run from there
    knoppix fromhd=/dev/sda1            Boot from previously copied CD-Image
    knoppix bootfrom=/dev/sda1/KNX.iso  Access image, boot from ISO-Image. ***)
    knoppix knoppix_dir=KNOPPIX         Directory to search for on the CD. 
    knoppix knoppix_name=KNOPPIX        Cloop-File to search for on the CD.
    knoppix noswap                      Don't use existing swap partitions
    knoppix forensic                    Don't use swap and mount read-only
    knoppix secure                      Disable root access
    knoppix noimage                     Do NOT use persistent image
    Cheers!
    Krishna
    Last edited by krishna.murphy; 12-07-2010 at 01:11 AM. Reason: Readability

  10. #10
    Senior Member registered user
    Join Date
    Dec 2009
    Posts
    423
    Quote Originally Posted by krishna.murphy View Post
    Here are some cheatcodes that may be helpful:
    Instead of giving us a vague reply that some of the cheatcodes may be helpful, maybe you want to enlighten us specifically which one(s) are helpful.

    The cheatcode 'home=something' looks promising but I wonder anyone has every tried it for KNOPPIX 6.2.X and 6.3, because I could not find a single thing in the related scripts which implements this cheatcode. In other words, this cheatcode is not implemented for the mentioned KNOPPIX versions. It should be removed from all the documentation.

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 5362 IBM System/36 Mini-Computer Mainframe 5291 2, CRT Terminal DM12N501 picture

Vintage 5362 IBM System/36 Mini-Computer Mainframe 5291 2, CRT Terminal DM12N501

$219.99



Vintage Hewlett Packard HP 2100S Microprogrammable Computer System Mainframe #2 picture

Vintage Hewlett Packard HP 2100S Microprogrammable Computer System Mainframe #2

$1499.99



GMK Awaken - Mainframe base kit (BNIB - Factory Sealed) picture

GMK Awaken - Mainframe base kit (BNIB - Factory Sealed)

$100.00



VINTAGE IBM Type 4869 External 5 1/4

VINTAGE IBM Type 4869 External 5 1/4" ~ Floppy Disk Drive Mainframe ~

$129.99



VINTAGE CPU IBM MCM POWER7 - MAINFRAME PROCESSOR picture

VINTAGE CPU IBM MCM POWER7 - MAINFRAME PROCESSOR

$49.00



6 Vintage Computer Tape Reels mainframe 3200 5000 data ibm magnetic processor picture

6 Vintage Computer Tape Reels mainframe 3200 5000 data ibm magnetic processor

$99.00



HP HEWLETT PACKARD 9826 Vintage Computer picture

HP HEWLETT PACKARD 9826 Vintage Computer

$524.00



vintage lot of 3 computer tapes mainframe data ibm magnetic reels picture

vintage lot of 3 computer tapes mainframe data ibm magnetic reels

$25.00



Xargon 1 Beyond Reality RARE Game Floppy 3.5” Floppy Mainframe Collection picture

Xargon 1 Beyond Reality RARE Game Floppy 3.5” Floppy Mainframe Collection

$349.99



Lotus Works Vintage Software 3.5in Disks Original Seal 1990 Mainframe Collection picture

Lotus Works Vintage Software 3.5in Disks Original Seal 1990 Mainframe Collection

$431.99