- Rationale
Possible answer to keeping up with releases, and also thereby keeping a tight rein on what ends up on the hard disk, by keeping a couple of different distributions and just running their Live Versions. - Requirements
Lots of disk space and a fairly fast CPU.
METHOD
LIVE MINT
- Place Downloaded Image in a Partition (Any one of ext2, ext3, reiserfs)
- Copy from the Iso Image the Files: 'vmlinuz' and 'initrd.lz'. Place them in a reiserfs Partition (not ext2fs, other fs types might be O.K.). There are numerous descriptions for the next steps wherever one looks, but anyway will supply the code used. In the following code block the downloaded DVD Iso Image is in /dev/sda6 in the directory /lm and files are copied to the directory /lm/vd in /dev/sda5.
- Code: Select all
$ mkdir p5
$ mkdir p6
$ sudo mount /dev/sda5 p5
$ sudo mount /dev/sda6 p6
$ mkdir im
$ sudo mount -t iso9660 -o loop p6/lm/linuxmint-11-gnome-dvd-32bit.iso im
$ cp -p im/casper/vmlinuz p5/lm/vd
$ cp -p im/casper/initrd.lz p5/lm/vd
- Grub Control Statements in 'menu.lst',
Edit file '/boot/grub/menu.lst'- Assume directory /lm/vd in Partition /dev/sda1 contains files 'vmlinuz' and 'initrd.lz'. Directory /lm in Partition /dev/sda6 contains the DVD iso Image.
- Code: Select all
title Linux Mint Live DVD Iso Image Katya
root (hd0,0)
kernel /lm/vd/vmlinuz live-media=/dev/sda6 iso-scan/filename=/lm/linuxmint-11-gnome-dvd-32bit.iso file=/cdrom/preseed/mint.seed boot=casper noprompt
initrd /lm/vd/initrd.lz
- Assume directory /lm/vd in Partition /dev/sda1 contains files 'vmlinuz' and 'initrd.lz'. Directory /lm in Partition /dev/sda1 contains the DVD iso Image.
- Code: Select all
title Linux Mint Live DVD Iso Image Katya
root (hd0,0)
kernel /lm/vd/vmlinuz [live-media=/dev/sda1] iso-scan/filename=/lm/linuxmint-11-gnome-dvd-32bit.iso file=/cdrom/preseed/mint.seed boot=casper noprompt
initrd /lm/vd/initrd.lz
(Using Disk File to Store Persistent Data)
Persistent Data File has to be in 'vfat' (fat32) Partition.
In this instance 'vfat' Partition is /dev/sda8. - Assume directory /lm/vd in Partition /dev/sda1 contains files 'vmlinuz' and 'initrd.lz'. Directory /lm in Partition /dev/sda6 contains the DVD iso Image.
- Create an Empty Image, reserving Space of 1 GB in this instance.
- Code: Select all
# mount /dev/sda8 p8
# dd if=/dev/null of=p8/casper-rw bs=1M seek=1024
0+0 records in
0+0 records out
0 bytes (0 B) copied, 5.7415e-05 s, 0.0 kB/s
- Make it an ext3 Mountable File System
- Code: Select all
# mkfs.ext3 -F p8/casper-rw
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376
Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
- Grub Control Statements in 'menu.lst',
Edit file '/boot/grub/menu.lst'- Assume directory /lm/vd in Partition /dev/sda1 contains files 'vmlinuz' and 'initrd.lz'. Directory /lm in Partition /dev/sda6 contains the DVD iso Image. Directory /lm/vd in 'vfat' Partition contains the persistent data file 'casper-rw'.
- Code: Select all
title Linux Mint Live DVD Iso Image Katya Persistent
root (hd0,0)
kernel /lm/vd/vmlinuz live-media=/dev/sda6 iso-scan/filename=/lm/linuxmint-11-gnome-dvd-32bit.iso file=/cdrom/preseed/mint.seed boot=casper noprompt persistent persistent-path=/lm/vd
initrd /lm/vd/initrd.lz
- Assume directory /lm/vd in Partition /dev/sda1 contains files 'vmlinuz' and 'initrd.lz'. Directory /lm in Partition /dev/sda1 contains the DVD iso Image. Root directory of 'vfat' Partition contains the persistent data file 'casper-rw'.
- Code: Select all
title Linux Mint Live DVD Iso Image Katya Persistent
root (hd0,0)
kernel /lm/vd/vmlinuz live-media=/dev/sda6 iso-scan/filename=/lm/linuxmint-11-gnome-dvd-32bit.iso file=/cdrom/preseed/mint.seed boot=casper noprompt persistent [persistent-path=/]
initrd /lm/vd/initrd.lz
- Assume directory /lm/vd in Partition /dev/sda1 contains files 'vmlinuz' and 'initrd.lz'. Directory /lm in Partition /dev/sda6 contains the DVD iso Image. Directory /lm/vd in 'vfat' Partition contains the persistent data file 'casper-rw'.
- Partition File Systems
- Storing Persistent Data in a Partition.
Label the partition file system 'casper-rw'. This will result in dedicating said partition to persistent data, with the whole partition file system being used to store persistent data. i.e. persistent data will be distributed(scattered) over the whole file system. - Storing Persistent Data in a File.
Ensure partition file system is not labelled 'casper-rw', but that the persistent data file is named 'casper-rw'. If the partition file system is labelled 'casper-rw', the search stops there, and the file 'casper-rw' remains unused. Also the file 'casper-rw' will not be found if it is on a partition of type 'ext2fs', 'ext3fs', 'reiserfs'. Partition file system of type 'vfat'(fat32) does the trick.
- Storing Persistent Data in a Partition.
- Conclusion
- Loading Limitations
- Grub refuses to load the files 'vmlinuz' and 'initrd.lz' from partitions of type ext2 but reiserfs works OK. Other file systems not tried.
- DVD iso image has loaded OK from partitions of type 'ext2fs, ext3fs, reiserfs'.
- Grub refuses to load the files 'vmlinuz' and 'initrd.lz' from partitions of type ext2 but reiserfs works OK. Other file systems not tried.
- Persistent File System Usage.
The code shows a persistent data file with 1 GB of reserved space. Starting with an initial 20%, usage has relatively quickly shot up to 40% despite frugal demand. Persistent file on system of 1 GB memory with 512 MiB swap space.- Code: Select all
mint@mint ~ $ sudo swapon -s
Filename Type Size Used Priority
/dev/sda7 partition 530108 1552 -1
mint@mint ~ $ df -h .
Filesystem Size Used Avail Use% Mounted on
aufs 1008M 391M 567M 41% /
- Enlargement of Persistent File System without Deleting Customizations.
- Create empty temporary file.
- Code: Select all
dd if=/dev/null of=/tmp/tempfile bs=1M seek=256
- Tack file on to end of casper-rw persistent file
- Code: Select all
cat /tmp/tempfile >> /path_to/casper-rw
- Enlarge file system to encompass added disk space:
- Code: Select all
e2fsck -f /path_to/casper-rw
resize2fs /path_to/casper-rw
- Create empty temporary file.
- Loading Limitations

