Tuesday, 24 September 2019

Boot KDE Neon with persistence from an ISO

Here is the .mnu file for booting KDE Neon with persistence.


It is essentially the same as the Ubuntu persistence .mnu file except that it loads the kernel file /casper/vmlinuz instead of vminux.efi (which does not exist in KDE Neon).


# Make a ext2 or ext3 file using RMPrepUSB (or \_ISO\docs\Make_Ext) in the root of the drive (i.e. File Name=kde_neon-rw  Volume Name=casper-rw)
# Tip: ext2 is more prone to corruption - I recommend ext3 
# Place this .mnu file and the ISO in (_ISO\xxx\MNU), e.g. \_ISO\MainMenu\MNU or \_ISO\Linux\MNU
# This menu will work even on an NTFS USB boot drive
# IMPORTANT: you MUST run WinContig (\MAKE_THIS_DRIVE_CONTIGUOUS.cmd) before booting E2B.

iftitle [if exist $HOME$/KDE_NEON.iso] KDE_NEON PERSISTENT\nBoot using .mnu file with persistence

set ISO=$HOME$/KDE_NEON.iso
set PER=/kde_neon-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 %PER% echo WARNING: %PER% persistence file not found! && pause
errorcheck off
if "%check%"=="0x00" partnew (%E2BDEV%,2) 0x0 %PER%
errorcheck on
#map ptn 4 to ISO
partnew (%E2BDEV%,3) 0x0 %ISO%
map %ISO% (0xff)
map --hook
root (0xff)
if not exist /casper/vmlinuz pause ERROR: /casper/vmlinuz does not exist in the ISO!
echo loading vmlinuz...
kernel /casper/vmlinuz  boot=casper persistent noeject noprompt apparmor=0 quiet splash ---
if not exist /casper/initrd.lz pause ERROR: /casper/initrd.lz does not exist in the ISO!
echo loading initrd.lz...
initrd /casper/initrd.lz 

You can download the file from the Alternate Downloads Area - Sample mnu Files - Linux folder too.

4 comments:

  1. Replies
    1. Read the commented lines in the example .mnu file!
      # Make a ext2 or ext3 file using RMPrepUSB (or \_ISO\docs\Make_Ext) in the root of the drive (i.e. File Name=kde_neon-rw Volume Name=casper-rw)
      # Tip: ext2 is more prone to corruption - I recommend ext3
      # Place this .mnu file and the ISO in (_ISO\xxx\MNU), e.g. \_ISO\MainMenu\MNU or \_ISO\Linux\MNU

      Delete