diff options
author | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-12-20 15:09:49 +0100 |
---|---|---|
committer | Ludovic Pouzenc <ludovic@pouzenc.fr> | 2016-12-20 15:09:49 +0100 |
commit | f02721cfe244b98aa44176d196f2fdbeb311c5ae (patch) | |
tree | 12874f157b1e19c7ddbdd784aad3b53edcaa0e51 | |
parent | 103f3f3dd8d46d6e13144d487794732ef5018ae7 (diff) | |
download | eficast-f02721cfe244b98aa44176d196f2fdbeb311c5ae.tar.gz eficast-f02721cfe244b98aa44176d196f2fdbeb311c5ae.tar.bz2 eficast-f02721cfe244b98aa44176d196f2fdbeb311c5ae.zip |
Some bugfixes : partclone -N (thanks to Ed.Budo), rm BOOTX64.EFI because libvirt chown it, uftp -I as workaround for "address already in use"
-rwxr-xr-x | make-boot-image.sh | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/make-boot-image.sh b/make-boot-image.sh index 30b4462..c7e1384 100755 --- a/make-boot-image.sh +++ b/make-boot-image.sh @@ -227,9 +227,10 @@ fi # Initial Ram Disk building (embed in kernel) # ############################################### if [ ! -d "$WORKDIR/initrd" ] -then mkdir -p "$WORKDIR/initrd/"{bin,dev,etc,mnt,root,proc,root,sbin,sys,run/lock,tmp,var} +then mkdir -p "$WORKDIR/initrd/"{bin,dev,etc,mnt,root,proc,root,sbin,sys,run/lock,run/uftpd,tmp,var/log} $ROOTCMD cp -a /dev/{null,console,tty1} "$WORKDIR/initrd/dev/" $ROOTCMD chmod 1777 "$WORKDIR/initrd/run/lock" + ln -s "/proc/mounts" "$WORKDIR/initrd/etc/mtab" ln -s "../run" "$WORKDIR/initrd/var/run" ln -s "../run/lock" "$WORKDIR/initrd/var/lock" fi @@ -259,6 +260,7 @@ then ( mkchroot "$WORKDIR/initrd" /usr/sbin/partclone* efibootmgr gdisk udp-receiver # Some dyn-loaded libraries (ldd will not display them) mkchroot "$WORKDIR/initrd" /lib/x86_64-linux-gnu/libusb-1.0.so.0 + cp -r /lib/terminfo "$WORKDIR/initrd/lib/" ) fi @@ -359,8 +361,10 @@ machine_info() { network_show() { ip -o addr show | sed -ne 's/[0-9]*:\s*\(\S*\)\s*inet6*\s\(\S*\)\s.*$/\1: \2/p' } + start_uftpd() { - uftpd -q -B 2097152 -x2 -F /run/uftpd.csv -L /run/uftpd.log -T /tmp -D /run/uftpd # -M ff02::1:2:3 -P ff02::4:5:6 Marche pas ??? + # -I workaround bug "address already in use" + uftpd -q -B 2097152 -x2 -F /run/uftpd.csv -L /run/uftpd.log -T /tmp -D /run/uftpd -M ff02::42 -I 2/6 [ $? -eq 0 ] && netstat -nlu | grep -q ':1044 ' && echo -e '\033[42m' ----- UFTPD ready ----- '\033[40m' } EOF @@ -388,7 +392,7 @@ mount -o remount -o size=80% / loadkmap < /etc/keys.bmap || rescue_shell # Starting sinkdo trojan on tty2 (feed data to uploaded scripts via uftp) -mkdir /run/uftpd && tty_prog 2 sinkdo /run/uftpd /run/sink & +tty_prog 2 sinkdo /run/uftpd /run/sink & # Start some debug shells (background) for i in 3 4 5 6; do tty_prog $i sh & done @@ -520,6 +524,7 @@ chmod +x "$WORKDIR/initrd/bin/sinkdo" # Copy / run result EFI file # ############################## +[ -f "$OUTDIR/BOOTX64.EFI" ] && rm -f "$OUTDIR/BOOTX64.EFI" cp "$WORKDIR/kernel/arch/x86/boot/bzImage" "$OUTDIR/BOOTX64.EFI" if [ -n "$OUTUSB" -a -b "$OUTUSB" ] |