This repository was archived by the owner on Jul 7, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ if [ $( id -u) != 0 ]; then
4+ echo " $0 script need to run as root!"
5+ exit 1
6+ fi
7+
8+ trap " exit 1" SIGHUP SIGINT SIGQUIT SIGTERM
9+
10+ LIN_VER=1.0.0
11+
12+ CWD=$PWD
13+ WDIR=/tmp/lx4uiso
14+ ISOLINUXDIR=$CWD /livecd/isolinux
15+ DISTRONAME=" Lx4u"
16+ LABEL=Lx4uLiveCD
17+ LIN_ROOT=/mnt/lin
18+ OUTPUT=Lx4u-$LIN_VER -livecd.iso
19+
20+ isolinux_files=" chain.c32 isolinux.bin ldlinux.c32 libutil.c32 reboot.c32 menu.c32
21+ isohdpfx.bin isolinux.cfg libcom32.c32 poweroff.c32"
22+
23+ rm -rf $WDIR
24+ mkdir -pv $WDIR
25+
26+ # prepare isolinux in working dir
27+ mkdir -p $WDIR /{filesystem,isolinux,boot}
28+ for file in $isolinux_files ; do
29+ cp $ISOLINUXDIR /$file $WDIR /isolinux
30+ done
31+ echo " $DISTRONAME " > $WDIR /isolinux/linuxlive
32+ [ -d livecd/virootfs ] && cp -aR livecd/virootfs $WDIR
33+
34+ cp $LIN_ROOT /boot/vmlinuz-* $WDIR /boot/vmlinuz
35+ # cp $LIN_ROOT/boot/initrd-*-lfs.img $WDIR/boot/initrd
36+
37+ mksquashfs $LIN_ROOT $WDIR /filesystem/root.sfs \
38+ -b 1048576 -comp xz -Xdict-size 100% \
39+ -e $LIN_ROOT /tools/ \
40+ -e $LIN_ROOT /tmp/*
41+
42+ rm -f $OUTPUT
43+ xorriso -as mkisofs \
44+ -r -J -joliet-long \
45+ -l -cache-inodes \
46+ -isohybrid-mbr $ISOLINUXDIR /isohdpfx.bin \
47+ -partition_offset 16 \
48+ -volid " $LABEL " \
49+ -b isolinux/isolinux.bin \
50+ -c isolinux/boot.cat \
51+ -no-emul-boot \
52+ -boot-load-size 4 \
53+ -boot-info-table \
54+ -o $OUTPUT \
55+ $WDIR
56+
57+ rm -fr $WDIR
You can’t perform that action at this time.
0 commit comments