# Place ISO in \_ISO\MAINMENU\MNU or \_ISO\LINUX\MNU (and this .mnu file too)
# CRASHES IF RUN UNDER NORMAL VM!!!
# IMPORTANT: you MUST run WinContig (Ctrl+F2) before booting E2B.

# For persistence: (File Name=antix Volume Name=antix) - NOTE: case sensitive!
# 1. click 'Create ext2 fs' in RMPrepUSB
# 2. Set the FILENAME to antix
# 3. Set the VOLUME LABEL to antix  <------ VERY IMPORTANT
# 4. Set amount of space you would like allowed to persist

# Boot to AntiX - it will complain 'Looking for antiX/homefs.new etc. - press c to continue twice and boot to Antix Desktop
# Use Control Centre - Live - Setup up live persistence - pwd=root - (you will get a sdb4 is read-only error) - choose ext2 (label=antix) - OK - action:Create root persis (def) - OK - Choose Size - OK - OK - Yes to Proceed
# At antiX Create or Resize Persistence form - Cancel
# reboot - persistence should now be active - should be prompted for root and demo passwords - message that root persistence was enabled - OK - Set Auto-Save Config preference.

iftitle [if exist $HOME$/antiX-13.2_386-full.iso] AntiX 13.2 386 Root Persistence\n Using /antix persistence file
set ISO=$HOME$/antiX-13.2_386-full.iso
set PERS=/antix

#Volume name of ext2 file
set VOL=antix

if "%E2BDEV%"=="" set E2BDEV=hd0 && pause E2BDEV forced to hd0!
if exist CD echo WARNING: Cannot use partnew command on CD! && pause && configfile (bd)/menu.lst
partnew (%E2BDEV%,3) 0x0 %ISO%
#enable parttype output
debug 1
parttype (%E2BDEV%,2) | set check=
debug off
set check=%check:~-5,4%
# make empty table entry in 3rd position in ptn table
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0 0 0
if not "%check%"=="0x00" echo WARNING: PTN TABLE 3 IS ALREADY IN USE! && pause
debug 1
if not exist %PERS% echo WARNING: %PERS% persistence file not found! && pause
errorcheck off
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0x0 %PERS%
errorcheck on
map %ISO% (0xff)
map --hook
root (0xff)

#For hdd booting use from=hd
#Use one of the three lines below depending on what persistence you want
#Root Persistence use
kernel /antiX/vmlinuz quiet persist=root!,home from=usb plab=%VOL%  antiX=MLX 

#For Static Root Persistence (slow) use
#kernel /antiX/vmlinuz quiet persist=root!,home,static from=usb plab=%VOL%  antiX=MLX 

#For Home Persistence use
#kernel /antiX/vmlinuz quiet persist=home! from=usb plab=%VOL%  antiX=MLX 

initrd /antiX/initrd.gz
