How to: Boot & Install from a USB Pendrive (For ISO > 650M)

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

How to: Boot & Install from a USB Pendrive (For ISO > 650M)

Post by grimdestripador »

Quick Linux Only Install For Linux Mint KDE on 1 GB USB Pendrive
On my 1 Gb PNY USB pendrive, after this procedure 7 megs are left free. It boots with the correct mint menu selection just like the DVD. This is not Persistent!!! Usually very useful for system maintenance, and has quick installs.
There Already are tutorials - This tutorial was made from the best ideas of each.
http://ubuntuforums.org/showthread.php?t=476302
http://www.pendrivelinux.com/2007/01/25 ... ubuntu-610
http://www.linuxmint.com/forum/viewtopi ... f6d8ac6d9c
https://help.ubuntu.com/community/Insta ... omUSBStick
http://ubuntuforums.org/showthread.php?t=476302
# Download into ~/usbboot

Code: Select all

mkdir ~/usbboot
cd ~/usbboot
wget -c http://www.terakin.de/LinuxMint-3.0-KDE-BETA-013.iso
wget -c http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.51.tar.gz
sudo apt-get -y install mtools syslinux
# Extract Archive

Code: Select all

cd ~/usbboot
tar -xf syslinux-3.51.tar.gz
# Make Directory

Code: Select all

mkdir ~/usbboot/mount
# Verify that ~/usbboot directory contents

Code: Select all

cd ~/usbboot
ls
To Look Like:
LinuxMint-3.0-KDE-BETA-013.iso
mount
syslinux-3.51
syslinux-3.51.tar.gz
# Mount ISO

Code: Select all

export ISOPATH=~/usbboot/LinuxMint-3.0-KDE-BETA-013.iso
sudo mount -t iso9660 $ISOPATH ~/usbboot/mount -o loop
# Prepare USB Drive before pluggin in Use fdisk's listing feature to find your USB drive then assign it to an environment variable.

Code: Select all

sudo fdisk -l >> ~/usbboot/fdev.txt 
# Plug in USB Pendrive and find device name

Code: Select all

sudo fdisk -l >> ~/usbboot/fdev2.txt
diff ~/usbboot/fdev.txt ~/usbboot/fdev2.txt

Look for something like /dev/sdc1 and use this to fill out the next command. USBPART is the shown device with partition number, like "/dev/sdc1". With USBDEV omit the trailing number. So it appears like "/dev/sdc".

Code: Select all

export USBDEV=/dev/sdc
export USBPART=/dev/sdc1
# Disable Auto mounting feature (temporary)

Code: Select all

sudo pumount $USBPART
Initialize Partitions with Fat16 File system and activate the bootable
this can be accomplished with many different utils such as qtparted, gparted... but you can always fall back on the terminal...

Code: Select all

sudo fdisk $USBDEV
[Press keys in following order:]
p - Print Partition Table !!!Make sure this is the right DRIVE!!!
d - Delete partitions. If there two more more partitions, delete them all
n - New Partition
p - Primary Partition
1 - Partition Number 1
<Enter> - default start
<Enter> - default end
t - Change Partition System ID to Fat 16
6 - Hex for Fat 16
a - Make Partition Active
1 - Choose your first partition
p - Print Partition, see what changed
w - write to partition and quit

# Format fat16 and install boot loader

Code: Select all

sudo mkfs.vfat -F 16 -n usb $USBPART
cd ~/usbboot/syslinux-3.51/unix
sudo ./syslinux -sf $USBPART 
# Mount the USB Disk

Code: Select all

sudo umount $USBPART
sudo mkdir /media/usb
sudo mount -t vfat -rw $USBPART /media/usb
# Copy All files from the mounted iso to USB drive (Including hidden)

Code: Select all

sudo cp -rv ~/usbboot/mount/.[a-zA-Z0-9]* /media/usb
sudo cp -rv ~/usbboot/mount/[a-zA-Z0-9]* /media/usb
# Move the contents of the isolinux folder down a directory

Code: Select all

sudo mv /media/usb/isolinux/* /media/usb/
sudo rm -r /media/usb/isolinux
# Rename "isolinux.cfg" to "syslinux.cfg"

Code: Select all

sudo cp isolinux.bin syslinux.bin
sudo cp isolinux.cfg syslinux.cfg
sudo cp isolinux.txt syslinux.txt
Last edited by grimdestripador on Wed Aug 01, 2007 5:17 pm, edited 1 time in total.
User avatar
grimdestripador
Level 6
Level 6
Posts: 1051
Joined: Fri Feb 16, 2007 2:26 am

Boot Loaders

Post by grimdestripador »

Anyone have any ideas on howto use a bootloader such like lilo or grub and incorparate it into a guide like this. It would be nice to have a boot loader on a USB disk... just incase. Also, does anyone know of a Linux only solution to be ableto have a bootloader just look for an .ISO and boot from it. I've looked everywhere
Post Reply

Return to “Tutorials”