Jump to content











Photo
- - - - -

Boot pclinuxos from iso with persistence

pclinuxos grub4dos iso

  • Please log in to reply
1 reply to this topic

#1 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 15 February 2013 - 10:31 PM

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! :clap: 

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 :dubbio: I am not sure if this is a problem with the way I format ext2 files or with pclinux...

 

 


  • moklo likes this

#2 moklo

moklo

    Member

  • Members
  • 80 posts
  • Location:tel aviv
  • Interests:everything that is useful and worth
  •  
    Israel

Posted 16 February 2013 - 02:04 AM

very nice... thanks man.  :1st:







Also tagged with one or more of these keywords: pclinuxos, grub4dos, iso

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users