Home Wiki > SDB:Live USB stick
Sign up | Login

(Redirected from Live USB stick)

SDB:Live USB stick

tagline: From openSUSE

This page explains how to create a bootable USB stick from a LiveCD, or in other words a LiveUSB.
Version: 11.3+This applies to openSUSE starting from 11.3.
Warning The instructions on this page will destroy all data currently on the USB stick being used. Please be certain it does not contain important information.

Contents

[edit] Create a Live USB (GUI)

[edit] Download LiveCD ISO

Download the installation image of your choice from http://software.opensuse.org/. You'll need to look at the USB DVD section below if you don't want to install from a LiveCD image.

Imagewriter Windows.png

Windows Instructions

Download ImageWriter

Download the SUSE Studio ImageWriter

Write ISO to USB

Write the LiveCD to the USB stick.

NOTE: Windows Imagewriter.exe, unlike Linux version, does not see automatically .iso files, only .raw, but it works with any of those files without problems. That leads to manual selection described below.

  • Open the downloaded ImageWriter
    • If the ImageWriter won't open, you'll probably need to download the .NET 2.0 Runtime
    • If you get an error right after you start the process, you may want to right-click the executable and "Run as administrator".
  • Press the select button
  • Type *.* in the file name box and find your LiveCD image
  • Select your USB stick and click the Write button

NOTE: You may meet this error on some MS Windows versions:

  • If you have done above steps correctly but still get error like this
    system.componentModel.Win32Exception:Access is denied
    try either:
    • An opening Windows Explorer might blocked direct accessing to a physical drive. If you opened the ImageWriter from a Windows Explorer, close the ImageWriter then open it again, after opened, close every window of Windows Explorer, then try to write the ISO again.
    • Use a partiton tool to delete the whole USB stick partition, to make the partition 'RAW'. (Note this will destory all you data on the USB stick and before you format it again, you won't be able to use it as usual.) After that, rerun the ImageWriter and try to write the ISO again.



Yast install imagewriter.png

Linux Instructions

Install ImageWriter

Install the SUSE Studio Image Writer.

  • Open the YaST software management module.
    • In KDE, open the kicker menu, go to the Computer tab, and click Install/Remove Software
    • In GNOME, you should see Install/Remove Software on the right-hand side of Computer menu
  • You will be prompted for the root password, enter it
  • Search for "imagewriter" (excluding the quotes) and check it to be installed
  • Click Accept


Imagewriter.png

Write ISO to USB

Write the LiveCD image to the USB stick

  • Open the ImageWriter
    • In KDE, open the kicker menu, search for "imagewriter", and click SUSE Studio Imagewriter
    • In GNOME, you'll click More Applications, search for imagewriter, and click on SUSE Studio Imagewriter
  • Enter the root password when prompted
  • Click in the middle of the application, and navigate to where you saved your image
  • Select your USB device from the dropdown menu, and click the Write button
  • Reboot


Alternate graphical method is to use Live USB GUI, frontend to live-fat-stick script.


[edit] Create a Live USB (console)

[edit] Download and verify LiveCD ISO

Download the installation image of your choice from:

~> aria2c -x5 http://download.opensuse.org/distribution/12.2/iso/openSUSE-12.2-KDE-LiveCD-x86_64.iso

Verify a download integrity:

~> gpg --recv-keys 9C800ACA
~> wget http://download.opensuse.org/distribution/12.2/iso/openSUSE-12.2-KDE-LiveCD-x86_64.iso.asc
~> gpg -a openSUSE-12.2-KDE-LiveCD-x86_64.iso.asc
USB dd rescue.png

Linux Instructions

Find Block Device

After inserting your USB stick, you can find out what device it is

~> su
# grep -Ff <(hwinfo --disk --short) <(hwinfo --usb --short)

Write ISO to USB

Finally, once you've found your block device, write the image to it. Point 'dd' to the full path such as '/home/user/Downloads/openSUSE-12.2-KDE-LiveCD-x86_64.iso' or change directory (example: cd ./Downloads) to where the image is contained.

# umount /dev/sdX
# dd if=/path/to/downloaded.iso of=/dev/sdX

Put ISO on vfat partitioned USB stick or hard disk

If you'd rather not reformat the USB device and keep the ability of putting files on it and accessible by other operating systems, you have the option of using the live-fat-stick script.

On openSUSE you can install the package via 1-click, if you are running any other distribution, get the script from here and make it executable(as root, with chmod +x /usr/bin/live-fat-stick) after copying it to /usr/bin/, make sure you have syslinux and gpart installed before running it.

Run the following as root (with su -, not using sudo) in terminal:

# live-fat-stick -l

to get the USB device path

# live-fat-stick --suse /path/to/openSUSE-filename.iso /dev/sdXY

to copy iso to USB device and make it bootable

# live-fat-stick -h

it shows help.

Multiple iso images from multiple distributions can be added to the USB device, boot menu will offer a choice of distribution to boot from. Scripts does not format or remove data from the device.



200px

OS X instructions

Find Block Device

Plug-in your USB stick and find what "/dev/diskN" it is mapped to by opening Terminal (where "N" stands for "disk0", "disk1", "disk2" etc). To do so, please execute:

# diskutil list

This will print out the list of currently mapped devices/partitions. Find the USB using "NAME" column. Then note the corresponding /dev/diskN, where "N" is for index of your disk. For example:

/dev/disk2
   #:                       TYPE        NAME                    SIZE   IDENTIFIER
   0:                       FAT32                               2.0 GB   disk0
   1:                                   USB2                    2.0 GB   disk0s1

In this case "/dev/disk2" is the one we want.

Unmount USB Stick

Unmount the USB stick

# diskutil unmountDisk /dev/diskN

Where /dev/diskN is the one you have found in previous step as per our example it would be "/dev/disk2".

Write ISO to USB

Write the content of the ISO file:

# dd if=/path/to/downloaded.iso of=/dev/diskN bs=4k

Again the /dev/diskN is the same one you have found previously. You will be prompted for the administrator's password.



[edit] Bootable USB from DVD or Net-install

[edit] Download DVD ISO

Download one of the DVD or Net Installation images from http://software.opensuse.org/

Linux isohybrid.png

Linux instructions

Warning Do not run isohybrid for 12.2 or higher. Skip this section.

Install syslinux/isohybrid

If you would like to boot the from a USB stick then you can make the ISO bootable by installing syslinux.

# zypper in syslinux
# isohybrid openSUSE-12.1-DVD-x86_64.iso

Once completed just follow whichever set of above LiveUSB instructions you like, and take care to read the Booting from USB-DVD section below afterward.



Extract Syslinux.png

Windows instructions

Warning Do not run isohybrid for 12.2 or higher. Skip this section.

Get isohybrid

Download and extract isohybrid from the syslinux package.

  • Download syslinux.
  • Extract the zip. Right click on it in Windows Explorer and click "Extract All"
  • Find the isohybrid.pl script in the utils directory, and place it in the same directory as your image.


[edit] Install Perl

Install strawberry perl.

Windows isohybrid.png

Create Hybrid ISO

Make the DVD or Net-install image hybrid.

  • Open cmd and navigate to the directory containing isohybrid.pl script and your installation image.
  • Run isohybrid.pl
> C:\strawberry\perl\bin\perl.exe isohybrid.pl openSUSE-12.1-DVD-x86_64.iso
  • This should take less than a second to execute

Once completed just follow whichever set of above LiveUSB instructions you like, and take care to read the Booting from USB-DVD section below afterward.



Boot by-label.png

Booting from USB-DVD

Write the image to the USB stick using the Windows instructions above.

  • Hit F4, change the installation source to Hard Drive, but leave all fields blank and hit Enter to close the dialog.
  • Type "namescheme=by-label" into the boot options for "Installation" and start the installation; you should go straight to the installer without a hitch.



[edit] How to make a USB drive bootable

This situation would happen very rarely, but in the even that your computer doesn't boot from the LiveUSB/DVD from the steps above, you might try the following procedure.

Linux fdisk.png

Linux Instructions

Open a console and do the following as root

# umount /dev/sdX
# fdisk /dev/sdX
: p   «--- print partition table
: a   «--- activate partition (bootable)
: 1   «--- apply to partition 1
: w   «--- write changes and exit



Windows Diskpart.png

Windows Instructions

The Windows equivalent of the above would look like this

C:\> diskpart
DISKPART> list disk           «--- print disks
DISKPART> select disk 0       «--- select disk number
DISKPART> list partition      «--- print partition table
DISKPART> select partition 1  «--- select the first partition
DISKPART> active              «--- activate disk/partition (bootable)
DISKPART> exit                «--- exit

Unlike fdisk, diskpart will preform changes as you enter them, therefore, there is no write instruction.



[edit] Live USB stick with persistent file system

To create a persistent file system on the usb stick give at the initial boot prompt the extra command:

kiwi_hybridpersistent=yes

Now an extra file system will be created so that data can be stored on the stick in a persistent way.

Note that this only makes sense if your USB stick is larger than 1 GB.

[edit] See also



[edit] Other links to openSUSE and Novell pages