Thursday, 17 January 2019

Add NetRunner ISO with persistence to E2B

You can add persistence to a NetRunner Live ISO using a .mnu file.

Here is one for 19.01. Just follow the instructions in the .mnu file. I used a 500MB persistence file.

The kernel parameters were discovered by looking at the live.cfg file from inside the ISO.

The name of the persistence file does not have to be netrun-rw. You can have multiple .mnu files and multiple persistence files if you wish.

If you want to move the persistence file to the same folder as the .ISO file, then specify $HOME$/netrun-rw for the PF variable value.


Download here
# Place this .mnu file and the Netrunner Live ISO in (_ISO\xxx\MNU), e.g. \_ISO\MAINMENU\MNU or \_ISO\LINUX\MNU
# IMPORTANT: you MUST run WinContig (\MAKE_THIS_DRIVE_CONTIGUOUS.cmd) before booting E2B.

# For persistence: (File Name=netrun-rw  Volume Name=persistence)
# 1. click 'Create ext2 FS' in RMPrepUSB or use \_ISO\docs\Make_Ext\Make_Ext.exe
# 2. Set the FILENAME     to:  netrun-rw
# 3. Set the VOLUME LABEL to:  persistence      <------ VERY IMPORTANT
# 4. Set amount of space you would like allowed to persist  (4GB+) - use ext3 filesystem

# The persistence 'volume' needs a persistence.conf file added
# Boot to linux and then type following 5 lines in the terminal console (System - Konsole)
#    sudo mkdir /mnt/usb
#    ls /dev/                (to see which is the USB device 3rd ptn - it will always be sd(something)3 - try also sudo fdisk -l)
#    sudo mount /dev/sdb3 /mnt/usb
#    sudo bash -c "echo '/ union' > /mnt/usb/persistence.conf"
#    sudo umount /mnt/usb

# now reboot to linux using .mnu file

# Note: for later versions, you may need to change the lines at the end for correct vmlinuz and initrd boot files

iftitle [if exist $HOME$/netrunner-desktop-1901-64bit.iso] NetRunner BLACKBIRD PERSISTENT\nBoot using .mnu file with persistence

set ISO=$HOME$/netrunner-desktop-1901-64bit.iso
set PF=/netrun-rw

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

#find boot files inside ISO
set vml=/live/vmlinuz
set init=/live/initrd.img
set normal=hostname=live-pc username=live live-config.user-default-groups=sambashare,cdrom,floppy,audio,dip,video,plugdev,netdev,lpadmin,scanner,bluetooth,adm apparmor=0
set safe=components memtest noapic noapm nodma nomce nolapic nomodeset nosmp vga=normal

set ask=
set /p:3 ask=Safe boot (Y/[N]) : 
if /i "%ask%"=="Y" set normal=%safe%

#change noquiet to quiet and nosplash to splash if required

kernel %vml% boot=live %normal% persistence noquiet nosplash
initrd %init%

No comments:

Post a Comment