Upload
kentaro-hatori
View
640
Download
2
Embed Size (px)
Citation preview
Booting directly openSUSE iso file by
grub2
openSUSE Asia Summit 20152015-09-05
Kentaro Hatori
2
Self-Introduction
● 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
● Activity● Developing original LiveCD Linux but very
slowly and going away from the point
3
Today's Topic is
Booting directly openSUSE iso file by grub2
Introduction of Koedo LUG
● Since August, 2002● Koedo is nicname of Kawagoe-city
and means Little Classic Tokyo● This community aims following-up
each members who are interested in Linux, ask about unknown term and contribute by joining events and seminars
● The rule of managing this community is every member thinks each other about shareing so long fun time through Linux
Where is Kawagoe-city?
Kawagoe Festival #1
Kawagoe Festival #2
Koedo LUG Activity
● Mailing List for information exchange about Linux & open source software
● 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
Software Freedom Day
2015-09-19 @Sios Technology inc.
BBQ (Beer) Party on Han-nou river beach
11
Off 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
12
Failures
13
I cannot success to boot directly openSUSE iso file by
grub2
14
Today's Topic is
Booting directly openSUSE iso file by grub2
15
Most 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
16
Booting directly iso file
● You can have so many Linux distro iso files in one device which is CD/DVD or USB thumb drive and boot any iso file directly
● You can make original multi booting device
● But you must describe each distro booting process
17
Example 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 nopersistent noeject noprompt noatime ro
initrd (loop)/slax/boot/initrfs.img
}
18
Example 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
}
19
Example 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 noeject quiet splash --
initrd (loop)/live/initrd.img
}
20
Example 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 noeject quiet splash --
initrd (loop)/casper/initrd.lz
}
21
Example 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/sdb1$isofile lang=us apm=power-off nomce
initrd (loop)/boot/isolinux/minirt.gz
}
22
Example 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-19-1 $isofile rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${isofile}
initrd (loop)$rdfile
}
23
Example for CentOS
menuentry 'CentOS 6.5 i386 LiveCD' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
set isofile='/CentOS-6.5-i386-LiveCD.iso'
set rdfile='/isolinux/initrd0.img'
search --no-floppy --file --set=root $isofile
loopback loop $isofile
linux (loop)/isolinux/vmlinuz0 root=live:CDLABEL=CentOS-6.5-i386-LiveCD $isofile rootfstype=auto ro rd.live.image quiet rhgb rd.luks=0 rd.md=0 rd.dm=0 iso-scan/filename=${isofile}
initrd (loop)$rdfile
}
24
Error of CentOS Booting
Kernel panic not syncing: Attempted to kill init!–
Pid: 1, comm: init Not tainted 2.6-32-431.e16.i686 #1
Call Trac:
[<c085cc75>]? Panic + 0x6e/0x122
[<c045fc71>]? do_exit + 0x741/0x750
[<c045fcbc>]? do_group_exit + 0x39/0xe0
[<c045fd31>]? sys_exit_group + 0x11/0x26
[<c04699bf>]? Sysenter_do_call + 0x12/0x28
ctrm_kms_helper: panic occurred, switching back to text console
25
Example 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/sdb1$isofile cde quiet waitusb=5 tce=/mnt/cdrom/cde lang=ja_JP.UTF-8 kmap=qwerty/jp106
initrd (loop)/boot/core.gz
}
26
Example 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
}
27
Example 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=frommedia toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}
28
Example 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 nomodeset ocs_live_run=\"ocs-live-general\" ocs_live_extra_param=\"\" ocs_live_keymap=\"\" ocs_live_batch=\"no\" ocs_lang=\"\" ip=frommedia nosplash toram=filesystem.squashfs findiso=$isofile
initrd (loop)/live/initrd.img
}
29
How to get the information about describing grub2
● Grub2/ISOBoot/Examples - Community Help Wiki
https://help.ubuntu.com/community/Grub2/ISOBoot/Examples
● Grub2/ISOBoot - Community Help Wiki
https://help.ubuntu.com/community/Grub2/ISOBoot
● Anyway mount and extract iso file and extract
● Making booting USB thumb drive from iso file by unetboot
30
Mount 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
31
Unetboot
32
Example for openSUSE
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=4096 splash=silent quiet preloadlog=/dev/null showopts livecd_config=(loop)/config.isoclient
initrd (loop)/boot/i386/loader/initrd
}
33
Error of openSUSEC Booting
error: no such partition.
error: disk 'loop' not found.
error: you need to load the kernel first.
34
Example 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=512000 ramdisk_blocksize=4096 splash=silent quiet preloadlog=/dev/null showopts livecd_config=(loop)/config.isoclient fromiso=$isofile
35
Error of openSUSEC Booting
error: no such partition.
error: disk 'loop' not found.
36
Anywaymost important thing is...
37
Have a fun !!