PDA

View Full Version : Can a directory in Linux partition be used instead of a persistent image?



rajibando
03-23-2015, 06:03 PM
Many of the Linux distributions use persistent images each, such as pendrivelinux or Knoppix.
Pendrive linux goes a step further to create and extend an EFS on the fly!
Is it possible to use a separate directory instead of the persistent image, to achieve the same goals?
My HDDs are ext4, but persistent images are ext2, meaning data during accidental power cut can't be recovered.
How can I use a directory + partition for persistence across multiple boots?

Blacksimon
04-11-2015, 12:18 PM
take a look http://knoppix.net/forum/threads/30382-Flash-to-USB-installer-%28experimental%29-in-7-0-5?highlight=knoppix-data.inf

rajibando
04-11-2015, 02:30 PM
Thank you! On hindsight I am just cursing myself for the typos while writing Directory. I know it can't be edited unless the moderator wants it. But people searching for a viable solution will miss it. I searched and missed the topic you directed me to, particularly, deviouswun's post.

Blacksimon
04-11-2015, 05:16 PM
I use knoppix only as Live Linux Usb. I do not like install it on my hdd because I prefer other LTS distro. But you can manually create a new ext4 persistent overlay as file (knoppix-data.img) or as a separated partition on your hdd.

rajibando
04-11-2015, 05:47 PM
Yes, I saw two options in your recommended post. One of them is overlay. What is this 'Overlay"? Though I understood it intuitively, what is the official definition of Overlay?
And where is the info page for manual persistent images?
Thanks for replying.

Blacksimon
04-12-2015, 07:50 AM
Overlay is another definition of the persistent image in knoppix: knoppix-data.img or if encrypted is knoppix-data.aes
This file contains all the installed application, configuration settings, your personal data, that you want add to the system and can not be stored in r/o Live Linux.
After boot process this file is integrated in the system with UnionFS.
I don't know if there is an updated manual, but I remember it exist.
In any case you can create the image with dd command.
ASAP I will post the code if you do not find.
Regards

rajibando
04-12-2015, 10:38 AM
Overlay is another definition of the persistent image in knoppix: knoppix-data.img or if encrypted is knoppix-data.aes
This file contains all the installed application, configuration settings, your personal data, that you want add to the system and can not be stored in r/o Live Linux.
After boot process this file is integrated in the system with UnionFS.


Oh, I see! I am aware of knoppix-data.img and unionfs. I sometime switch to Pippy Linux to mount the Knoppix .img file, copy the downloaded files and clear and clear up the space of the ... .img file.



I don't know if there is an updated manual, but I remember it exist.
In any case you can create the image with dd command.
ASAP I will post the code if you do not find.
Regards
No, you needn't exert.
BTW, please be sure to check this post. I didn't know about this option, which uses the persistent image in a different way.

http://knoppix.net/wiki/Category:Hard_drive_Installation#Persistent_memory Then,

... With Flash disk Install and the option overlay partition you'll get persistent memory (encrypted or not) in a separate partition and without the limitation of maximum size of 4 GB. At the next boot, Knoppix will scan for the file '/mnt-system/KNOPPIX/knoppix-data.inf', which contains the line



There is a very interesting link : http://www.wp-schulz.de/summary/summary-recombine.html
One of these days I am going to try this option. It sounds very interesting for me to try out, especially, with the freedom it entails.

I have never tried with the flash drive install. I was satisfied with the 7.2.0 . Now, considering the greater possibilities with the option I am surely going to try with a pen drive once I have cleared up one of the largest ones I possess.

Thank you for your feedback.

Blacksimon
04-12-2015, 03:26 PM
Oh, I see! I am aware of knoppix-data.img and unionfs. I sometime switch to Pippy Linux to mount the Knoppix .img file, copy the downloaded files and clear and clear up the space of the ... .img file.

No, you needn't exert.
BTW, please be sure to check this post. I didn't know about this option, which uses the persistent image in a different way.

OK



There is a very interesting link : http://www.wp-schulz.de/summary/summary-recombine.html
One of these days I am going to try this option. It sounds very interesting for me to try out, especially, with the freedom it entails.

I have never tried with the flash drive install. I was satisfied with the 7.2.0 . Now, considering the greater possibilities with the option I am surely going to try with a pen drive once I have cleared up one of the largest ones I possess.

Thank you for your feedback.

About /mnt-system/KNOPPIX/knoppix-data.inf'
1 Start knoppix with cheatcode noimage to ignore knoppix-data.img
2 Using Gparted create a second partition of the size you want in Usb/Hdd where you have installed knoppix, and format ext4
3 write inside knoppix-data.inf the line: 2 KNOPPIX-DATA ext4 [2 indicates the second partition, KNOPPIX-DATA is the label name of knoppix-data.img when mounted in the live system(do not change it), ext4 is the type of file system]
4 delete old knoppix-data.img or rename if you prefer
5 restart Knoppix
Now the second partition becomes your persistent image

Bye

rajibando
04-12-2015, 04:25 PM
Yes, I am enthusiastic about re-combining the image, changes and old Knoppix with a new Knoppix, using the instructions written by Werner P. Schulz in the link I posted above. Then I would be in a position to use the image for a year or so.
Thanks and 'bye!

rajibando
04-23-2015, 05:52 AM
I bought a new flash-drive/pendrive for this specific purpose.
Read the required posts, particularly, Flash to USB installer (experimental) in 7.0.5 (http://knoppix.net/forum/threads/30382-Flash-to-USB-installer-(experimental)-in-7-0-5/page7)
copied flash-knoppix2 (http://debian-knoppix.alioth.debian.org/utilities/flash-knoppix2) to /usr/bin, saved as flash-knoppix2 in /usr/bin, marked as executable, ran the script flash-knoppix2. The same message appears as before:
sdb: SanDisk Cruzer Blade (14907MB)
/dev/sdb:
Overlay size is too small!
(minimum 400MB required)
260
Can't the flash drive installation be simplified to include ext4 partitioning, option 'p', i.e., separate overlay?

rajibando
04-23-2015, 02:28 PM
Like we use knoppix cheatcodes in grub.cfg how can we pass on those codes in case of ext4 persistant partition while booting to knoppix live in flash-drive?
</br>Thank you :D, belately, and sorry _/|\_ for being late.

Werner P. Schulz
04-23-2015, 11:03 PM
Many of the Linux distributions ..First of all, Knoppix isn't a Linux distribution (http://knoppix.net/wiki/Category:Hard_drive_Installation#Warning:_Knoppix_ is_a_Live_Linux_DVD). Many tricks you'll do with a distribution, you cannot do with Knoppix.

Why do you want to use a ext4 partition instead of a ReiserFS partition? ReiserFS is a proofed filesystem and KK does use it with good reason.

With the new Knoppix versions you don't need to copy flash-knoppix2. You can either use flash-knoppix from the command line or select it from the menu. If you use the command line, you'll see the possible options by
flash-knoppix --help

If you'll try the description of posting #8, you doesn't need an extra cheatcode; the content of 'knoppix-data.inf' is enough (bit I didn't tested it).

rajibando
04-24-2015, 04:43 AM
Good Morning, Mr. Schulz! And thank you for writing on this thread. I will try to answer to your specific queries point-wise:

(1) I am compelled to use 7.2.0 because only it allows me to install the proprietory NVidia driver for my laptop. I know you will frown upon my using a proprietary driver on my free and open source system, but nouveau, nv, framebuffer etc., make a mess of my system - they stall it.

Moreover, the HCL laptop I bought six years back is defective. If the system doesn't use the GPU it uses the CPU, the laptop heats up and switches itself off. Many power-offs damage the knoppix-data.img

If you see my other posts on Knoppix 7.4.2, like:

(a) Why 7.4.2 doesn't have xorg.conf file, why /etc/X11 is read-only?
(b) Knoppix 7.4.2 presents xscreensaver with GUI
(c) [Attn: Prof.Knopper] Incompatibility of NVidia graphics cards with Knoppix
you will see that I had problems with it.


(2) I have been successful in using a flash-knoppix aided by Blacksimon's suggestions, using an entire ext4 partition rather than the raiserfs knoppix-data.img. It is good for me to use the ext4 filesystem as I can recover data after a crash.

(3) To use knoppix-data.inf file I would need to know the list of codes that I I can pass to knoppix during boot ups. Is there a help file on knoppix-data.inf with a list of options?

I hope I have been able to explain myself.

Once again, I thank you for writing to replying to my queries.

Regards,
Rajib

Blacksimon
04-25-2015, 09:34 PM
Hi rajibando,
For the use of knoppix-data.inf you did not need any cheatcode.
The Linux initial RAM disk minirt.gz is a temporary root file system that is mounted during system boot to support the boot process. The minirt.gz contains various executables and drivers that permit the real root file system to be mounted, after which the initial RAM disk is unmounted and its memory freed.
Inside minirt.gz there is a file called init, this takes care of controlling the presence of the file knoppix-data.inf, read what is written inside and mount the persistence partition thanks to the instructions found.
If I remember, to take a look: gunzip -c minirt.gz | cpio -ivu --no-absolute-filenames.



Regards,
Blacksimon

utu
04-26-2015, 12:45 AM
.
Greetings Blacksimon & rajibando.

FWIW, init shows up at /init on both Knoppix 7.2 LiveCD & 7.4.2 LiveUSBs.
No need to decode the minirt.gz. Point Leafpad, or better yet, Geany at /init
to study the inner workings of Knoppix.

rajibando
04-26-2015, 04:23 AM
Hi rajibando,
For the use of knoppix-data.inf you did not need any cheatcode.


Dear Simon,
Both Utu and I found out that we can indeed pass cheatcodes through code, bypassing the Boot prompt, to Knoppix even in the flashdrive scenario. I request you to look at this Reply No.5 & 6 (http://knoppix.net/forum/threads/31406-What-codes-can-be-passed-on-to-Knoppix-during-boot-time-by-knoppix-data-inf?p=132311&highlight=#post132311)
Thanks, Simon & Utu, for sharing your knowledge with the forum members. We will be enriched by these discussions.
Regards,
Rajib