LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 12-05-2011, 01:29 AM   #1
Linux_420
LQ Newbie
 
Registered: Dec 2011
Distribution: Fedora
Posts: 27

Rep: Reputation: Disabled
Talking Booting ISO images from a USB disk


The documentation on this is out there.. you just have to look pretty hard. I finally found what I needed here http://www.wonkity.com/~wblock/docs/html/pxe.html.


BE CAREFUL NOT TO OVERWRITE THE MBR OR BOOTLOADER ON YOUR PRIMARY BOOT DISK! BACK THEM UP BEFORE YOU BEGIN THIS PROCESS!


Here is a detailed example of how to make a bootable USB disk:

What you will need:

Hardware:
  • A USB disk large enough to hold the .iso image (which may be compressed using gzip or zip)
  • A device which has a BIOS capable of booting from USB. (It is possible to boot from another disk and chainload to the USB disk but that is beyond the scope of this tutorial.)

Software:
  • A Linux operating system (I am using Fedora 16 .. Debian based distros' filesystem is different. Things like package managers and the location of memdisk and vesamenu.c32 will differ.)
  • The ISO image you wish to boot
  • Bash (or your favorite shell)
  • Gedit (or your favorite text editor - I'm not sure if both <cr> and <lf> are acceptable as I do not use Windows)
  • Syslinux
  • Memdisk (included with Syslinux)
  • Vesamenu.c32 (included with Syslinux)
  • Parted/Gparted
  • Fdisk (optional)
  • mkfs.vfat

Steps:

1. Open a shell (i.e. Bash)

2.Make sure you have the packages required and that they are up to date. Use one of the following:

Quote:
yum list installed | less
or

Quote:
yum list installed | grep syslinux
yum list installed | grep etc.
Note: Debian based distros use apt-get as the default package manager. Also you may want to check out Yum Extender if you are using Fedora

3.Plug in your USB disk and determine which device node it is by issuing the following command:

Quote:
sudo fdisk -l
or by issuing the following command after you plug in your USB disk:

Quote:
dmesg | tail
4.Unmount the usb disk using the following command:

Quote:
sudo umount /dev/sdb1
5.Make a FAT filesystem on the partition you wish to boot from using the following command:

Quote:
sudo mkfs.vfat /dev/sdb1
6. Install a MBR (master boot record) to your USB disk if you don't already have one or the one you have is not working properly. Use the following command:

Quote:
sudo syslinux -m /dev/sdb
7.Install Syslinux to the partition you wish to boot from by issuing the following command:

Quote:
sudo syslinux -i /dev/sdb1

sudo parted /dev/sdb set 1 boot on
Note: if your device node happens to be /dev/sdc2 you would use the following command:

Quote:
sudo parted /dev/sdc set 2 boot on
8.Mount the USB disk:

Quote:
mkdir /media/usb_disk
mount /dev/sdb1 /media/usb_disk
9.Now copy the files you need to the root directory (or the directory you chose to install to) of the partition which has Syslinux installed on it.

Note: The location of these files is different on Debian based systems. I am using an Enterprise style filesystem. On Debian based distros the location will be something like /usr/lib/syslinux/ but I'm not 100% positive.

Quote:
cp -v /user/share/syslinux/memdisk /media/usb_disk
cp -v /user/share/syslinux/vesamenu.c32 /media/usb_disk
10.Copy the iso image to a directory on your USB disk using the command:

Quote:
mkdir /usb_disk/distro
cp /user/username/Downloads/distro.iso /media/usb_disk/distro/
11.Create a file named syslinux.cfg in the directory you installed Syslinux to. Use the following command:

Quote:
touch /media/usb_disk/syslinux.cfg
12.Open syslinux.cfg with your favorite text editor and edit it to look something like this:

Quote:
DEFAULT vesamenu.c32

TIMEOUT 30

PROMPT 1
#DISPLAY boot.msg
#F1 boot.msg
#F2 f2
#F3 f3

LABEL gb
KERNEL memdisk
INITRD /GeexBox/geexbox-2.0-i386.iso
APPEND iso raw

LABEL dsl
KERNEL memdisk
INITRD /DamnSmallLinux/dsl.iso
APPEND iso raw
Note: Versions of Syslinux prior to 4.04 also needed the raw parameter. Syslinux can handle disk images that have been compressed with zip or gzip. The smaller files load faster and CRC checks provide data integrity. Just compress the image and use the compressed image filename in the menu entry.

^^ This last note is a direct quote from the webpage which was linked to at the start of this tutorial. Nothing else has been copied directly. I can not begin to list all of the sites that were referenced.


HOPE THIS WAS USEFUL!
HAVE A LOOK AT THE THINGS I TRIED GETTING THIS TO WORK!
http://www.linuxquestions.org/questi...g-file-635911/

LOL!

NOTE: I wrote this from memory & I will update it tomorrow while following my own tutorial.

Last edited by Linux_420; 12-05-2011 at 04:58 AM. Reason: nit picking.
 
Old 12-05-2011, 01:56 AM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
Good write-up, but I noticed one thing.... You should edit your post and mention that this tutorial is meant for systems using yum, like Fedora, etc. Besides that, you did a good job on the tutorial!

Cheers,

Josh
 
1 members found this post helpful.
Old 12-05-2011, 03:16 AM   #3
Linux_420
LQ Newbie
 
Registered: Dec 2011
Distribution: Fedora
Posts: 27

Original Poster
Rep: Reputation: Disabled
Red face

Thanks for the response. Done. By the way should this be in the tutorials section under LQ ISO?

Last edited by Linux_420; 12-05-2011 at 03:34 AM.
 
Old 12-05-2011, 04:33 AM   #4
corp769
Guru
 
Registered: Apr 2005
Posts: 5,814

Rep: Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001Reputation: 1001
It can be, yes. Contact a moderator, and/or report your thread to be reviewed and possibly moved.

Cheers,

Josh
 
  


Reply

Tags
boot parameters, bootable, live distro, syslinux, usb boot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub help: Booting multiple images from a USB stick? Darkhands Linux - Newbie 1 12-27-2010 09:52 AM
booting an ISO on the hard disk lothario Linux - Software 4 02-17-2008 04:04 PM
system can't read iso images when i try to download redhat from hard disk bbbmmm Red Hat 1 05-20-2007 07:33 AM
Running LIVE CD from hard disk, i.e. copying the iso on HD & then booting the same nitinatindore Linux - Newbie 13 03-12-2006 05:35 AM
USB disk with multiple bootable linux images rottie Linux - General 1 01-16-2006 06:07 AM


All times are GMT -5. The time now is 11:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration