Sunday, 29 June 2014

Add AntiX + Persistence to your E2B USB drive


The following allows you to boot from an ISO with root persistence (or home persistence) for AntiX 13 and 14 (not tested on 15). For Antix 15 with Root+Home persistence see blog post here.

If you download an Antix LiveCD ISO file, you can add persistence as follows:

1. Copy the ISO file e.g. antiX-13.2_x64-full.iso, to a sub-folder under one of the E2B menu folders - e.g. \_ISO\LINUX\MNU.

2. Use RMPrepUSB's Create ext2 FS button to create a file on your E2B USB drive - name=antix, volume name=antix, size=128 (or 256 or 500 or whatever you like)

3. Copy the AntiX_13.2_Persistent.mnu file (available in the E2B site Download area or in E2B v1.51 and later in the usual place under \_ISO\docs\Sample mnu files) to the same folder as the ISO file. You should now have these files on the E2B drive:

  • \antix
  • \_ISO\LINUX\MNU\antiX-13.2_x64-full.iso
  • \_ISO\LINUX\MNU\antiX_13.2_Persistent.mnu

4. Edit the .mnu file so that the name of the ISO (highlighted in yellow below) matches your ISO filename (it doesn't matter what the name of the .mnu file is).

You can choose Root persistence, Static Root persistence or home persistence by using one of the three lines at the bottom of the menu (in red). Root persistence will be used if you don't uncomment one of the other two lines.

iftitle [if exist $HOME$/antiX-13.2_386-full.iso] AntiX 13.2 Root Persistence\n Using /antix persistence file
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
set ISO=antiX-13.2_386-full.iso
set PERS=/antix
set VOL=antix
partnew (%E2BDEV%,3) 0x0 $HOME$/%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 $HOME$/%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


Now we need to boot to AntiX twice using this menu to get persistence working - use a real system (I couldn't get it to boot under VBox even if using the from=hd cheat code, VBox crashed).

First Boot
1.1 AntiX will complain about 'Looking for antiX/homefs.new' - press c to continue twice and boot to Antix Desktop.

1.2 Use Control Centre - Live - Setup up live persistence


1.3 When prompted enter pwd=root - (you will now get a sdb4 is read-only error) - choose ext2 (label=antix)  and click OK (see below).


1.4 The next default option will be: action:Create root persistence - OK this and then set the Size - Choose Size (use maximum) - OK - OK - Yes to Proceed.

1.5 At antiX 'Create or Resize Persistence' form - press Cancel (otherwise it will go through the Resize dialogue again and again!)

Second Reboot 

2.1 Shutdown AntiX and reboot

2.2 Persistence should now be active and it should boot without complaining.

2.3 You should be prompted for new root and demo passwords and then you should see a message that root persistence was enabled - OK this and finally choose your Auto-Save Config preference.

By changing the name of the persistence file, you can have multiple versions of AntiX (e.g. 32-bit and 64-bit) with a different persistence storage for each one. If you wish, you can put the persistence files in another folder and change the set PERS= variable to match the new path.

The cheat code antiX=MLX turns off a lot of services, if you want full functionality you can omit one or all of the letters:
 L = lean        Turn off some services
 M = mean        Turn off some networking services
 X = Xtralean    Turn off even more services

More 'Cheat Codes' are listed here.

No comments:

Post a Comment