Skip to content

Instantly share code, notes, and snippets.

@topshed
Last active January 2, 2019 16:56
Show Gist options
  • Save topshed/81d3a45d6da5dc68d30676f48b480e23 to your computer and use it in GitHub Desktop.
Save topshed/81d3a45d6da5dc68d30676f48b480e23 to your computer and use it in GitHub Desktop.
Creating USB resources drive
  1. Get a usb drive. At least 8GB
  2. Format the drive as a FAT32 single partition with a MBR

Imgur

  1. Insert USB drive into Desktop Raspbian laptop. Copy the iso for Desktop Raspbian onto this machine.

  2. Install gparted onto the laptop:

sudo apt install gparted
  1. Run sudo gparted and delete the existing partition.
  2. Then create two partitions. The second should be at least 2.5GB, the firts can be whatever space remains. Note: the second partition will be the bootable one - Windows machines won't read the storage partition if it's second.

Imgur

  1. Now for unetbootin. First install some stuff you'll need:
sudo apt install libqt4-dev
sudo apt install p7zip-full extlinux syslinux
  1. Mount the second partition on the USB drive:
mkdir p2
sudo mount /dev/sdc2 p2
  1. Then install netbootin:
mkdir unetbootin
cd unetbootin/
wget https://github.com/unetbootin/unetbootin/releases/download/661/unetbootin-source-661.tar.gz
tar zxvf unetbootin-source-661.tar.gz 
sed -i '/^RESOURCES/d' unetbootin.pro
lupdate-qt4 unetbootin.pro
lrelease-qt4 unetbootin.pro
qmake-qt4 
make
  1. Now run it: sudo ./unetbootin

Imgur

  1. Select the Desktop iso image and the second partition on the USB drive as shown.
  2. Once the unetbootin process has finished, edit the syslinux.cfg file. Delete most of the default entries except the "install" options. Add two new "persistence" options as shown.
default menu.c32
prompt 0
menu title Desktop Raspbian
timeout 100


label ubnentry2
menu label Run and ^reset persistence
kernel .linux /live/vmlinuz2
append initrd=/live/initrd2.img boot=live components quiet splash plymouth.ignore-serial-consoles persistence persistence-reset

label ubnentry3
menu label Run with ^persistence
kernel .linux /live/vmlinuz2
append initrd=/live/initrd2.img boot=live components quiet splash plymouth.ignore-serial-consoles persistence

label ubnentry4
menu label Run with^out persistence
kernel .linux /live/vmlinuz2
append initrd=/live/initrd2.img boot=live components quiet splash plymouth.ignore-serial-consoles

label ubnentry5
menu label ^Graphical install
kernel /install.amd/vmlinuz
append initrd=/install.amd/gtk/initrd.gz file=/cdrom/live/preseed.cfg locale=en_GB vga=788  --- quiet

label ubnentry6
menu label ^Install
kernel /install.amd/vmlinuz
append initrd=/install.amd/initrd.gz file=/cdrom/live/preseed.cfg locale=en_GB vga=788  --- quiet

label ubnentry7
menu label Install with ^speech synthesis
kernel /install.amd/vmlinuz
append initrd=/install.amd/gtk/initrd.gz file=/cdrom/live/preseed.cfg locale=en_GB vga=788  speakup.synth=soft --- quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment