SlideShare a Scribd company logo
How to make multi-boot USB driveHow to make multi-boot USB drive
for LiveCD iso images on EFI/UEFI and BIOSfor LiveCD iso images on EFI/UEFI and BIOS
  
  
openSUSE Asia Summit 2016openSUSE Asia Summit 2016
2016-10-012016-10-01
Kentaro Hatori@KoedoLUGKentaro Hatori@KoedoLUG
Self-IntroductionSelf-Introduction
Name : Kentaro Hatori
Nickname : hatochan
Nationality : Japan
City : Kawagoe-city, Saitama prefecture
Email : 810chan@gmail.com
Twitter : @hatochan
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
Affiliation
Information-technology Promotion Agency, Japan
Koedo Linux Users' Group (Koedo LUG) which is one of
local Linux community in Japan
OpenStreetMap Foundation Japan
Open Knowledge Japan
Code for Japan
GNU Heaalth Japanize Team
Activity
Developing original LiveCD Linux but very slowly and
going away from the point
Koedo LUG ActivityKoedo LUG Activity
Mailing List for information exchange about Linux & open
source so�ware
Off party & study group each month
BBQ party on river beach each year
Publishing a original Linux technology magazine “Linux
User”
Comic Market summer & winter
Members:over 370(just registration mailing list)
Active members:about 20
Off Party & Study GroupOff Party & Study Group
Very very variety theme from server to embedded
including desktop
Success story and failures
Failures are very important; these tell bad know-how and
how to asking and answering
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
 How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS
Today's TopicToday's Topic
How to make multi-boot USB drive forHow to make multi-boot USB drive for
LiveCD iso images on EFI/UEFI and BIOSLiveCD iso images on EFI/UEFI and BIOS
Most strong point of Grub2Most strong point of Grub2
Grub2 makes grub.conf automatically
Configure files are very complex...
A new function is booting directory a Linux distro .iso file
without extracting
Booting directly ISO fileBooting directly ISO file
You can have so many Linux distro .iso files in one device
which is CD/DVD or USB drive and boot any iso file directly
You can make original multi booting device
But you must describe each distro booting process
Structure image of booting USB drive forStructure image of booting USB drive for
booting .iso files directlybooting .iso files directly
.
├── boot
│ ├── grub
│ │ ├── fonts
│ │ │ └── unicode.pf2
│ │ ├── grub.cfg
│ │ ├── grubenv
│ │ ├── i386-pc
│ │ │ └──{.mod fils for various drivers...}
│ │ └── locale
│ │ └── ja.mo
│ └── memtest86+.bin
├── boot
├── openSUSE-13.2-KDE-Live-i686.iso
└──{.iso files of various Linux distributions}
How to make booting USB drive and CD/DVDHow to make booting USB drive and CD/DVD
for booting .iso file directolyfor booting .iso file directoly
Donwload .iso files to USB drive1.
Install grub2 to USB drive2.
describe each distro booting process (/boot
/grub/grub.cfg)
3.
Additionally make booting CD/DVD .iso image (if you
need)
4.
Making booting USB drive by grub2Making booting USB drive by grub2
sudo grub-install --root-directory=/media/user/{USB's directry name} /dev
Making booting CD/DVD image for bootingMaking booting CD/DVD image for booting
.iso files directly.iso files directly
sudo grub-mkrescue -o live_cd.iso {path to cd root}
Please remenber that is very simple but youPlease remenber that is very simple but you
have to describe each distro booting processhave to describe each distro booting process
How to get the information about describingHow to get the information about describing
grub2grub2
Grub2/ISOBoot/Examples - Community Help Wiki
Grub2/ISOBoot - Community Help Wiki
Anyway mount and extract iso file and extract
Making booting USB thumb drive from iso file by
UNetbootin
https://help.ubuntu.com/community/Grub2/ISOBoot
/Examples
https://help.ubuntu.com/community/Grub2/ISOBoot
Menu of UNetbootinMenu of UNetbootin
Example for Slax 32bitExample for Slax 32bit
menuentry 'Slax 7.0.8 32bit' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/slax-7.0.8-i486.iso'
search --no-floppy --file --set=root $isofile
loopback loop ($root)$isofile
linux (loop)/slax/boot/vmlinuz from=$isofile slax.flags=perch,xmode nopersiste
initrd (loop)/slax/boot/initrfs.img
}
Example for PorteusExample for Porteus
menuentry 'Porteus-KDE v3.1' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/Porteus-v3.1-i486.iso'
search --no-floppy --file --set=root $isofile
loopback loop ($root)$isofile
linux (loop)/boot/syslinux/vmlinuz from=$isofile noswap kmap=jp nomagic
initrd (loop)/boot/syslinux/initrd.xz
}
Example for DebianExample for Debian
menuentry 'Debian GNU/Linux 7.0.0' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile="/debian-live-7.0.0-i386-lxde-desktop.iso"
search --no-floppy --file --set=root $isofile
loopback loop ($root)$isofile
linux (loop)/live/vmlinuz boot=live iso-scan/filename=$isofile noprompt noejec
initrd (loop)/live/initrd.img
}
Example for UbuntuExample for Ubuntu
menuentry "Ubuntu 14.04" {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile="/ubuntu-14.04-desktop-i386.iso"
loopback loop ($root)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt no
initrd (loop)/casper/initrd.lz
}
Example for KnoppixExample for Knoppix
menuentry "Knoppix 7.2" {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/KNOPPIX_V7.2.0CD-2013-06-16-EN.iso'
search --no-floppy --file --set=root $isofile
loopback loop ($root)$isofile
linux (loop)/boot/isolinux/linux bootfrom=/dev/sdX1$isofile lang=us apm=power-
initrd (loop)/boot/isolinux/minirt.gz
}
Example for FedoraExample for Fedora
menuentry 'Fedora Live/Desktop 19' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/Fedora-Live-Desktop-x86_64-19-1.iso'
set rdfile='/isolinux/initrd0.img'
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-Desktop-x86_64-
initrd (loop)$rdfile
}
Example for TinyCoreExample for TinyCore
menuentry 'CorePlus 6.3' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile="/CorePlus-current.iso"
search --no-floppy --file --set=root $isofile
loopback loop ($root)$isofile
linux (loop)/boot/vmlinuz iso=/mnt/sdX1$isofile cde quiet waitusb=5
initrd (loop)/boot/core.gz
}
Example for SystemRescueExample for SystemRescue
menuentry 'System Rescue 4.5.1 ' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile="/systemrescuecd-x86-4.5.1.iso"
loopback loop ($root)$isofile
linux (loop)/isolinux/rescue32 setkmap=jp isoloop=$isofile dostartx
initrd (loop)/isolinux/initram.igz
}
Example for GpartedExample for Gparted
menuentry 'Gparted Live 0.21.0-1' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile="/gparted-live-0.21.0-1-i586.iso"
search --no-floppy --file --set=root $isofile
loopback loop ($root)$isofile
linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=fromm
initrd (loop)/live/initrd.img
}
Example for ClonezillaExample for Clonezilla
menuentry "Clonezilla Live 2.3.2-22" {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile="/clonezilla-live-2.3.2-22-i586.iso"
loopback loop $isofile
linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomode
initrd (loop)/live/initrd.img
}
Mount and extract iso fileMount and extract iso file
$ mkdir /mnt/loop
$ sudo mount -t iso9660,ro openSUSE-13.2-KDE-Live-i686.iso /mnt/loop
$ cat /mnt/loop/config.isoclient
IMAGE='loop;openSUSE-13.2-livecd-kde.i686;2.8.0'
UNIONFS_CONFIG='/dev/ram1,loop,overlay'
$ cat /mnt/loop/liveboot
initrd-isoboot-suse-13.2.i686-2.1.2.gz
Example for openSUSE #1Example for openSUSE #1
menuentry 'openSUSE 13.2' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/openSUSE-13.2-KDE-Live-i686.iso'
loopback loop ($root)$isofile
linux (loop)/boot/i386/loader/linux ramdisk_size=512000 ramdisk_blocksize=
initrd (loop)/boot/i386/loader/initrd
}
Error of openSUSE BootingError of openSUSE Booting
error: no such partition.
error: disk 'loop' not found.
error: you need to load the kernel first.
Example for openSUSE #2Example for openSUSE #2
menuentry 'openSUSE 13.2' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/openSUSE-13.2-KDE-Live-i686.iso'
loopback loop ($root)$isofile
linux (loop)/openSUSE-13.2-livecd-kde-read-only.i686-2.8.0 ramdisk_size=
initrd (loop)/boot/i386/loader/initrd
}
Error of openSUSE BootingError of openSUSE Booting
error: no such partition.
error: disk 'loop' not found.
Cause of booting errorCause of booting error
It may be timeout through loop
set default=N is the default boot entry that is chosen a�er
timeout for user action
set timeout=M is the time M to wait in seconds for a user
selection before default is booted
Example for openSUSE #3Example for openSUSE #3
menuentry 'openSUSE 13.2' {
insmod part_msdos
insmod ext2
set default=5
set timeout=5
set root='hd0,msdos1'
set isofile='/openSUSE-13.2-KDE-Live-i686.iso'
loopback loop ($root)$isofile
linux (loop)/openSUSE-13.2-livecd-kde-read-only.i686-2.8.0 ramdisk_size=
initrd (loop)/boot/i386/loader/initrd
}
Now I use cheep Chromebook then I cannotNow I use cheep Chromebook then I cannot
try it !!!try it !!!
How to make EFI/UEFI GRUB2 booring USBHow to make EFI/UEFI GRUB2 booring USB
drive to boot ISO imagesdrive to boot ISO images
format USB drive (don't forget to backup!)1.
check USB drive which is the /dev/sdX device with sudo
fdisk -l or using Gparted
2.
mount USB drive at /mnt3.
use a Ubuntu flavour LiveCD distribution4.
user is default by install or livecd5.
You are logged with the first user (setted at installation or
live session default)
You are not afraid of Linux Command Interface
Source: https://ubuntuforums.org
/showthread.php?t=2276498
First Step: Format USB driveFirst Step: Format USB drive
To create a EFI firmware compatible boot drive, you need a
GPT partition table and at least one FAT32 partition. Do as
follows...
sudo apt-get install gdisk
sudo sgdisk --zap-all /dev/sdX
You probably need to remove and insert the USB drive again
at this point for the kernel to update information about it...
sudo sgdisk --new=1:0:0 --typecode=1:ef00 /dev/sdX
sudo mkfs.vfat -F32 -n GRUB2EFI /dev/sdX1
We are done with Step One, you can check modifications
with sudo parted -l or with Gparted.
Second Step: Copy files and Set directorySecond Step: Copy files and Set directory
structurestructure
Let's mount the usb drive...
sudo mount -t vfat /dev/sdX1 /mnt -o uid=1000,gid=1000,umask=022
To make life easier, I created a pack with all necessary files
for you to modify as you need. If you don't trust my files,
create yours using this page as reference. Link to Download
is: http://webativo.com/uploads/files/usb-pack_efi.zip
Extract the zip file and paste those inner files using
Command Line Interface or a file manager you like.
cd ~/Downloads/
unzip usb-pack_efi.zip
rsync -auv usb-pack_efi/ /mnt
The most important files are bootia32.efi to boot on 32bit
machines, bootx64.efi to boot on 64bit machines and
grub.cfg to setup grub to load ISOs or chainload to other
paths.
In the end, you might get a directory tree like this:
Third Step: Install GRUB2 on the driveThird Step: Install GRUB2 on the drive
sudo grub-install --removable --boot-directory=/mnt/boot --efi-directory=/mnt/EF
PS: Grub2 installation might throw some error messages,
just ignore it.
PS: If you have problems to copy and paste content on
/mnt, you can use sudo to do it
Fourth Step: Setup ISOs to be loadedFourth Step: Setup ISOs to be loaded
Put (copy) the .iso files you want to load in /mnt/iso/ and
setup grub.cfg like the existing examples...
Note that the most important variable to set is isofile. There
is lots of examples on the web about how to configure grub2
menu. Use # to comment those lines you don't want to use,
e.g. to hide a configuration of absent .iso at /iso.
Last Step: Configure firmware and TestLast Step: Configure firmware and Test
First and most important, deactivate secure boot on your
computer's firmware. Search on the web if you don't know
how.
To boot the USB drive you can set your machine firmware to
search first for the USB device (boot order). Or you can
choose what drive to boot as soon as you turn on your
computer. Each manufacturer has its own keys to do it.
Search for your machine's manual if needed.
AnywayAnyway
most important thing is...most important thing is...
Have a fun !!!Have a fun !!!

More Related Content

What's hot (20)

PDF
Adhocr T-dose 2012
Gratien D'haese
 
PPT
Linuxppt
TSUBHASHRI
 
ODP
AutoYast
Hillwood Yang
 
PPTX
Odoo 13 installation on ubuntu 19.04
PlanetOdoo
 
PDF
Dockerの準備
koedoyoshida
 
PPT
101 4.3 control mounting and unmounting of filesystems
Acácio Oliveira
 
PDF
Server hardening methedologies
Shreya Pohekar
 
ODP
Releasing and deploying python tools
Quintagroup
 
PDF
Install Archlinux in 10 Steps (Sort of) :)
Sian Lerk Lau
 
PDF
Self2013
Dru Lavigne
 
PDF
Openwrt startup
晓东 杜
 
PDF
Fosscon2013
Dru Lavigne
 
DOCX
Run wordcount job (hadoop)
valeri kopaleishvili
 
PDF
Oracle11g On Fedora14
kmsa
 
PDF
Snort296x centos6x 2
Trinh Tuan
 
PDF
Recipe of a linux Live CD (archived)
Bud Siddhisena
 
PPTX
Install odoo v8 the easiest way on ubuntu debian
Francisco Servera
 
PPTX
Build Your Own Android Tablet
SGAndroidDevs
 
PPTX
Linux mint
Poi Poi
 
PDF
LinuxをインストールしてWebサーバーを立ち上げてみよう【OSC2018 Tokyo/Spring】
Masataka Tsukamoto
 
Adhocr T-dose 2012
Gratien D'haese
 
Linuxppt
TSUBHASHRI
 
AutoYast
Hillwood Yang
 
Odoo 13 installation on ubuntu 19.04
PlanetOdoo
 
Dockerの準備
koedoyoshida
 
101 4.3 control mounting and unmounting of filesystems
Acácio Oliveira
 
Server hardening methedologies
Shreya Pohekar
 
Releasing and deploying python tools
Quintagroup
 
Install Archlinux in 10 Steps (Sort of) :)
Sian Lerk Lau
 
Self2013
Dru Lavigne
 
Openwrt startup
晓东 杜
 
Fosscon2013
Dru Lavigne
 
Run wordcount job (hadoop)
valeri kopaleishvili
 
Oracle11g On Fedora14
kmsa
 
Snort296x centos6x 2
Trinh Tuan
 
Recipe of a linux Live CD (archived)
Bud Siddhisena
 
Install odoo v8 the easiest way on ubuntu debian
Francisco Servera
 
Build Your Own Android Tablet
SGAndroidDevs
 
Linux mint
Poi Poi
 
LinuxをインストールしてWebサーバーを立ち上げてみよう【OSC2018 Tokyo/Spring】
Masataka Tsukamoto
 

Similar to How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS (20)

ODT
Howtoinstallarchlinuxtousb final-120610172253-phpapp01
decenttr
 
DOC
How to Install ArchLinux to a USB Flashdrive in 2012
Chukwuma Onyeije, MD, FACOG
 
PPTX
Fedora
Raghu nath
 
ODP
Description of GRUB 2
iamumr
 
PDF
cssl07-preparingyourbootabledrive-180816061937 (1).pdf
JohnRebenRequinto1
 
PDF
CSS L07 - Preparing the Installer
Marvin Bronoso
 
ODP
5. boot process
Marian Marinov
 
PDF
Howto Make A Linux Boot Disk
Xaver Y.R. Chen
 
PPT
101 1.2 boot the system
Acácio Oliveira
 
PPTX
Linux booting Process
Gaurav Sharma
 
PPT
How to build and load linux to embedded system
Игорь Медведев
 
ODP
Grub and dracut ii
plarsen67
 
DOCX
6 stages of linux boot process
Hari Shankar
 
PPTX
Order of boot process in Linux
Siddhesh Palkar
 
PDF
Ubuntu alternate ubuntu installation
arunkumar sadhasivam
 
PDF
Grub2 and troubleshooting_ol7_boot_problems
Tommy Lee
 
PPTX
Linux booting process!!
sourav verma
 
PPT
101 1.2 boot the system
Acácio Oliveira
 
DOC
6 stages of linux boot process
sagarpdalvi
 
PPTX
introduction to computer Linux essential.pptx
musomicatherine
 
Howtoinstallarchlinuxtousb final-120610172253-phpapp01
decenttr
 
How to Install ArchLinux to a USB Flashdrive in 2012
Chukwuma Onyeije, MD, FACOG
 
Fedora
Raghu nath
 
Description of GRUB 2
iamumr
 
cssl07-preparingyourbootabledrive-180816061937 (1).pdf
JohnRebenRequinto1
 
CSS L07 - Preparing the Installer
Marvin Bronoso
 
5. boot process
Marian Marinov
 
Howto Make A Linux Boot Disk
Xaver Y.R. Chen
 
101 1.2 boot the system
Acácio Oliveira
 
Linux booting Process
Gaurav Sharma
 
How to build and load linux to embedded system
Игорь Медведев
 
Grub and dracut ii
plarsen67
 
6 stages of linux boot process
Hari Shankar
 
Order of boot process in Linux
Siddhesh Palkar
 
Ubuntu alternate ubuntu installation
arunkumar sadhasivam
 
Grub2 and troubleshooting_ol7_boot_problems
Tommy Lee
 
Linux booting process!!
sourav verma
 
101 1.2 boot the system
Acácio Oliveira
 
6 stages of linux boot process
sagarpdalvi
 
introduction to computer Linux essential.pptx
musomicatherine
 
Ad

More from Kentaro Hatori (16)

PDF
さくらのVPSのコミュニティ的活用 さくらの夕べ 小江戸らぐナイト 2025/06/04
Kentaro Hatori
 
PDF
地方版IoT推進ラボとCode for Japanとのミートアップを
Kentaro Hatori
 
PDF
WindowsにLinux超簡単安全インストール
Kentaro Hatori
 
PDF
ChromebookにLinuxをインストールしてみた
Kentaro Hatori
 
PDF
ディストロユーザ会と地域ユーザグループの素敵な関係
Kentaro Hatori
 
PDF
ダイソーでWiMAX用 パラボラアンテナ 作ってみた
Kentaro Hatori
 
PDF
OSGeo-Liveをハックする
Kentaro Hatori
 
PDF
中古コンデジを活用して勉強会の楽しさを伝える
Kentaro Hatori
 
PDF
ディストロの価値の作り方 at Osc2014tokyo fall
Kentaro Hatori
 
PDF
異能vationにチャレンジのお勧め
Kentaro Hatori
 
PDF
Pogoplug mobileでownCloudに挑戦してみた
Kentaro Hatori
 
PDF
Osc2013北海道 opendata trend
Kentaro Hatori
 
PDF
川越と小江戸らぐの紹介
Kentaro Hatori
 
PDF
Osc2013 tokyo spring 小江戸らぐプレゼン資料
Kentaro Hatori
 
PDF
Hatochan's Resume 20130216@Koedolug
Kentaro Hatori
 
PDF
Hatochan's Resume 20121215@koedolug
Kentaro Hatori
 
さくらのVPSのコミュニティ的活用 さくらの夕べ 小江戸らぐナイト 2025/06/04
Kentaro Hatori
 
地方版IoT推進ラボとCode for Japanとのミートアップを
Kentaro Hatori
 
WindowsにLinux超簡単安全インストール
Kentaro Hatori
 
ChromebookにLinuxをインストールしてみた
Kentaro Hatori
 
ディストロユーザ会と地域ユーザグループの素敵な関係
Kentaro Hatori
 
ダイソーでWiMAX用 パラボラアンテナ 作ってみた
Kentaro Hatori
 
OSGeo-Liveをハックする
Kentaro Hatori
 
中古コンデジを活用して勉強会の楽しさを伝える
Kentaro Hatori
 
ディストロの価値の作り方 at Osc2014tokyo fall
Kentaro Hatori
 
異能vationにチャレンジのお勧め
Kentaro Hatori
 
Pogoplug mobileでownCloudに挑戦してみた
Kentaro Hatori
 
Osc2013北海道 opendata trend
Kentaro Hatori
 
川越と小江戸らぐの紹介
Kentaro Hatori
 
Osc2013 tokyo spring 小江戸らぐプレゼン資料
Kentaro Hatori
 
Hatochan's Resume 20130216@Koedolug
Kentaro Hatori
 
Hatochan's Resume 20121215@koedolug
Kentaro Hatori
 
Ad

Recently uploaded (20)

PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PDF
Per Axbom: The spectacular lies of maps
Nexer Digital
 
PDF
The Future of Artificial Intelligence (AI)
Mukul
 
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
PDF
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
RAT Builders - How to Catch Them All [DeepSec 2024]
malmoeb
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
Per Axbom: The spectacular lies of maps
Nexer Digital
 
The Future of Artificial Intelligence (AI)
Mukul
 
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Safe Software
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
How ETL Control Logic Keeps Your Pipelines Safe and Reliable.pdf
Stryv Solutions Pvt. Ltd.
 
Trying to figure out MCP by actually building an app from scratch with open s...
Julien SIMON
 

How to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOS

  • 1. How to make multi-boot USB driveHow to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOSfor LiveCD iso images on EFI/UEFI and BIOS       openSUSE Asia Summit 2016openSUSE Asia Summit 2016 2016-10-012016-10-01 Kentaro Hatori@KoedoLUGKentaro Hatori@KoedoLUG
  • 2. Self-IntroductionSelf-Introduction Name : Kentaro Hatori Nickname : hatochan Nationality : Japan City : Kawagoe-city, Saitama prefecture Email : [email protected] Twitter : @hatochan
  • 6. Affiliation Information-technology Promotion Agency, Japan Koedo Linux Users' Group (Koedo LUG) which is one of local Linux community in Japan OpenStreetMap Foundation Japan Open Knowledge Japan Code for Japan GNU Heaalth Japanize Team Activity Developing original LiveCD Linux but very slowly and going away from the point
  • 7. Koedo LUG ActivityKoedo LUG Activity Mailing List for information exchange about Linux & open source so�ware Off party & study group each month BBQ party on river beach each year Publishing a original Linux technology magazine “Linux User” Comic Market summer & winter Members:over 370(just registration mailing list) Active members:about 20
  • 8. Off Party & Study GroupOff Party & Study Group Very very variety theme from server to embedded including desktop Success story and failures Failures are very important; these tell bad know-how and how to asking and answering
  • 11. Today's TopicToday's Topic How to make multi-boot USB drive forHow to make multi-boot USB drive for LiveCD iso images on EFI/UEFI and BIOSLiveCD iso images on EFI/UEFI and BIOS
  • 12. Most strong point of Grub2Most strong point of Grub2 Grub2 makes grub.conf automatically Configure files are very complex... A new function is booting directory a Linux distro .iso file without extracting
  • 13. Booting directly ISO fileBooting directly ISO file You can have so many Linux distro .iso files in one device which is CD/DVD or USB drive and boot any iso file directly You can make original multi booting device But you must describe each distro booting process
  • 14. Structure image of booting USB drive forStructure image of booting USB drive for booting .iso files directlybooting .iso files directly . ├── boot │ ├── grub │ │ ├── fonts │ │ │ └── unicode.pf2 │ │ ├── grub.cfg │ │ ├── grubenv │ │ ├── i386-pc │ │ │ └──{.mod fils for various drivers...} │ │ └── locale │ │ └── ja.mo │ └── memtest86+.bin ├── boot ├── openSUSE-13.2-KDE-Live-i686.iso └──{.iso files of various Linux distributions}
  • 15. How to make booting USB drive and CD/DVDHow to make booting USB drive and CD/DVD for booting .iso file directolyfor booting .iso file directoly Donwload .iso files to USB drive1. Install grub2 to USB drive2. describe each distro booting process (/boot /grub/grub.cfg) 3. Additionally make booting CD/DVD .iso image (if you need) 4.
  • 16. Making booting USB drive by grub2Making booting USB drive by grub2 sudo grub-install --root-directory=/media/user/{USB's directry name} /dev
  • 17. Making booting CD/DVD image for bootingMaking booting CD/DVD image for booting .iso files directly.iso files directly sudo grub-mkrescue -o live_cd.iso {path to cd root}
  • 18. Please remenber that is very simple but youPlease remenber that is very simple but you have to describe each distro booting processhave to describe each distro booting process
  • 19. How to get the information about describingHow to get the information about describing grub2grub2 Grub2/ISOBoot/Examples - Community Help Wiki Grub2/ISOBoot - Community Help Wiki Anyway mount and extract iso file and extract Making booting USB thumb drive from iso file by UNetbootin https://help.ubuntu.com/community/Grub2/ISOBoot /Examples https://help.ubuntu.com/community/Grub2/ISOBoot
  • 20. Menu of UNetbootinMenu of UNetbootin
  • 21. Example for Slax 32bitExample for Slax 32bit menuentry 'Slax 7.0.8 32bit' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile='/slax-7.0.8-i486.iso' search --no-floppy --file --set=root $isofile loopback loop ($root)$isofile linux (loop)/slax/boot/vmlinuz from=$isofile slax.flags=perch,xmode nopersiste initrd (loop)/slax/boot/initrfs.img }
  • 22. Example for PorteusExample for Porteus menuentry 'Porteus-KDE v3.1' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile='/Porteus-v3.1-i486.iso' search --no-floppy --file --set=root $isofile loopback loop ($root)$isofile linux (loop)/boot/syslinux/vmlinuz from=$isofile noswap kmap=jp nomagic initrd (loop)/boot/syslinux/initrd.xz }
  • 23. Example for DebianExample for Debian menuentry 'Debian GNU/Linux 7.0.0' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile="/debian-live-7.0.0-i386-lxde-desktop.iso" search --no-floppy --file --set=root $isofile loopback loop ($root)$isofile linux (loop)/live/vmlinuz boot=live iso-scan/filename=$isofile noprompt noejec initrd (loop)/live/initrd.img }
  • 24. Example for UbuntuExample for Ubuntu menuentry "Ubuntu 14.04" { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile="/ubuntu-14.04-desktop-i386.iso" loopback loop ($root)$isofile linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt no initrd (loop)/casper/initrd.lz }
  • 25. Example for KnoppixExample for Knoppix menuentry "Knoppix 7.2" { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile='/KNOPPIX_V7.2.0CD-2013-06-16-EN.iso' search --no-floppy --file --set=root $isofile loopback loop ($root)$isofile linux (loop)/boot/isolinux/linux bootfrom=/dev/sdX1$isofile lang=us apm=power- initrd (loop)/boot/isolinux/minirt.gz }
  • 26. Example for FedoraExample for Fedora menuentry 'Fedora Live/Desktop 19' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile='/Fedora-Live-Desktop-x86_64-19-1.iso' set rdfile='/isolinux/initrd0.img' search --no-floppy --file --set=root $isofile loopback loop $isofile linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=Fedora-Live-Desktop-x86_64- initrd (loop)$rdfile }
  • 27. Example for TinyCoreExample for TinyCore menuentry 'CorePlus 6.3' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile="/CorePlus-current.iso" search --no-floppy --file --set=root $isofile loopback loop ($root)$isofile linux (loop)/boot/vmlinuz iso=/mnt/sdX1$isofile cde quiet waitusb=5 initrd (loop)/boot/core.gz }
  • 28. Example for SystemRescueExample for SystemRescue menuentry 'System Rescue 4.5.1 ' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile="/systemrescuecd-x86-4.5.1.iso" loopback loop ($root)$isofile linux (loop)/isolinux/rescue32 setkmap=jp isoloop=$isofile dostartx initrd (loop)/isolinux/initram.igz }
  • 29. Example for GpartedExample for Gparted menuentry 'Gparted Live 0.21.0-1' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile="/gparted-live-0.21.0-1-i586.iso" search --no-floppy --file --set=root $isofile loopback loop ($root)$isofile linux (loop)/live/vmlinuz boot=live config union=aufs noswap noprompt ip=fromm initrd (loop)/live/initrd.img }
  • 30. Example for ClonezillaExample for Clonezilla menuentry "Clonezilla Live 2.3.2-22" { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile="/clonezilla-live-2.3.2-22-i586.iso" loopback loop $isofile linux (loop)/live/vmlinuz boot=live live-config noswap nolocales edd=on nomode initrd (loop)/live/initrd.img }
  • 31. Mount and extract iso fileMount and extract iso file $ mkdir /mnt/loop $ sudo mount -t iso9660,ro openSUSE-13.2-KDE-Live-i686.iso /mnt/loop $ cat /mnt/loop/config.isoclient IMAGE='loop;openSUSE-13.2-livecd-kde.i686;2.8.0' UNIONFS_CONFIG='/dev/ram1,loop,overlay' $ cat /mnt/loop/liveboot initrd-isoboot-suse-13.2.i686-2.1.2.gz
  • 32. Example for openSUSE #1Example for openSUSE #1 menuentry 'openSUSE 13.2' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile='/openSUSE-13.2-KDE-Live-i686.iso' loopback loop ($root)$isofile linux (loop)/boot/i386/loader/linux ramdisk_size=512000 ramdisk_blocksize= initrd (loop)/boot/i386/loader/initrd }
  • 33. Error of openSUSE BootingError of openSUSE Booting error: no such partition. error: disk 'loop' not found. error: you need to load the kernel first.
  • 34. Example for openSUSE #2Example for openSUSE #2 menuentry 'openSUSE 13.2' { insmod part_msdos insmod ext2 set root='hd0,msdos1' set isofile='/openSUSE-13.2-KDE-Live-i686.iso' loopback loop ($root)$isofile linux (loop)/openSUSE-13.2-livecd-kde-read-only.i686-2.8.0 ramdisk_size= initrd (loop)/boot/i386/loader/initrd }
  • 35. Error of openSUSE BootingError of openSUSE Booting error: no such partition. error: disk 'loop' not found.
  • 36. Cause of booting errorCause of booting error It may be timeout through loop set default=N is the default boot entry that is chosen a�er timeout for user action set timeout=M is the time M to wait in seconds for a user selection before default is booted
  • 37. Example for openSUSE #3Example for openSUSE #3 menuentry 'openSUSE 13.2' { insmod part_msdos insmod ext2 set default=5 set timeout=5 set root='hd0,msdos1' set isofile='/openSUSE-13.2-KDE-Live-i686.iso' loopback loop ($root)$isofile linux (loop)/openSUSE-13.2-livecd-kde-read-only.i686-2.8.0 ramdisk_size= initrd (loop)/boot/i386/loader/initrd }
  • 38. Now I use cheep Chromebook then I cannotNow I use cheep Chromebook then I cannot try it !!!try it !!!
  • 39. How to make EFI/UEFI GRUB2 booring USBHow to make EFI/UEFI GRUB2 booring USB drive to boot ISO imagesdrive to boot ISO images format USB drive (don't forget to backup!)1. check USB drive which is the /dev/sdX device with sudo fdisk -l or using Gparted 2. mount USB drive at /mnt3. use a Ubuntu flavour LiveCD distribution4. user is default by install or livecd5. You are logged with the first user (setted at installation or live session default) You are not afraid of Linux Command Interface Source: https://ubuntuforums.org /showthread.php?t=2276498
  • 40. First Step: Format USB driveFirst Step: Format USB drive To create a EFI firmware compatible boot drive, you need a GPT partition table and at least one FAT32 partition. Do as follows... sudo apt-get install gdisk sudo sgdisk --zap-all /dev/sdX You probably need to remove and insert the USB drive again at this point for the kernel to update information about it... sudo sgdisk --new=1:0:0 --typecode=1:ef00 /dev/sdX sudo mkfs.vfat -F32 -n GRUB2EFI /dev/sdX1 We are done with Step One, you can check modifications with sudo parted -l or with Gparted.
  • 41. Second Step: Copy files and Set directorySecond Step: Copy files and Set directory structurestructure Let's mount the usb drive... sudo mount -t vfat /dev/sdX1 /mnt -o uid=1000,gid=1000,umask=022 To make life easier, I created a pack with all necessary files for you to modify as you need. If you don't trust my files, create yours using this page as reference. Link to Download is: http://webativo.com/uploads/files/usb-pack_efi.zip
  • 42. Extract the zip file and paste those inner files using Command Line Interface or a file manager you like. cd ~/Downloads/ unzip usb-pack_efi.zip rsync -auv usb-pack_efi/ /mnt The most important files are bootia32.efi to boot on 32bit machines, bootx64.efi to boot on 64bit machines and grub.cfg to setup grub to load ISOs or chainload to other paths. In the end, you might get a directory tree like this:
  • 43. Third Step: Install GRUB2 on the driveThird Step: Install GRUB2 on the drive sudo grub-install --removable --boot-directory=/mnt/boot --efi-directory=/mnt/EF PS: Grub2 installation might throw some error messages, just ignore it. PS: If you have problems to copy and paste content on /mnt, you can use sudo to do it
  • 44. Fourth Step: Setup ISOs to be loadedFourth Step: Setup ISOs to be loaded Put (copy) the .iso files you want to load in /mnt/iso/ and setup grub.cfg like the existing examples... Note that the most important variable to set is isofile. There is lots of examples on the web about how to configure grub2 menu. Use # to comment those lines you don't want to use, e.g. to hide a configuration of absent .iso at /iso.
  • 45. Last Step: Configure firmware and TestLast Step: Configure firmware and Test First and most important, deactivate secure boot on your computer's firmware. Search on the web if you don't know how. To boot the USB drive you can set your machine firmware to search first for the USB device (boot order). Or you can choose what drive to boot as soon as you turn on your computer. Each manufacturer has its own keys to do it. Search for your machine's manual if needed.
  • 46. AnywayAnyway most important thing is...most important thing is...
  • 47. Have a fun !!!Have a fun !!!