As well as recognising $HOME$ in .txt and .mnu files, E2B now will replace $NAME$ with the filename of the .txt or .mnu file.
This means that a .mnu file can contain $NAME$ and all you have to do is make sure the .mnu file has exactly the same filename as the ISO that it uses.
e.g. before we had this type of .mnu which we had to edit, in order to use a different ISO file.
Puppy_Precise_USB_HDD_Persistence.mnu
================================
iftitle [if exist $HOME$/precise-5.4.3.iso] Puppy Precise 5.4.3\n Puppy with persistence (save on reboot/shutdown)
set ISO=$HOME$/precise-5.4.3.iso
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
partnew (%E2BDEV%,3) 0x00 %ISO%
map %ISO% (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbhd psavemark=1 fix=fsck
initrd /initrd.gz
It can now be re-written as:
precise-5.4.3.mnu
=============
iftitle [if exist $HOME$/$NAME$.iso] Puppy Precise ($NAME$)\n Puppy with persistence (save on reboot/shutdown)
set ISO=$HOME$/$NAME$.iso
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
partnew (%E2BDEV%,3) 0x00 %ISO%
map %ISO% (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbhd psavemark=1 fix=fsck
initrd /initrd.gz
As long as the filename of the .mnu is identical to the filename of the .ISO file, you do not have to edit the contents of the .mnu file to use it on different ISOs - just copy it and change it's filename.
This means that a .mnu file can contain $NAME$ and all you have to do is make sure the .mnu file has exactly the same filename as the ISO that it uses.
e.g. before we had this type of .mnu which we had to edit, in order to use a different ISO file.
Puppy_Precise_USB_HDD_Persistence.mnu
================================
iftitle [if exist $HOME$/precise-5.4.3.iso] Puppy Precise 5.4.3\n Puppy with persistence (save on reboot/shutdown)
set ISO=$HOME$/precise-5.4.3.iso
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
partnew (%E2BDEV%,3) 0x00 %ISO%
map %ISO% (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbhd psavemark=1 fix=fsck
initrd /initrd.gz
It can now be re-written as:
precise-5.4.3.mnu
=============
iftitle [if exist $HOME$/$NAME$.iso] Puppy Precise ($NAME$)\n Puppy with persistence (save on reboot/shutdown)
set ISO=$HOME$/$NAME$.iso
if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
partnew (%E2BDEV%,3) 0x00 %ISO%
map %ISO% (0xff)
map --hook
root (0xff)
kernel /vmlinuz pmedia=usbhd psavemark=1 fix=fsck
initrd /initrd.gz
As long as the filename of the .mnu is identical to the filename of the .ISO file, you do not have to edit the contents of the .mnu file to use it on different ISOs - just copy it and change it's filename.
No comments:
Post a Comment