PDA

View Full Version : New 3.8 UnionFS Persistence -- Howto?



heiby
05-16-2005, 07:42 PM
Hi! I have 3.8.1, a PC, and a 64Meg USB memory stick. I saw that 3.8 added the ability to use UnionFS to allow (effectively) persistent modification of any file in the filesystem, with the changes saved onto the USB memory stick.

The problem is, I've been searching the documentation and Google, and have been unable to find anything that says anything other than that I can do this. I have not been able to find anything that actually tells one HOW to do it.

Is there such a howto somewhere? Among the questions in mind are:

Do I need to do any special preparation of the memory stick?

Can I share use of the memory stick with other things?

Can the memory stick be FAT32 for use with Windows boxes and yet still work for this?

Do I need to tell Knoppix to go out and find the memory stick and start using it? How?

Does Knoppix find it automatically? At what point in the boot process? What script does it?

If I insert the memory stick after the boot process is finished, will it be used to overlay the file system, or is it recognized only at boot?

If I set this up on 3.8.1, will it still be good under 3.8.2, etc.?

Assuming some version in the future for which the UnionFS overlaying is not a good plan, can the memory be mounted as a regular filesystem to allow copying out the files, or is it stored in some kind of weird format?

That's about it, for now. Thanks!

heiby
05-16-2005, 11:16 PM
Poking around on 3.8.1, I fairly quickly had found "Create a persistent KNOPPIX disk image" under Configure, but aborted that when it was talking about persistent home directory. I wanted the whole UnionFS thing, not just my homedir to be persistent.

Well, I saw another note here that seemed to imply that the talk of persistent home directory was misleading, and that it was (in fact) the UnionFS stuff I seek. So, I tried it.

I have a 64Meg USB flash fob, with a FAT formatting, and am trying this on an older Compaq P3 box. I told it that I wanted to use 25Meg of the USB flash, and that I did not want it encrypted. It went fairly quickly for a while, but has now been stopped for several minutes at 96%. The LED on the flash drive is still flashing, so maybe something interesting is happening.

In a shell window, I entered the "sync" command, which has not come back for several minutes. I think I'll take a washroom break and see how things are in a few more minutes...

Back now. That's better. Unfortunately, not Knoppix, though. Everything appears the same. I did a "ps -fea" in another shell window, and found that there is a "umount /mnt/uba1" that's been sitting there for about 20 minutes -- perhaps a clue?

heiby
05-18-2005, 04:31 PM
Is there nobody who knows how to get this to work?

mark.johnson
05-18-2005, 05:00 PM
Poking around on 3.8.1, I fairly quickly had found "Create a persistent KNOPPIX disk image" under Configure, but aborted that when it was talking about persistent home directory. I wanted the whole UnionFS thing, not just my homedir to be persistent.

Well, I saw another note here that seemed to imply that the talk of persistent home directory was misleading, and that it was (in fact) the UnionFS stuff I seek. So, I tried it.

I have a 64Meg USB flash fob, with a FAT formatting, and am trying this on an older Compaq P3 box. I told it that I wanted to use 25Meg of the USB flash, and that I did not want it encrypted. It went fairly quickly for a while, but has now been stopped for several minutes at 96%. The LED on the flash drive is still flashing, so maybe something interesting is happening.
It just says about a persistant homedir becuase that's all the script used to do, but that's definately what you're after.

You'll find that it seems to hang at 96% for a while, but all you have to do is leave it. If navigate to the drive's mount point in konqueror, you'll see knoppix.img in the specified place, and its size increases over time until it's the size you specified.

When it's done wait until it shows a dialouge about how to boot using the persistant image. The easiest way is just to hit ENTER at the boot prompt, as this has the same effect as "knoppix home=scan". When the blue screen appears, select "system" to get the full UnionFS effect.

As for your other questions:
You can share the stick with other things, knoppix.img is just like any other file, except that it's mountable. The only preparations you need are partitioning and formatting the stick.
I believe FAT32 will work fine, as Linux can read/write FAT32 natively (unless I've been misinformed?)
Knoppix should find the image automatically, after the point in the boot process where partitions are inserted into /etc/fstab. That's when the blue screen (mentioned above) appears.
If you insert the stick after the boot process has finished, it WONT work, becuase the UNIONFS merging all happens in the boot process. You'll only be able to mount it as a normal partition.
I assume the image will be fine with future versions of Knoppix.

Cheers,
Mark

heiby
05-18-2005, 10:52 PM
By "a while", do you mean "an hour or more"?

It looks like it is hung in the "umount /mnt/uba1", which (if I read the script correctly) happens just before the guage is killed and the "success" box is put up. So, it should already have created the image file and is just trying to get it out to the flash drive and un-mount the drive. And, this is taking an hour.

Hmm.

I think I'll try putting it on a HD partition... OK, that ran and completed in a few seconds, leaving me with a nice knoppix.img file. Maybe I can put it onto my USB fob and get it to still be recognized and used, even though it appears problematic to create it there in the first place.

However, since my USB fob is tied up trying to be un-mounted, I guess it's reboot time.

heiby
05-19-2005, 05:13 PM
Trying to copy the image file to my USB memory fob while booted under Knoppix gave me the same apparent hang as trying to create it there in the first place. I re-booted into Windows 2K Pro, and was able to copy the 32M image file onto the USB memory fob in less than a minute.

With the image file now on the fob, persistence seems to be working pretty well, although I'm still working through a few mysteries of the boot process and when what happens.

Also, shutting down Knoppix takes several minutes with the UnionFS USB memory fob in use. Seems excessive.

Agarax
08-19-2005, 08:39 PM
How would one do this with a CD-RW?