HowTo Put Multiple Live Images On One USB Memory Stick

From NST Wiki
Revision as of 08:12, 13 September 2012 by Paul Blankenbaker (talk | contribs) (Prepare Your USB Memory Stick)
Jump to navigationJump to search

Overview

The livecd-iso-to-disk program is used by Fedora based distributions (like NST) to transfer the contents of a Live ISO image to a USB memory stick. The livecd-iso-to-disk program works well and offers some extra features (such as persistent storage). However, it is primarily used when you want to put a single Fedora based distribution onto a USB memory stick.

It is often desirable to create a USB memory stick with multiple Live images to choose from (NST 32 bit, NST 64 bit, Ubuntu, Debian, ...). To accomplish this, you must:

  • Create a primary bootable partition on a USB memory stick.
  • Format the partition as FAT 32 (if you want easy access to the files from non Linux based systems).
  • Install the GRUB 2 boot loader onto the USB memory stick.
  • Transfer ISO images (Debian based distros) or contents from the ISO for other distributions (Fedora based distros).

WARNING: Know What You Are Doing

The partitioning and formatting steps of this process assume that you know what you are doing. If you are new to Linux, make sure you understand how to identify the device entry associated with your USB memory stick (like: /dev/sdx). If you blindly copy/paste commands from this page you will likely destroy data on your system.

We have chosen to use /dev/sdx and /dev/sdx1 in our examples below as this device probably won't be present on your system to reduce the chance of a data destruction. You will need to substitute the device entry of your USB memory stick for this value.

Prepare Your USB Memory Stick

You can use fdisk, gparted or one of the many other partition tools to partition your memory stick. A single primary partition marked as bootable works well.

Here's an example of what fdisk will show if you have a single primary partition marked as bootable (substitute the device entry of your USB memory stick for the /dev/sdx shown below):

[root@cayenne ~]# fdisk -l /dev/sdx

Disk /dev/sdx: 15.6 GB, 15606349824 bytes
255 heads, 63 sectors/track, 1897 cylinders, total 30481152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000230dd

   Device Boot      Start         End      Blocks   Id  System
/dev/sdx1   *          34    30481118    15240542+   c  W95 FAT32 (LBA)
[root@cayenne ~]#

Copy Files From ISO (NST, Fedora)

Copy ISO Files (Debian, Ubuntu, ...)

Create Grub 2 Configuration

Create Menu Entry Files

Create Script To Join Menu Entry Files

Run Script

Test