I have found another use for cdob's partnew trick.
pclinuxos has persistence but only if it sees an ext2/3 partition on a drive - an ext2 file will not work. However, I can create an ext2 file on a FAT32 or NTFS grub4dos USB drive using RMPrepUSB and then using partnew, I can map an empty partition to the persistent ext2 file. Now all writes to the filesystem go to the persistent file instead!
You can specify the name/location of the pclinuxos persistent ext2/3 partition by device name (e.g. /dev/sdb1), by UUID or by volume name.
As grub4dos cannot mount the new partition that I map to the ext2 file and so will not give us a UUID, we can only use either a device name or the volume name.
Luckily, RMPrepUSB creates ext2 files which have the same volume name as the filename. I used /changes as the file/volume name.
Here is an example menu:
# FAT32 USB DRIVES ONLY - DOES NOT WORK ON NTFS USB DRIVES (sqfs file not found)! #must enable parttype output debug on # make empty table entry in 4th position in ptn table parttype (hd0,3) | set check= set check=%check:~-5,4% > nul if "%check%"=="0x00" partnew (hd0,3) 0 0 0 > nul if not "%check%"=="0x00" echo WARNING: PTN TABLE 4 IS ALREADY IN USE! && pause && configfile /menu.lst iftitle [if exist (bd)/_ISO/linux/pclinuxos-kde-fullmonty-2012.09.iso] Boot pclinuxos-kde-fullmonty-2012.09.iso WITH PERSISTENCE map (bd)/_ISO/linux/pclinuxos-kde-fullmonty-2012.09.iso (0xff) map --hook root (0xff) > nul # set partition 4 of USB to be changes files which is formatted as ext2 filesystem if exist (bd)/changes partnew (hd0,3) 0x00 (bd)/changes && echo Partition 4 now points to /changes file! if not exist (bd)/changes echo WARNING: /changes file does not exist - SO NO PERSISTENCE! && pause # change splash=silent to splash=verbose to see all messages #To run from RAM use the copy2ram cheatcode kernel /isolinux/vmlinuz fromusb bootfromiso=/_ISO/linux/pclinuxos-kde-fullmonty-2012.09.iso livecd=livecd root=/dev/rd/3 acpi=on vga=788 keyb=en vmalloc=256M nokmsboot splash=verbose changes_dev=LABEL=changes > nul initrd /isolinux/initrd.gz > nul
pclinuxos does not support NTFS on boot. However, if I map the ISO file to one spare partition entry and map the changes persistent file to another spare partition entry, I can even boot pclinuxos from ISO with persistence from an NTFS USB boot drive! Please see the Tutorial 104 for more details on the menu needed to do this.
N.B. For some reason, when using RMPrepUSB to make an ext2 \changes file of 500MB, the file was not liked by pclinuxos. If I changed the size to 300, 400, 480, 800, 900 or 1000MB it did work! Only 500MB (and possibly sizes near that size?) did not work! Weird I am not sure if this is a problem with the way I format ext2 files or with pclinux...