Build your own single boot or multiboot pendrive for all PC (Intel/AMD) computers
The system with compressed image files makes it easy for a beginner to install, but it is rather inflexible. So I made a shell-script, that does the main part of the work with the help of a couple of files for the configuration of the booting system.
The shell-script is made to be easy to use, but it helps if you have some experience with terminal windows and command lines. If you want to understand what the shell-script is doing under the hood, just read it in a text viewer or editor. Ask here (reply to the thread), if you have questions, and report a bug, if you find one
A. This tarball
grub-n-iso_multiboot.tar.gz
contains the directory 'grub-n-iso_multiboot' and several files.
Code:
2015-06-11 09:17 about
2015-06-26 00:02 grub.cfg
2015-06-26 16:45 links2check
2015-06-11 15:00 make-alias
2015-06-26 16:36 mk-grub-n-iso
2015-06-23 11:17 mkusb-nox
2015-05-22 10:36 usb-pack_efi.zip
1. 'about' is a batch file, that writes 'About' information
Code:
$ bash about
#!/bin/bash
# Copyright 2015 Nio Wiklund alias sudodus
#
# GPLv3: GNU GPL version 3 <http://gnu.org/licenses/gpl.html>.
#
# This is free software: you are free to change and redistribute it.
# There is NO WARRANTY, to the extent permitted by law.
#
# This scipt is developed from the method developed by
# Andre Rodovalho alias sysmatck in the Ubuntu Forums
# http://ubuntuforums.org/showthread.php?t=2276498
# and uses the file 'usb-pack_efi.zip' developed by him.
#
2. 'grub.cfg' is a template for Ubuntu family iso files
Code:
set timeout=10
set default=0
menuentry "ubuntu.iso - live" {
loopback loop /ubuntu.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso splash --
initrd (loop)/casper/initrd.lz
}
menuentry "ubuntu.iso - persistent live" {
loopback loop /ubuntu.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/ubuntu.iso splash persistent -- persistent
initrd (loop)/casper/initrd.lz
}
This very simple grub.cfg file was developed from the file provided by Pendrivelinux at
http://pendrivelinux.com/downloads/m...linux/grub.cfg
3. 'links2check' is a batch file, that is used for managing the iso files.
'links2check' help managing the daily iso files, to install those you want and keep them up to date. There are two zenity graphical menus to make it more user friendly to select the iso files. The output, however, is still in text mode, written into the terminal window.
When installed and running from the 'grub-n-iso' pendrive, change directory to '/isodevice' and run 'links2check'
Code:
$ sudo -H ./links2check
4. 'make-alias' is a batch file, that creates the alias 'mkgni'
that changes directory to 'grub-n-iso_multiboot' and prints a help text
5. 'mk-grub-n-iso' is the main subject in this post, a batch file, that builds a [multi]boot drive.
6. 'mkusb-nox' is a batch file for installing iso files into other pendrives.
mkusb-nox is is used for installing 'debian' installer iso files, that work in text mode and do not boot via the 'grub-n-iso' method.
Example:
Code:
$ sudo mkusb-nox ubuntu.iso
7. 'usb-pack_efi.zip' contains configuration files for UEFI mode
It is made and uploaded by Andre Rodovalho alias sysmatck
B. Download the tarball from
http://phillw.net/isos/linux-tools/u...ltiboot.tar.gz
and check the md5sum with the file
http://phillw.net/isos/linux-tools/u...-n-iso.md5.asc
C. Install grub-n-iso_multiboot
The tarball is probably in your directory 'Downloads'. If that is where you want to install your directory 'grub-n-iso_multiboot', fine, otherwise I suggest that you move the tarball to where you want it, maybe directly in your home directory, and change directory to there.
1. Expand the tarball
Code:
tar -cvzf grub-n-iso_multiboot.tar.gz grub-n-iso_multiboot
2. Change directory to 'grub-n-iso_multiboot' and create an alias
Code:
cd grub-n-iso_multiboot
make-alias
3. Open a new terminal window and run
Code:
$ mkgni
Usage: sudo /home/sudodus/bin/mk-grub-n-iso <source.iso> <target device> [isotest]
Example: sudo /home/sudodus/bin/mk-grub-n-iso ubuntu.iso /dev/sdx
Example: sudo /home/sudodus/bin/mk-grub-n-iso multiboot /dev/sdx
Example: sudo /home/sudodus/bin/mk-grub-n-iso lubuntu.iso /dev/sdx isotest
Try again with the correct target device according to the list below
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
SAMSUNG HD322HJ sda 298.1G
|-sda1 80G
|-sda2 64G
|-sda4 1K
|-sda5 [SWAP] 8G
|-sda6 / 32G
|-sda7 14G
`-sda8 100.1G
OCZ-AGILITY3 sdb 55.9G
|-sdb1 3.7G
|-sdb2 320M
|-sdb4 1K
`-sdb5 51.9G
WDC WD1003FBYZ-0 sdc 931.5G
|-sdc1 50G
|-sdc2 1K
|-sdc5 20G
|-sdc6 8G
`-sdc7 /mnt/multimed-2 853.5G
Extreme sdd 14.6G
|-sdd1 /media/sudodus/lub14042-32 64M
|-sdd2 /media/sudodus/isodevice 5G
`-sdd3 /media/sudodus/casper-rw 2.2G
DVD+-RW GSA-H21L sr0 1024M
'mkgni' is changing directory to 'grub-n-iso_multiboot' and running 'mk-grub-n-iso' without parameters, so that it writes help output. We see
that it should be run with superuser privileges, and that there should be two parameters, the <source file> and the <target device>. See the first example in the usage output
Code:
sudo ./mk-grub-n-iso ubuntu.iso /dev/sdx
It is also possible to use the following four tokens, -h, -v, multiboot, and isotest.
-h makes it write the same help output as without parameters.
-v makes it write version information
Code:
$ ./mk-grub-n-iso -v
mk-grub-n-iso 1.1
'multiboot' makes 'mk-grub-n-iso' look for all iso files in the current directory (grub-n-iso_multiboot), *.iso, and use them as source files.
See the second demo example and the output from the command
Code:
sudo ./mk-grub-n-iso multiboot /dev/sdx
'isotest' makes 'mk-grub-n-iso' prepare for managing daily iso files in the current directory, and make them bootable by adding menuentries to the target 'grub.cfg' file.
See the fourth demo example and the output from the command
Code:
sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd isotest
The target device letter x should be selected according to the tree view of the devices. In this case the system is booted from '/dev/sda', so
'/dev/sdb' should be selected as the target device.
WARNING!
Check carefully that you specify the correct target device, otherwise you might destroy valuable data!
Wait a while! There is no iso file in the directory 'grub-n-iso_multiboot'
D. Get iso files
1. Download one or more iso files with Ubuntu family desktop operating systems.
You can find download information via this link
http://releases.ubuntu.com/
and check the md5sum.
Not now, but when the system is installed, you can also download, update incrementally with rsync and check the md5sum with
Code:
$ sudo -H ./links2check
2. If you download an iso file with another distro,
you need to configure the menuentry in grub.cfg manually. The following links may help
https://wiki.archlinux.org/index.php...boot_USB_drive
https://help.ubuntu.com/community/Grub2/ISOBoot
https://help.ubuntu.com/community/Gr...OBoot/Examples
https://help.ubuntu.com/community/Grub2/CustomMenus
3. Make the iso files available
Single iso files can be entered with the full path (in the command line).
But if you want to create a multiboot pendrive, the source files (or links to the source files) must be in the directory 'grub-n-iso_multiboot'. It is also convenient the create links, even when you intend to install single iso files.
Create links from the location of the downloaded iso files to 'grub-n-iso_multiboot' (or move the files if you like). You can use symbolic
links as well as hard links. Avoid copying because it is a waste of disk space.
Examples
Code:
$ ls -1 ~/Downloads/iso
kubuntu-14.04.2-desktop-amd64.iso
lubuntu-14.04.2-desktop-i386.iso
ubuntu-12.04-desktop-i386.iso
ubuntu-14.04.2-desktop-amd64.iso
ubuntu-mate-14.04.2-LTS-desktop-i386.iso
xubuntu-14.04.1-desktop-i386.iso
$ mkgni
Example 1 - link all files (the final dots in the command lines are important)
Code:
ln -s ~/Downloads/iso/*.iso .
Example 2 - link only standard ubuntu files
Code:
ln -s ~/Downloads/iso/ubuntu-1*.iso .
Example 3 - link only 32-bit files
Code:
ln -s ~/Downloads/iso/*i386*.iso .
Example 4 - link only 64-bit files
Code:
ln -s ~/Downloads/iso/*amd64*.iso .
E. Demo runs
1. Create a portable system with a small foot-print
Code:
sudo ./mk-grub-n-iso ~/Downloads/iso/lubuntu-14.04.2-desktop-i386.iso /dev/sdx
Code:
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd
'lubuntu-14.04.2-desktop-i386.iso' is identified as the source ISO file
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat lub14042-32 787M
`-sdd2 ext2 casper-rw 3G
Go ahead and overwrite /dev/sdd ? (g/q) g
Using 'grub.cfg' in the current directory
Using 'usb-pack_efi' in the current directory
---------------------------------------------------------------------------
Create new system or Add new iso file? (c/a)? c
FINAL WARNING: Are you sure /dev/sdd ? (y/n) y
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.16422 s, 6.4 MB/s
---------------------------------------------------------------------------
Use gparted and create an msdos partition table
---------------------------------------------------------------------------
Suggested values, may be changed according to the size of 'lubuntu-14.04.2-desktop-i386.iso'
/dev/sdd1: file system= fat32 size= 787 Mibibytes to host grub and iso files
/dev/sdd2: file system= ext2 size=rest of device
======================
libparted : 2.3
======================
fatlabel: warning - lowercase labels might not work properly with DOS or Windows
tune2fs 1.42.9 (4-Feb-2014)
---------------------------------------------------------------------------
source=lubuntu-14.04.2-desktop-i386.iso
---------------------------------------------------------------------------
UEFI Bootloader: Installing for i386-pc platform.
Installation finished. No error reported.
BIOS Bootloader (maybe complaints) : Installing for i386-pc platform.
Installation finished. No error reported.
Copying files ...
sending incremental file list
./
EFI/
EFI/BOOT/
EFI/BOOT/bootia32.efi
EFI/BOOT/bootx64.efi
boot/
boot/grub/
boot/grub/menu.lst
boot/grub4dos/
boot/grub4dos/g2ldr
boot/grub4dos/grub.exe
boot/memtest/
boot/memtest/memtest.bin
boot/memtest/memtest86+-5.01.bin
sent 2,311,447 bytes received 188 bytes 4,623,270.00 bytes/sec
total size is 2,310,239 speedup is 1.00
mount: block device /mnt/multimed-2/test/lubuntu/trusty-desktop-i386.iso is write-protected, mounting read-only
< lubuntu-14.04.2-desktop-i386.iso pv > /mnt/target/lubuntu-14.04.2-desktop-i386.iso
703MB 0:00:26 [26.2MB/s] [===============================================>] 100%
Syncing the target device ...
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat lub14042-32 787M
`-sdd2 ext2 casper-rw 3G
The target device is ready to use.
'lubuntu-14.04.2-desktop-i386.iso' was installed
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$
2. Create a multiboot system with only standard ubuntu files
You can create extra space in the fat32 partition and add more iso files later.
Code:
mkgni
rm *.iso
ln -s ~/Downloads/iso/ubuntu-1*.iso .
sudo ./mk-grub-n-iso multiboot /dev/sdx
Code:
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso multiboot /dev/sdd
[sudo] password for sudodus:
multi-boot: all iso files in the current directory will be used
kubuntu-14.04.2-desktop-amd64.iso
lubuntu-14.04.2-desktop-i386.iso
ubuntu-12.04-desktop-i386.iso
ubuntu-14.04.2-desktop-amd64.iso
ubuntu-mate-14.04.2-LTS-desktop-i386.iso
xubuntu-14.04.1-desktop-i386.iso
WARNING: the target device will be wiped and re-partitioned
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat lub14042-32 /media/sudodus/lub14042-32 787M
`-sdd2 ext2 casper-rw /media/sudodus/casper-rw 3G
Go ahead and overwrite /dev/sdd ? (g/q) g
Using 'grub.cfg' in the current directory
Using 'usb-pack_efi' in the current directory
FINAL WARNING: Are you sure /dev/sdd ? (y/n) y
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.162574 s, 6.4 MB/s
---------------------------------------------------------------------------
Use gparted and create an msdos partition table
---------------------------------------------------------------------------
Suggested values, may be changed according to the size of 'multiboot'
/dev/sdd1: file system= fat32 size= 5749 Mibibytes to host grub and iso files
/dev/sdd2: file system= ext2 size=rest of device
======================
libparted : 2.3
======================
fatlabel: warning - lowercase labels might not work properly with DOS or Windows
tune2fs 1.42.9 (4-Feb-2014)
---------------------------------------------------------------------------
source=*.iso
---------------------------------------------------------------------------
UEFI Bootloader: Installing for i386-pc platform.
Installation finished. No error reported.
BIOS Bootloader (maybe complaints) : Installing for i386-pc platform.
Installation finished. No error reported.
Copying files ...
sending incremental file list
./
EFI/
EFI/BOOT/
EFI/BOOT/bootia32.efi
EFI/BOOT/bootx64.efi
boot/
boot/grub/
boot/grub/menu.lst
boot/grub4dos/
boot/grub4dos/g2ldr
boot/grub4dos/grub.exe
boot/memtest/
boot/memtest/memtest.bin
boot/memtest/memtest86+-5.01.bin
sent 2,311,443 bytes received 188 bytes 4,623,262.00 bytes/sec
total size is 2,310,239 speedup is 1.00
mount: block device /mnt/multimed-2/CD/ubuntu/14.04/kubuntu-14.04.2-desktop-amd64.iso is write-protected, mounting read-only
< kubuntu-14.04.2-desktop-amd64.iso pv > /mnt/target/kubuntu-14.04.2-desktop-amd64.iso
1.02GB 0:00:34 [30.4MB/s] [===============================================>] 100%
mount: block device /mnt/multimed-2/test/lubuntu/trusty-desktop-i386.iso is write-protected, mounting read-only
< lubuntu-14.04.2-desktop-i386.iso pv > /mnt/target/lubuntu-14.04.2-desktop-i386.iso
703MB 0:01:24 [8.29MB/s] [===============================================>] 100%
mount: block device /mnt/multimed-2/CD/ubuntu/12.04/ubuntu-12.04-desktop-i386.iso is write-protected, mounting read-only
< ubuntu-12.04-desktop-i386.iso pv > /mnt/target/ubuntu-12.04-desktop-i386.iso
701MB 0:00:46 [15.2MB/s] [===============================================>] 100%
mount: block device /mnt/multimed-2/CD/ubuntu/14.04/ubuntu-14.04.2-desktop-amd64.iso is write-protected, mounting read-only
< ubuntu-14.04.2-desktop-amd64.iso pv > /mnt/target/ubuntu-14.04.2-desktop-amd64.iso
996MB 0:00:59 [16.9MB/s] [===============================================>] 100%
mount: block device /mnt/multimed-2/CD/ubuntu/14.04/ubuntu-mate-14.04.2-LTS-desktop-i386.iso is write-protected, mounting read-only
< ubuntu-mate-14.04.2-LTS-desktop-i386.iso pv > /mnt/target/ubuntu-mate-14.04.2-LTS-desktop-i386.iso
1.05GB 0:02:10 [8.23MB/s] [===============================================>] 100%
mount: block device /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-i386.iso is write-protected, mounting read-only
< xubuntu-14.04.1-desktop-i386.iso pv > /mnt/target/xubuntu-14.04.1-desktop-i386.iso
916MB 0:01:29 [10.3MB/s] [===============================================>] 100%
Syncing the target device ...
The following iso files are found in the target drive:
/mnt/target/kubuntu-14.04.2-desktop-amd64.iso
/mnt/target/lubuntu-14.04.2-desktop-i386.iso
/mnt/target/ubuntu-12.04-desktop-i386.iso
/mnt/target/ubuntu-14.04.2-desktop-amd64.iso
/mnt/target/ubuntu-mate-14.04.2-LTS-desktop-i386.iso
/mnt/target/xubuntu-14.04.1-desktop-i386.iso
---------------------------------------------------------------------------
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat multiboot 8G
`-sdd2 ext2 casper-rw 6G
The target device is ready to use.
'*.iso' was installed
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$
3. Add another iso file to an existing [multi]boot pendrive.
Code:
sudo ./mk-grub-n-iso ~/Downloads/iso/ubuntu-mate-14.04.2-LTS-desktop-i386.iso /dev/sdx
Code:
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso /mnt/multimed-2/CD/ubuntu/14.04/ubuntu-mate-14.04.2-LTS-desktop-i386.iso /dev/sdd
[sudo] password for sudodus:
'/mnt/multimed-2/CD/ubuntu/14.04/ubuntu-mate-14.04.2-LTS-desktop-i386.iso' is identified as the source ISO file
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat multiboot 8G
`-sdd2 ext2 casper-rw /media/sudodus/casper-rw 6G
Go ahead and overwrite /dev/sdd ? (g/q) g
Using 'grub.cfg' in the current directory
Using 'usb-pack_efi' in the current directory
---------------------------------------------------------------------------
Create new system or Add new iso file? (c/a)? a
FINAL WARNING: Are you sure /dev/sdd ? (y/n) y
---------------------------------------------------------------------------
Use gparted to check (and maybe change) the partitions
---------------------------------------------------------------------------
The following iso files are found in the target drive:
kubuntu-14.04.2-desktop-amd64.iso
lubuntu-14.04.2-desktop-i386.iso
ubuntu-12.04-desktop-i386.iso
ubuntu-14.04.2-desktop-amd64.iso
ubuntu-mate-14.04.2-LTS-desktop-i386.iso is already installed.
xubuntu-14.04.1-desktop-i386.iso
Exiting. Add another iso file!
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$ sudo ./mk-grub-n-iso /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso /dev/sdd
'/mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso' is identified as the source ISO file
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat multiboot 8G
`-sdd2 ext2 casper-rw 6G
Go ahead and overwrite /dev/sdd ? (g/q) g
Using 'grub.cfg' in the current directory
Using 'usb-pack_efi' in the current directory
---------------------------------------------------------------------------
Create new system or Add new iso file? (c/a)? a
FINAL WARNING: Are you sure /dev/sdd ? (y/n) y
---------------------------------------------------------------------------
Use gparted to check (and maybe change) the partitions
---------------------------------------------------------------------------
The following iso files are found in the target drive:
kubuntu-14.04.2-desktop-amd64.iso
lubuntu-14.04.2-desktop-i386.iso
ubuntu-12.04-desktop-i386.iso
ubuntu-14.04.2-desktop-amd64.iso
ubuntu-mate-14.04.2-LTS-desktop-i386.iso
xubuntu-14.04.1-desktop-i386.iso
======================
libparted : 2.3
======================
fatlabel: warning - lowercase labels might not work properly with DOS or Windows
tune2fs 1.42.9 (4-Feb-2014)
---------------------------------------------------------------------------
source=/mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso
---------------------------------------------------------------------------
UEFI Bootloader: Installing for i386-pc platform.
Installation finished. No error reported.
BIOS Bootloader (maybe complaints) : Installing for i386-pc platform.
Installation finished. No error reported.
Copying files ...
sending incremental file list
./
EFI/
EFI/BOOT/
boot/grub/
boot/grub4dos/
boot/memtest/
sent 360 bytes received 40 bytes 266.67 bytes/sec
total size is 2,310,239 speedup is 5,775.60
mount: block device /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso is write-protected, mounting read-only
< /mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso pv > /mnt/target/xubuntu-14.04.1-desktop-amd64.iso
930MB 0:01:25 [10.9MB/s] [===============================================>] 100%
Syncing the target device ...
The following iso files are found in the target drive:
/mnt/target/kubuntu-14.04.2-desktop-amd64.iso
/mnt/target/lubuntu-14.04.2-desktop-i386.iso
/mnt/target/ubuntu-12.04-desktop-i386.iso
/mnt/target/ubuntu-14.04.2-desktop-amd64.iso
/mnt/target/ubuntu-mate-14.04.2-LTS-desktop-i386.iso
/mnt/target/xubuntu-14.04.1-desktop-amd64.iso
/mnt/target/xubuntu-14.04.1-desktop-i386.iso
---------------------------------------------------------------------------
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 29.8G
|-sdd1 vfat multiboot 8G
`-sdd2 ext2 casper-rw 6G
The target device is ready to use.
'/mnt/multimed-2/CD/ubuntu/14.04/xubuntu-14.04.1-desktop-amd64.iso' was installed
sudodus@xw8400:/mnt/andre/grub-n-iso_multiboot$
4. Create a portable system with a small footprint with a potential for isotesting
This demo example features a new version of mk-grub-n-iso.
i. The FAT32 boot partition is very small, and the iso files reside in an own partition will the ext4 file system, which is better when we expect to update these files during isotesting.
ii. The sizes of the partitions do not match the recommended values. The isodevice partition is big, 5GB, to host several iso files. The whole pendrive is not used, because the system is prepared for a compressed image file, that should fit in a (slightly undersized) 8 GB pendrive (7,8 GB ~7.26 Gibibytes). Normally you should use the whole pendrive. See the attached screenshot, attachment #5.
iii. There are additional tools, that come with the system in order to manage the iso files. links2check help managing the daily iso files, to install those you want and keep them up to date. mkusb-nox is an alternative to make another USB boot drive for Ubuntu-Server and Lubuntu Alternate, which cannot boot via 'grub-n-iso'.
iv. When installed and running from the 'grub-n-iso' pendrive, change directory to '/isodevice' and run 'links2check'
Code:
$ sudo -H ./links2check
Code:
sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd isotest
Code:
sudodus@xw8400:/mnt/multimed-2/test/grub-n-iso/andre$ sudo ./mk-grub-n-iso lubuntu-14.04.2-desktop-i386.iso /dev/sdd isotest
'lubuntu-14.04.2-desktop-i386.iso' is identified as the source ISO file
---------------------------------------------------------------------------
links2check: iso files of the current developing version can be managed
(downloaded and upgraded) in a multi-boot type pendrive.
Select a stable system (released version) to have a working system
even if the developing version is broken for a period of time!
When installed and running from the 'grub-n-iso' pendrive,
change directory to '/isodevice' and run 'links2check'
sudo -H ./links2check
---------------------------------------------------------------------------
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14.6G
|-sdd1 vfat lub14042-32 64M
|-sdd2 ext4 isodevice 5G
`-sdd3 ext4 casper-rw 2.2G
Go ahead and overwrite /dev/sdd ? (g/q) g
Using 'grub.cfg' in the current directory
Using 'usb-pack_efi' in the current directory
---------------------------------------------------------------------------
Create new system or Add new iso file? (c/a)? c
FINAL WARNING: Are you sure /dev/sdd ? (y/n) y
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.16773 s, 6.3 MB/s
---------------------------------------------------------------------------
Use gparted and create an msdos partition table
---------------------------------------------------------------------------
Suggested values, may be changed according to the size of
lubuntu-14.04.2-desktop-i386.iso
/dev/sdd1: file system= fat32 size= 64 Mibibytes for the grub files
/dev/sdd2: file system= ext4 size= 787 Mibibytes or more* for iso files
/dev/sdd3: file system= ext4 size=the rest of device for persistence
*) If you want to update the iso file here, you should have space for a
temporary iso file while updating, so approximately an extra Gibibyte.
You might also reserve space for installing more iso files later on.
======================
libparted : 2.3
======================
Information: You may need to update /etc/fstab.
fatlabel: warning - lowercase labels might not work properly with DOS or Windows
tune2fs 1.42.9 (4-Feb-2014)
tune2fs 1.42.9 (4-Feb-2014)
tune2fs 1.42.9 (4-Feb-2014)
---------------------------------------------------------------------------
source=lubuntu-14.04.2-desktop-i386.iso
---------------------------------------------------------------------------
UEFI Bootloader: Installing for i386-pc platform.
Installation finished. No error reported.
BIOS Bootloader: Installing for i386-pc platform.
Installation finished. No error reported.
Copying files ...
sending incremental file list
./
EFI/
EFI/BOOT/
EFI/BOOT/bootia32.efi
EFI/BOOT/bootx64.efi
boot/
boot/grub/
boot/grub/menu.lst
boot/grub4dos/
boot/grub4dos/g2ldr
boot/grub4dos/grub.exe
boot/memtest/
boot/memtest/memtest.bin
boot/memtest/memtest86+-5.01.bin
sent 2,311,447 bytes received 188 bytes 4,623,270.00 bytes/sec
total size is 2,310,239 speedup is 1.00
mount: block device /mnt/multimed-2/CD/ubuntu/14.04/lubuntu-14.04.2-desktop-i386.iso is write-protected, mounting read-only
'grub.cfg' -> '/tmp/isotrg/grub.cfg'
'links2check' -> '/tmp/isotrg/links2check'
'mkusb-nox' -> '/tmp/isotrg/mkusb-nox'
< lubuntu-14.04.2-desktop-i386.iso pv > /tmp/isotrg/lubuntu-14.04.2-desktop-i386.iso
703MB 0:00:14 [48.8MB/s] [=====================================================>] 100%
Syncing the target device ...
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14.6G
|-sdd1 vfat lub14042-32 64M
|-sdd2 ext4 isodevice 5G
`-sdd3 ext4 casper-rw 2.2G
The target device is ready to use.
'lubuntu-14.04.2-desktop-i386.iso' was installed
When installed and running from the 'grub-n-iso' pendrive,
change directory to '/isodevice' and run 'links2check'
sudo -H ./links2check
sudodus@xw8400:/mnt/multimed-2/test/grub-n-iso/andre$
F. System requirements
1. Host system
An Ubuntu family operating system of version 14.04 LTS or newer.
It is possible to use Ubuntu 12.04 LTS too, but it has an older version of grub, and it can only make pendrives that boot in BIOS mode. Other linux distros are not tested.
Current LTS systems:
- Ubuntu 14.04 has grub version 2.02~beta2-9ubuntu1 and makes systems that work in UEFI mode and BIOS mode
- Ubuntu 12.04 has grub version 1.99-21ubuntu3.17 and makes systems that work in BIOS mode
- Example: HP Elitebook 8560p is typical of 'middle-aged to newer' HP professional class laptops that 'are difficult to boot from USB via grub'. Booting from grub2 works with the version of grub that comes with Ubuntu 14.04 LTS, but only when the boot flag is added to the partition.
2. The installer 'mk-grub-n-iso' uses bash and built-in commands.
'gparted' is used to create and edit partitions and create file systems. There must be a graphical mode for gparted to work.
Code:
sudo apt-get install gparted
You may appreciate the improved feedback during the copying process with 'pv'.
Code:
sudo apt-get install pv
3. Computer
'mk-grub-n-iso' does not need much computing power or RAM. It is possible to use 32-bit as well as 64-bit PCs (with Intel or AMD processors).
4. Target system
Automatic configuring for current Ubuntu family desktop iso files. Ubuntu 12.04 LTS works well as target system.
Manual configuring (creating the menuentries) using for example this link
https://wiki.archlinux.org/index.php...boot_USB_drive
5. Target computer
The target computers, where grub-n-iso_multiboot pendrives can run, include BIOS and UEFI mode, 32-bit and 64-bit hardware, 32-bit and 64-bit operating systems.
The system created by demo run 1:
Code:
sudo ./mk-grub-n-iso ~/Downloads/iso/lubuntu-14.04.2-desktop-i386.iso /dev/sdx
can boot most PCs.
- There is a hardware limit. The computer may be too weak to boot a current version of Lubuntu, or there is some hardware, for example graphics chip, where the available drivers do not work. But then it is possible to include iso files for other linux distros.
- Another limit is where the system is so locked down by a non-standard UEFI system, that nothing but Windows works.
Bookmarks