Skip to content

Commit 05a714e

Browse files
author
Masa
committed
Fixed chroot2iso, added screenshots
1 parent c89dbd4 commit 05a714e

File tree

3 files changed

+8
-17
lines changed

3 files changed

+8
-17
lines changed

chroot2iso.sh

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# chroot2iso.sh (Custom Debian live environment scripts) 0.0.1
3+
# chroot2iso.sh (Custom Debian live environment scripts) 0.1.0
44
#
55
# Copyright (C) 2018 masakoodaa
66
# License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
@@ -43,7 +43,7 @@ More information availabe at https://github.com/masakoodaa/custom-debian-live-en
4343
}
4444

4545
show_version() {
46-
echo "chroot2iso.sh (Custom Debian live environment scripts) 0.0.1
46+
echo "chroot2iso.sh (Custom Debian live environment scripts) 0.1.0
4747
Copyright (C) 2018 masakoodaa
4848
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
4949
This is free software: you are free to change and redistribute it.
@@ -97,7 +97,7 @@ while :; do
9797
--install-dependencies)
9898
installdeps=true
9999
;;
100-
-m|--outputfile)
100+
-o|--outputfile)
101101
if [ "$2" ]
102102
then
103103
outputfile="$2"
@@ -135,7 +135,7 @@ while :; do
135135
break
136136
;;
137137
-?*)
138-
abort 'Unknown option. See \"--help\" for help or \"--usage\" for usage.'
138+
abort 'Unknown option. See "--help" for help or "--usage" for usage.'
139139
;;
140140
*)
141141
break
@@ -147,8 +147,7 @@ done
147147
# make sure we are root & good to go
148148
if [ "$EUID" -ne 0 ]
149149
then
150-
echo "Missing root privileges. Aborting."
151-
exit 1
150+
abort 'Missing root privileges. Aborting.'
152151
fi
153152

154153
dependencies="chroot debootstrap syslinux isolinux squashfs-tools genisoimage memtest86+ rsync"
@@ -208,7 +207,7 @@ set -e
208207
set -u
209208

210209
echo "Compressing the chroot environment into a Squash filesystem..."
211-
#mksquashfs "$workdir"/chroot "$workdir"/image/live/filesystem.squashfs -e boot
210+
mksquashfs "$workdir"/chroot "$workdir"/image/live/filesystem.squashfs -e boot
212211

213212
echo "Preparing the bootloader..." #TODO: check that there's only one of each
214213
cp "$workdir"/chroot/boot/vmlinuz-* "$workdir"/image/live/vmlinuz1
@@ -239,16 +238,8 @@ label memtest86+
239238
menu label ^Memory Failure Detection (memtest86+)
240239
kernel /live/memtest" > "$workdir"/image/isolinux/isolinux.cfg
241240

242-
echo "Copying files..." #TODO: refactor into loop?
243-
cp /usr/lib/ISOLINUX/isolinux.bin "$workdir"/image/isolinux/
244-
cp /usr/lib/syslinux/modules/bios/menu.c32 "$workdir"/image/isolinux/
245-
cp /usr/lib/syslinux/modules/bios/hdt.c32 "$workdir"/image/isolinux/
246-
cp /usr/lib/syslinux/modules/bios/ldlinux.c32 "$workdir"/image/isolinux/
247-
cp /usr/lib/syslinux/modules/bios/libutil.c32 "$workdir"/image/isolinux/
248-
cp /usr/lib/syslinux/modules/bios/libmenu.c32 "$workdir"/image/isolinux/
249-
cp /usr/lib/syslinux/modules/bios/libcom32.c32 "$workdir"/image/isolinux/
250-
cp /usr/lib/syslinux/modules/bios/libgpl.c32 "$workdir"/image/isolinux/
251-
cp /usr/share/misc/pci.ids "$workdir"/image/isolinux/
241+
echo "Copying files..."
242+
cp /usr/lib/ISOLINUX/isolinux.bin /usr/lib/syslinux/modules/bios/{menu,hdt,ldlinux,lib{util,menu,com32,gpl}}.c32 /usr/share/misc/pci.ids -t "$workdir"/image/isolinux/
252243
cp /boot/memtest86+.bin "$workdir"/image/live/memtest
253244

254245
echo "Generating USI image..."

screenshots/qemu-1.png

6.47 KB
Loading

screenshots/qemu-2.png

13.8 KB
Loading

0 commit comments

Comments
 (0)