Sunday, 30 August 2015

Add a Debian Live ISO with persistence to Easy2Boot

You can download the latest Debian Live ISOs from here.

I used debian-live-8.1.0-amd64-mate-desktop.iso and added persistence by using a .mnu file.

The new .mnu file will be added to the E2B v1.72 Sample mnu files folder , but can be downloaded from the Alternate Download (Google Drive and One Drive) areas (look under 'mnu files').
OneDrive download area
Google Drive download area

The .mnu file should work for most Debian Live ISOs if you change the name of the ISO inside the .mnu file (occurs twice).


You will need to create a 'persistence' ext2 volume and then boot to Debian and create a persistence.conf file. The instructions inside the .mnu file are shown below:

# Place this .mnu file and the Debian Live ISO in (_ISO\xxx\MNU), e.g. \_ISOMAINMENU\MNU or \_ISO\LINUX\MNU
# IMPORTANT: you MUST run WinContig (Ctrl+F2) before booting E2B.

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

#The persistence 'volume' needs a persistence.conf file added
# Boot to linux and then type following 5 lines in the terminal console (Applications - System Tools - Mate terminal)
#    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
#    echo "/ union" > /mnt/usb/persistence.conf
#    umount /mnt/usb

# now reboot linux

Open a Terminal session to type the commands

Under a VM, the USB drive is sda3 (200MB)
On a real system it will be sdb3 or sdc3 or sdd3, etc.

You should now be able to create a new user and change the Desktop, etc.

Instructions for adding  a new user can be found at the end of this post.

They are copied below for your edification...

8. From within the mint user in the LMDE USB installation, add your user, add your user to the sudo group, and change the root password.
- Reboot into your USB LMDE. It will boot into the live instance, with user "mint". Your DE will depend on which iso you dowloaded and installed, Mate or Cinnamon.

For Cinnamon:
- Click Menu --> Administration --> User Accounts
- Click + to add a new user.
- Click on "Account disabled" to open a window to add a strong password. Give your user a strong password.
- Close User Accounts
- Open a terminal. Type
CODE: SELECT ALL
sudo adduser [youruser] sudo
. This adds your new user to the sudo group.
- Click Administration --> Login Window.
- Select the Security tab. Uncheck "Enable Automatic Login" and uncheck "Enable Timed Login" (if checked). Click Close.

For Mate:
- Click Menu --> Control Center --> Users and Groups
- Click + Add. Add your desired name and username. When prompted, give your user a strong password.
- Click Manage Groups. Click on "sudo" and then click Properties. Check the block next to your new user to add to the sudo group. Click OK. Click Close to exit Users and Groups.
- (Still in Control Center), click on Login Window.
- Select the Security tab. Uncheck "Enable Automatic Login" and uncheck "Enable Timed Login" (if checked). Click Close.

For Both:
- Open a terminal. (This must be done as user "mint" since that user is configured to automatically escalate privileges as root. Your new user won't be able to do this.)
Type:
CODE: SELECT ALL
sudo su
passwd

- Give root a strong password that you will remember. You'll have to type it twice. (Hint: I gave root the same password as my new user - makes it easy for me to remember.) Type 
CODE: SELECT ALL
exit
exit
to close the terminal.
8. Voila! Click Menu --> Logout --> Switch User and log in as your new user. Your changes will be saved, you will be able to use your password when required, and you will also be able to input root's password when needed.

A couple of last notes. Mint Update doesn't work automatically in Live mode, even though it's enabled in Startup Applications, so you'll have to run that manually (I check at least weekly). Also, when you shut down, you will be cycled through MDM. Just click on the gear and select shutdown (or restart, or whatever you want) again. This is an artifact of the live version with an added user. For me, Mint 201303 live USB shutdown hangs, requiring a hard power-off.


Installing Debian

If installing Debian, when it cannot find the 'cdrom', choose:

No - for cd driver question
Yes - for specify other devices
None
Replace /dev/cdrom  with  -t 9660 /dev/sdX4  if booting from an ISO (where X is the USB device letter) - or -t vfat /dev/sdX1 if booting from a .imgPTN file.