Вы находитесь на странице: 1из 5

2014 International Conference on Electronics and Communication System (lCECS -2014)

Boot Multiple Operating Systems from ISO


images using USB Disk
B. Sivaiah
Computer Science & Engineering
Department
Vignan University
Guntur, India

T. S. N. Murthy
Computer Science & Engineering
Department
Vignan University
Guntur, India

T. Vandana Babu
Computer Science & Engineering
Department
Vignan University
Guntur, India

sivaiah78@gmail.com

murthyteki@gmail.com

vandana9925@gmail.com

Abstract-Linux has evolved as a giant since its conception.

computer hardware, we may pick another Operating System,

Though there are number of operating systems developed based

which ISO image and again bum it to CD or DVD. Like that

on open source and commercial versions, the basic kernel is

whenever there is a new distribution or operating system is

Linux. There are a number of flavors in Open Source Linux


Operating Systems and most of them can be downloaded from
the internet. The downloaded Operating System is a bootable

released we need to follow the same process, where we waste


number of CD or DVD.

ISO image, which is to be written to either a CD or DVD


depending on the size you have downloaded. If there is another
way of testing those operating systems without wasting the CD or
DVD, it would be very helpful for students as well as researchers.
This paper proposes the alternatives of writing a bootable ISO
image to CD or DVD. With the help of USB mass storage devices
like Pen Drives or USB Disks, we are able to boot from the ISO
images without burning them to CD/DVD or not even extract its
contents.

The alternatives to CD or DVD as installation media is


USB Mass Storage Disk or USB Disk or Pen Drive or Thumb
Drive or USB external Disk [I]. We can use Pen Drive as
installation media. There are procedures available on the
internet on how to make a pen drive as bootable disk. There are
some tools exists on the internet to make a bootable pen drive.
These tools extract the contents of the ISO file and place the
file structure on the pen drive. Later a boot loader is installed

Keywords- SYSLINUX, Boot Loader,

GRUB, ISO Booting,

USB Booting, Linux Booting, Operating System Installation, Live

on to the Master Boot Record (MBR) of the pen drive. This


boot loader then initiates the booting process [2] [5].

Operating Systems.

BOOT PROCESS
I.

The Linux boot process consists of several stages,

INTRODUCTION

Since the evolution of computer, enormous numbers of


operating systems are developed. Each operating system has
having their own set of features and performance. There are

each represented by a different component. The following list


briefly summarizes the boot process and features all the major
components involved.

different kinds of operating systems exits depending on their


processor architectures and from different vendors. There are

A.

BIOS

commercial operating systems and open source operating

After turning on the computer, the BIOS initialize the

systems. Every operating system uses kernel. Most of the open

screen and keyboard and test the main memory. Up to this

source operating system use Linux as their kernel.

stage, the machine does not access any mass storage media.
Subsequently, the information about the current date, time,

Most of the educational institutions prefer to use Linux

and the most important peripherals are loaded from the CMOS

based operating systems as it is noncommercial and open

values.

source because of GNU General Public License. Some of the

recognized, the system control passes from the BIOS to the

When

the

first

hard

disk

and

its

geometry

are

non-profitable organizations also prefer to use open source

boot loader. If the BIOS support network booting, it is also

software. Since the evolution of Linux Kernel, a number of

possible to configure a boot server that provides the boot

Linux based Open Source Operating Systems were developed.

loader.

We need to test these operating systems before installing for

architectures commonly use the BOOTP protocol to get the

compatibility with our existing computer hardware. In order to

boot loader.

test the downloaded Operating System, which basically a


bootable ISO image files, we have to bum the ISO image to
either CD or DVD media depending on the size of the ISO

B.

On

x86

systems,

PXE

boot

is

needed.

Other

Boot Loader
The first physical 512-byte data sector of the first hard

boot loader

file. Now the installation media is CD or DVD. We will boot

disk is loaded into the main memory and the

from CD or DVD and installation takes place. But if the

resides at the beginning of this sector takes over.

downloaded operating system is not compatible with your

commands

executed

by

the

boot

loader

determine

that
The
the

2014 International Conference on Electronics and Communication System (lCECS -2014)


remammg part of the boot process.

Therefore,

the first

If we search on the internet, we can get a number of

Master

methods and small programs to make a bootable pen drive

512 bytes on the first hard disk are referred to as the

the actual operating system, in this case, the Linux Kernel [3]

Universal USB Installer


(UUI) can be used to convert USB Pen drive to boot from an

[4]. For a network boot, the BIOS act's as the boot loader. It

ISO image. Figure 1 shows screen shot of UUI.

Boot Record

(MBR). The boot loader then passes control to

from an ISO image. For example,

gets the image to start from the boot server and starts the
system. This is completely independent of local hard disks.

To pass system control, the boot loader loads both the

(initramfs)

Kernel and an initial RAM-based file system

the ISO image to the USB disk. Then they identify the kernel
image and initrd to boot the Operating system or to start the
ISO images on the USB disk, it is not possible. So booting

that handles the mounting of the real root file

multiple ISO images from the same USB disk is not possible

the Kernel directly.

init

image, because, these procedures will extract the contents of

initramfs can be used by


initramfs contains a small executable

into memory. The contents of the


called

Problems in existing Procedures


These tools or procedures are limited to only one ISO

Kernel and initramfs

C.

A.

system. If special hardware drivers are needed before the mass

initramfs. If the
the initramfs must

installation process. So when we want to have two bootable

with the existing procedures.

storage can be accessed, they must be in


system does not have a local hard disk,

provide the root file system to the Kernel. This can be done
with the help of a network block device like iSCSI or SAN,
but it is also possible to use NFS as the root device.

Proposed Method
Now a days there exists nwnber of boot loaders, such as

Grand Unified Boot Loader (GRUB) [6], Grub2, SYSLINUX,


Grub4dos, etc. This paper proposes on how to boot multiple
ISO images from USB Drive also called Pen Drive. With the

Uoninitramfs

D.

B.

This program performs all actions needed to mount the


proper root file system, like providing Kernel functionality for
the needed file system and device drivers for mass storage

help of SYSLINUX [7] and MEMDISK [8], we can achieve


booting of multiple ISO images from the same USB disk
without extracting the ISO image to the USB.

controllers with udev. After the root file system has been
found,

it is checked for errors and mounted.

successful, the

III.

METHODOLOGY

If this is

initramfs is cleaned and the init program

We can boot from mUltiple ISO images without

on the root file system is executed .

extracting the contents from ISO image with the help of

E.

given below.

GRUB2 or SYSLINUX. The detailed procedures for both are

init
This program handles the actual booting of the system

through

several

different

functionality. The program

levels

init

providing

different

is the process with process

ID 1. It is responsible for initializing the system in the

init

required way.

is started directly by the Kernel and

resists signal 9, which normally kills processes. All other


programs are either started directly by

init

or by one of its

child processes.

GRUB is able to read from an ISO image (be it one of CD


or HDD) stored on any of its accessible storages. This is
achieved by GRUB loading a specially made small image and
passing it as ram disk to the kernel. This is achieved by
executing

the

multiboot_module,

EXISTING METHODS

There are number of procedures available on how to


make bootable pen drive from an ISO image.
Universal USB Installer 1.9.4.5 Setup

Set ,...... Se&....ct.ions p


Choose a L..Jo-.Jx Dlstro. ISO/ZlP""" and. vour use Fla sh Drive.

s 1, s... .. Unux

USING GRUB VERSION 2.0 TO BOOT ISO IMAGES

knetbsd_module_elf,
II.

A.

DIstribution fTom tho. to put on

commands

kfreebsd _module,

kopenbsd_ramdisk,
multiboot2 module

initrd,
or

initrd 16,

xnu_ramdisk

depending on the loader. The behavior of initial ramdisk


depends

on

command

line

options.

Several

distributors

provide the image for this purpose or it's integrated in their


'-' --.-

standard ram disk and activated by special option.

;:;;;"RJ.llI

,,001 USB

It.Jbo.ralu

L(._p.age
'YER\I.so"""" tu -onon--13. W-de:sktop--l386.iSO

Ga Now Shov.oing "... onves (DE CAR.EF\A.)


DFOO"m4tE:\Orive (Erases Content)
J S9G8
Step"" Set .. Peo-_ltenl Ne sin. fOx- storing (Optional).

SteP 3, seect ,.._ USB F15:sh OrNe I.en<er Only

We need Linux based Operating System in order to install


GRUB to the USB Disk [9]. Here we are using Fedora
Operating System. We must work with command line to
perform

this

installation.

So

basic

knowledge

of

Linux

commands is necessary, we need root user privileges to format


and partition the USB Disk. We need at least 2GB USB Disk,
2GB RAM and Computer that can boot from USB devices.
We need not

Figure 1.

Universal USB Installer

to install

Linux Operating

system

to the

Computer in order to do all these tasks, but we can use the

2014 International Conference on Electronics and Communication System (lCECS -2014)


help of a Live CD [10], which will boot the Operating System

entry

on the CD or DVD without installing it to the computer.

"menuentry" statement specifIes that a new menu entry is to

specifIed

by

the

command

"set

default".

The

be created. The "loopback" is a command in GRUB shell to


create a loop back device from an ISO image. The command

Format your USB Disk to use a Single Partition

J)

"Iinux" in the next line specifIes kernel fIle to load and the
1.
2.

Open a terminal and type sudo su

path to that kernel on the disk. Some mandatory parameters

Type fdisk -I (and note which device is your USB

should be specifIed along with kernel. These parameters are


vender specifIc parameters of that operating system. The next

Drive)
3.

Type fdisk Idev/sdx (replacing

with your actual usb

command in the sequence is "initrd", which is initialization


root disk, which will pick the root disk of the operating

device)
4.

Type d (to delete the existing partition)

system. In the above example we have two menu entries that

5.

Type n (to create a new partition)

will boot two different ISO images, Ubuntu and Linux Mint

6.

Type p (for primary partition)

Operating Systems. In the same way we can boot any number

7.

Type 1 (to create the fIrst partition)

of ISO images, but be sure to place one menu entry for each

8.

Press Enter (to use the fIrst cylinder)

ISO image and copy the ISO image to the USB Disk.

Press Enter again (to use the default value as the last

Figure 2 shows the screen shot of boot menu created by

cylinder)

GRUB2 for the above confIguration fIle.

9.

10. Type a (for active)


11. Type 1 (to mark the fIrst partition active "bootable")
12. Type t (for partition type)
13. Type c (to use fat32 partition)
14. Type w (to write the changes and close fdisk)

2)

Installing GRUB on the USB pen drive


If you use the wrong syntax, you will see an error stating
"Installation is impossible. Aborting"
1.

Open a terminal and type sudo su

2.

Type fdisk -I (and note which device is USB Disk)

3.

Type mkdir ImntlUSB && mount Idev/sdxl


Imnt/USB (replacing

4.

with actual usb device)

Type grub-install --force --no-floppy --boot


directory=/mnt/USB/boot Idev/sdx (replacing

Figure 2.

with

Boot Menu created by GRUB2

actual USB Disk)


5.

Type cd Imnt/USB/boot/grub

Now we have to create an important confIguration fIle


called, grub.cfg in this directory. This is the fIle GRUB is
looking for the menu entries to display to the user. For
example, below are the some statements of grub.cfg fIle.
set timeout=lO
set default=O
menuentry "Ubuntu Desktop ISO" {
loopback loop lubuntu.iso
linux (loop)/casper/vmlinuz boot=casper iso
scan/fIlename=/ubuntu.iso noeject noprompt splash -
initrd (loop)/casper/initrd.lz
}
menuentry "Linux Mint ISO" {
loopback loop Ilinuxmint.iso
linux (loop)/casper/vmlinuz
fIle=/cdromipreseed/mint.seed boot=casper isoscanifIlename=/linuxmintiso noeject noprompt splash -
initrd (loop )/casper/initrd.lz }
In the above statements, "set timeout" specify the number
of seconds to wait at the boot menu until to boot the default

B.

USING SYSLINUX TO BOOT ISO IMAGES


SYSLINUX

is a boot loader for the Linux operating

systems which runs on an MS-DOS or Windows FAT fIle


system. It is intended to simplify of Linux, and for creation of
rescue and other special purpose boot disks. When properly
confIgured, SYSLINUX can be used to completely eliminate
the need for distribution of raw boot images.

Installing

SYSLINUX will alter boot sector on the disk and copy a fIle
named LDLINUX.SYS. at the boot time, by default, the kernel
will be loaded from the image named LINUX on the boot
disk. This default can be changed to some other specifIc fIle.
Here we are loading a special fIle called MEMDISK.
MEMDISK is meant to allow booting legacy operating
systems.

MEMDISK can boot floppy images,

hard disk

images and some ISO images. MEMDISK simulates a disk by


claiming a chunk of high memory for the disk and a(very
small - 2K typically) chunk of 10w(DOS) memory for the
driver itself, then hooking the INT 13h(disk driver) and INT
15h(memory query) BIOS interrupts.
MEMDISK is an auxiliary module used in conjunction
with

boot

loader

that

can

load

Iinux

kernels

2014 International Conference on Electronics and Communication System (lCECS -2014)


(EXTLINUX/ISOLINUX/SYSLINUX/PXELINUX,

GRUB,

is memdisk. The "INITRD" will specify the initial ramdisk

grub4dos, GRUB2, etc.). We need a disk image as well as the

image, which is a ISO image to boot. It will take three

MEMDISK file itself. As for as the bootloader is concerned,

mandatory parameters, iso, raw and mem, which can be

MEMDISK is the KERNEL and disk image is the initial


ramdisk (intird).In order to use SYSLINUX, we need to
download the latest version from their website. SYSLINUX is

passed with "APPEND" command. The parameter "iso" is


important that will specify the ramdisk is an ISO.

The

available for all major platforms. As this is Open Source

parameter "mem" will allocate specified size of RAM memory

Software, we can download the source code also. If you are

to load the contents of ISO image to RAM.

using a different platform than the available platforms, we can


compile the source code and produce executable. We are using

Figure 3 shows the screen shot displaying the boot menu

Linux version of SYSLINUX. First we need to format the Pen

created

drive.

configuration.

To

format

pen

drive,

open

terminal

with

root

by

the

SYSLINUX

for

the

above

syslinux.cfg

permissions. Using fdisk command format the USB disk with


windows FAT32 as mentioned earlier.

1)

Installing SYSLINUX on the USB pen drive


1.
2.

Open terminal and type sudo su


Type syslinux -i Idev/sdxl ( replace x with actual
USB device)

3.

Copy memdisk to USB Disk

Copy all the necessary ISO images to the USB disk. We need
to write a configuration file which will serve as boot menu for
SYSLINUX. Open any editor with file name syslinux.cfg. The

Figure 3.

Boot Menu generated by SYSLINUX

contents of the syslinux.cfg are as follows.


DEFAULT vesamenu.c32
MENU TITLE MyPersonal Boot Loader
MENU BACKGROUND backgnd.png
TIMEOUT 600
LABEL Antix
KERNEL memdisk
INITRD

antix.iso

APPEND iso mem=1024M raw


LABEL ClearOS
KERNEL memdisk
INITRD

c1earos. iso

APPEND iso mem=2048M raw


LABEL Ubuntu
KERNEL memdisk
INITRD

Figure 4.

ubuntu.iso

Booting Antix Operating System from ISO

APPEND iso mem=2048M raw


SYSLINUX is a graphical boot loader. The fust statement
above "Default vesamenu.c32" specifies that boot by default
to

vesamenu,

which

is

graphical

boot

menu.

The

IV.

next

RESULTS AND COMPARISON

statement "menu title" means create a menu title in the boot


menu. The next statement "menu background" specifies set a
background image. This background image must be copied to
the USB disk. The next statement "timeout 600" will specify
the SYSLINUX to wait at boot menu for 600 milliseconds.
The "Label" will specify the new entry label in the boot menu.
Here we should load the memdisk as a kernel image. So the
next statement "kernel memdisk" specify that the kernel image

Testing on different Operating System ISOs is performed


using both methods. The success rate of SYSLINUX is more
when compared to GRUB2. The testing ISOs are downloaded
from

the

internet.

Different

Operating

Systems

are

downloaded from internet under the license GNU GPL2. The


comparison for both methods on different operating systems is
given in table 1.

2014 International Conference on Electronics and Communication System


TABLE I

SUCCESS RATE OF DIFFERENT OS WITH GRUE2 AND


SYSLlNX

Serial
No
1
2
3
4
5
6
7
8
9
10
II
12
13
14
15
16
17
18
19
20

Operating System
Chakra
Tiny Core
Chrunchbang
Damn Small Linux
Fedora
Fuduntu
Linux Lite
Linux Mint
Macbuntu
MacPup
Mageia
OS4 Open Linux
PCLinuxOS
Pear Iinux
Puppy Limux
React OS
Rosa-KDE
Sabayon Linux
Siax Linux
Ububtu

(lCECS -2014)

The two methods are able to boot some ISO images


successfully. But the GRUB2 is not able to chain load the

Installation Method
SYSLINUX
GRUB2
x
,(
,(
,(
,(
,(
x
,(
,(
,(
,(
,(
,(
,(
,(
,(
x
,(
x

other boot loader on the ISO image. When Linux kernel and
initrd image locations are specified clearly, it will boot to the
ISO image successfully, but still some Linux Distros are not
working properly. SYSLINUX is able to chainload the boot
loader on the ISO image and most of the Linux Operating
Systems are able to boot from the ISO. Some Linux Distros
are unable to boot because when that Linux is searching
contents from the CD or DVD device.

V.

CONCLUSION AND FUTURE WORK

,(

This article presents the possible ways of booting multiple

,(

ISO images from the USB disk. With the help of USB disk or
flash drive, we are able to boot from multiple ISO images by

installing either GRUB2 or SYSLINUX on the USB Disk and

with little configuration. This procedure is helpful to the

,(
,(

,(

industry professionals, students or anybody, who need to


install Operating Systems frequently or test the operating
systems for their hardware compatibility. This can be further

The above table gives us the success or failure of booting


an operating system ISO image with the proposed two

enhanced by creating a dynamic menu entry at the boot menu


with the help of scriting.

methods. Seven operating systems out of selected 20 are able


to boot using the GRUB2 method. 13 operating systems out of
selected 20 are able boot using SYSLINUX method. GRUB2

REFERENCES

is dependent on the path of the linux and initrd files. But most
of the operating systems try to find these files on device

[1]

[2]

internation

[3]

we are trying to boot an ISO image of size 1 GB, then at least

Information

Dokeun Lee; Youjip Won, "Booting Linux faster ", 2012 3rd

Purdila, O.; Grijincu, L.A.; Tapus, N."LKL: The Linux kernel


library" 9th Roedunet International Conference (RoEduNet),
2010 , pp.328 - 333

1 GB RAM space must be provided for extraction purpose.


[4]

D.P.Bovet, M. Cesati, Understang Linux Kernel 3rd Edition,


O'Reilly Press, 2006.

and SYSLINUX.
[5]

70

on

Digital Content (lC-NIDC), 2012, pp.665 - 668

called RAMDISK. Then it will try to load the initial files from

The following figure 4 shows the success rate of GRUB2

conference

IEEE International Conference on Network Infrastructure and

copy all the contents of the ISO image to the RAM, which is
that RAMDISK. This technique requires more RAM space. If

second

Technology and Computer Science, 2010, pp.357-360.

boot from the GRUB2 method.


The SYSLINUX uses MEMDISK technique, which will

Anil Kumar Karna,"Multipurpose USB hard disk: your mini


laptop",

/dev/srO, which is CD ROM device. So, they are unable to

http://doc.opensuse.org/products/draftlSLES/SLES
admin sd draftlcha.boot.html

60
50

[6]

http://www.gnu.orglsoftware/grub/manual/grub.html

40

GRUB2

SVSLINUX

30

[7] http://www.syslinux.orglwiki/index.php/SYSLINUX.

20

[8]

10

[9]

http://www.syslinux.org/wiki/index.php/MEMDISK
http://www.pendrivelinux.comlinstall-grub2-on-usb-from
ubuntu-linuxl

Fig. 4. Success Rate ofGRUB2 and SYSLlNUX

http://www.pendrivelinux.com/boot-multiple-iso-from-usb[10]
via-grub2-using-linuxl

Вам также может понравиться