-
Senior Member
registered user
Adding more persistent disk images
In Knoppix 6.X, the persistent image is a file, knoppix-data.img, which at boot gets loop-mounted on KNOPPIX-DATA and merged with the cloop-mounted Knoppix image in unionfs.
If something has gone wrong with this image, you may just mount the media (for instance fram another running version of Knoppix), and delete the file. (Don't try to delete a mounted image). On next booting from this device, you will be asked to create a new persistent image.
This image is very tightly integrated with the Knoppix version you are running, and on FAT32 it is limited to 4GB. I find I need more space, I'd like not to have it integrated with the current Knoppix version, and I want to store it on USB-sticks etc.
Typically, I want to install Eclipse, Groovy, Grails and several other Java packages on the stick independent of the running Knoppix. I also want to use USB sticks without all the limitations of the FAT32 file system.
One way to accomplish this, is adding more persistent disk images. I use a 16GB stick, with ca 1 GB for Knoppix 6.2 from CD, 4GB for standard persistent disk image, and two more persistent images, which will be mounted at boot time, but not merged with KNOPPIX in unionfs.
I choose to put the images together with the standard image inside the /knoppix folder.
First step is to create the file, which is done with dd.
Second is to setup a loop device on the file, with losetup
Third is creating an ext2 file system on the image.
Next, create a mounting point and test-mount the loop device. After testing, unset the loop connection with losetup -d
Now, the new image is ready for mounting with mount -o loop <image> <mount point>.
Code:
root@Microknoppix:/media/sdd1/knoppix# dd if=/dev/zero of=knoppix-data2.img bs=512 count=8000000
8000000+0 records in
8000000+0 records out
4096000000 bytes (4.1 GB) copied, 336.48 s, 12.2 MB/s
root@Microknoppix:/media/sdd1/knoppix# losetup /dev/loop6 knoppix-data2.img
root@Microknoppix:/media/sdd1/knoppix# mkfs -t ext2 /dev/loop6
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
250480 inodes, 1000000 blocks
50000 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1027604480
31 block groups
32768 blocks per group, 32768 fragments per group
8080 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736
root@Microknoppix:/media/sdd1/knoppix# mkdir /mnt/knxdata2 && mount /dev/loop6 /mnt/knxdata2
root@Microknoppix:/media/sdd1/knoppix# umount /mnt/knxdata2 && losetup -d /dev/loop6
root@Microknoppix:/media/sdd1/knoppix# mount -o loop knoppix-data3.img /mnt/knxdata2
After this setup is performed, necessary mounting code may be added to /etc/rc.local. I prefer to stay entirely outside the hard-coded directory system, which eliminates a lot of otherwise natural choices. I use store as a common mounting point for extra "partitions", and mount the development tools volume as /store/share and the user projects as /store/varl.
Edit 20100220:
It seems to be possible to make a backup of the standard persistent image, compress it, and have it copied back at boot time if something has gone wrong with the running image. From Klaus' comments to his list of 6.2.0 cheat codes:
If you place an update*.zip or update*tar.gz file on the medium holding
the KNOPPIX data, it will be unpacked onto the overlayed filesystem
before starting "init", thus allowing quick reconfiguration of the
system.
One consequence of this, is that it may be good practice to back up the persistent image now and then. Accessing it when it is not mounted. For instance, put a KNOPPIX copy somewhere else, and either use that with the fromhd= cheat code, or (g)zipping the knoppix-data.img file from it.
Similar Threads
-
By greenfly in forum Ideas
Replies: 2
Last Post: 01-10-2009, 12:31 PM
-
By hotplainrice in forum General Support
Replies: 0
Last Post: 11-02-2006, 11:02 PM
-
By linuxman in forum General Support
Replies: 2
Last Post: 12-10-2005, 11:47 PM
-
By rwcitek in forum Hardware & Booting
Replies: 0
Last Post: 05-29-2005, 08:37 PM
-
By captain in forum The Lounge
Replies: 1
Last Post: 05-20-2004, 06:19 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
A-Tech 8GB DDR3 1600 PC3-12800 Laptop SODIMM 204-Pin Memory RAM PC3L DDR3L 1x 8G
$13.99
Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3
$13.50
HyperX FURY DDR3 8GB 16GB 32GB 1600 MHz PC3-12800 Desktop RAM Memory DIMM 240pin
$15.90
Crucial DDR3L 16GB 1600 2x 8GB PC3-12800 Laptop SODIMM Memory RAM PC3 16G DDR3
$22.50
8gb DDR4 2400MHz Sodimms (kingston, SK Hynix, Samsung) Laptop/USFF Memory
$11.99
A-Tech 8GB PC3-12800 Desktop DDR3 1600 MHz Non ECC 240-Pin DIMM Memory RAM 1x 8G
$13.99
HyperX FURY RAM DDR4 16GB 8GB 32GB 4GB 3200 2666 2400 2133 Desktop Memory DIMM
$9.64
32GB ECC DDR3 RAM 2x16GB PC3L-12800R Desktop/Server Memory
$11.99
Lot Of 10 Mixed Samsung 16GB 2Rx4 PC4-2133P RDIMM DDR4-17000 ECC Server Memory
$149.99
Lot of 20pcs Samsung,SKhynix,ADATA 8GB DDR4-2133P/2400T/2666V Desktop Memory
$166.78