iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
various fixes and improvements
[automated-distro-installer]
/
arch-pxe
diff --git
a/arch-pxe
b/arch-pxe
index e480b5d7173ebb8d1c0dc639494c9180d18a19b9..52885b32138928b9330c941396a4c4f655482f96 100755
(executable)
--- a/
arch-pxe
+++ b/
arch-pxe
@@
-27,7
+27,8
@@
Usage: ${0##*/}
Setup arch pxe boot server from the base image
Requires manually downloading image. Image path is hardcoded below to
Setup arch pxe boot server from the base image
Requires manually downloading image. Image path is hardcoded below to
-/a/opt/image_name. Run pxe-server HOST|default arch to enable it.
+/a/opt/image_name without .iso on the end. adjust the code for a new image. After this, run pxe-server.
+HOST|default arch to enable it.
-h|--help Print help and exit.
EOF
-h|--help Print help and exit.
EOF
@@
-42,11
+43,16
@@
esac
x="$(readlink -f "$BASH_SOURCE")"
script_dir="${x%/*}"
cd /a/opt
x="$(readlink -f "$BASH_SOURCE")"
script_dir="${x%/*}"
cd /a/opt
-iso="archlinux-2017.02.01-dual"
-sfs=$iso/arch/x86_64/airootfs.sfs
+iso="parabola-systemd-cli-x86_64-netinstall-2017.10.18-00.07-alpha"
rm -rf $iso
ex $iso.iso
rm -rf $iso
ex $iso.iso
-sed -i --follow-symlinks -f - $iso/arch/boot/syslinux/archiso_pxe64.cfg <<EOF
+n=parabola
+if [[ ! -e $iso/parabola ]]; then
+ n=arch
+fi
+sfs=$iso/$n/x86_64/*.sfs
+
+sed -i --follow-symlinks -f - $iso/$n/boot/syslinux/${n}iso_pxe64.cfg <<EOF
1itotaltimeout 1
/^LABEL arch64_nfs/a menu default
s/^APPEND .*/\0 script=arch-iso-init/
1itotaltimeout 1
/^LABEL arch64_nfs/a menu default
s/^APPEND .*/\0 script=arch-iso-init/
@@
-64,7
+70,7
@@
s cp $script_dir/arch-iso-init squashfs-root/root
s rm $sfs
s mksquashfs squashfs-root $sfs -comp xz
# file transfer to wrt is slow, so remove some useless files
s rm $sfs
s mksquashfs squashfs-root $sfs -comp xz
# file transfer to wrt is slow, so remove some useless files
-rm
$iso/arch/i686/airootfs.sfs $iso/arch/boot/i686/arch
iso.img
+rm
-f $iso/$n/i686/airootfs.sfs $iso/$n/boot/i686/${n}
iso.img
pushd $(dirname $sfs); md5sum ${sfs##*/} > airootfs.md5; popd
# seems if you've done a pxe boot, mounted the nfs,
pushd $(dirname $sfs); md5sum ${sfs##*/} > airootfs.md5; popd
# seems if you've done a pxe boot, mounted the nfs,