# Follow instructions at http://rmprepusb.blogspot.co.uk/2015/02/add-liberte-linux-with-persistence-to.html
# Below is the additional menu.lst lines for the CSM menu.lst file

title \n
root ()

title Liberte\n Boot Liberte with persistence or other options.\n \\otfe folder must be present.
set PARAMS=video=800x600-32 quiet memtest=1 loglevel=4
#Optional params: readonly, [no]toram, gentoo={i2p,nosettings,noanon}. See http://dee.su/liberte-documentation
set KERNEL=/liberte/boot/kernel-x86.zi
echo
echo -e $[0x0c]Options:\nN = Boot as Normal\nR = ReadOnly\nS = No Settings\nV = VESA Graphics\nC = Console\nM = MemTest\n\n
if not exist /otfe/liberte.vol echo -e $[0x0e]WARNING: Persistence file /otfe/liberte.vol does not yet exist\nMake sure you have created the \otfe folder to enable persistence.\n
set ask=
set /p ask=Press ENTER to continue normally or choose N,R,S,V,C or M : 
echo
if /i "%ask%"=="V" set PARAMS=nomodeset gentoo=xvesa quiet memtest=1 loglevel=4
if /i "%ask%"=="C" set PARAMS=nomodeset gentoo=nox,root memtest=2 earlyprintk=vga loglevel=6
if /i "%ask%"=="M" set KERNEL=/liberte/boot/memtest86plus/memtest && set PARAMS=
if /i "%ask%"=="R" set PARAMS=video=800x600-32 quiet memtest=1 loglevel=4 readonly
if /i "%ask%"=="S" set PARAMS=video=800x600-32 quiet memtest=1 loglevel=4 gentoo=nosettings
#Show params for a while before booting...
echo
set /p:3 ask=kernel %KERNEL% %PARAMS%
kernel %KERNEL% %PARAMS%
boot
