From 14f76a044bb9471122b304704ab204ddbbc10aba Mon Sep 17 00:00:00 2001 From: themighty1 Date: Mon, 17 Jan 2022 10:07:14 +0300 Subject: [PATCH] update install instructions --- INSTALL | 3 ++- make_oracle.sh | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 251e597..e63c0e6 100644 --- a/INSTALL +++ b/INSTALL @@ -4,7 +4,8 @@ HOW TO CREATE A PAGESIGNER ORACLE INSTANCE. In N.Virginia region launch a t3a.micro instance and attach to it a volume created from snap-0c97f1c43c6bb2043 (used by Ubuntu 20.04 LTS ami-083654bd07b5da81d). -Log into the instance and run: +Log into the instance and run: +sudo apt update && sudo apt install liblz4-tool git clone --recurse-submodules https://github.com/tlsnotary/pagesigner-oracles cd pagesigner-oracles sudo ./make_oracle.sh diff --git a/make_oracle.sh b/make_oracle.sh index 7ab11dc..63d673b 100755 --- a/make_oracle.sh +++ b/make_oracle.sh @@ -15,6 +15,11 @@ if [ "$#" -eq 1 ]; then fi else count=$(blkid | grep $uuid | wc -l) + if [ $count == 0 ]; then + echo "a disk with uuid $uuid was not detected" + echo "please attach it first and rerun" + exit 1 + fi if [ $count != 1 ]; then echo "more than one disk with uuid $uuid detected" echo "please specify explicitely what disk you'd like to modify, e.g:" @@ -67,8 +72,8 @@ sed -i 's/- ssh//' $DISK/etc/cloud/cloud.cfg # unpack initrd, add our custom script and repack tmp=$(mktemp -d) -dd if=/boot/initrd.img-5.11.0-1020-aws of=$tmp/microcode bs=512 count=9066 -dd if=/boot/initrd.img-5.11.0-1020-aws of=$tmp/initrd_old bs=512 skip=9066 +dd if=$DISK/boot/initrd.img-5.11.0-1020-aws of=$tmp/microcode bs=512 count=9066 +dd if=$DISK/boot/initrd.img-5.11.0-1020-aws of=$tmp/initrd_old bs=512 skip=9066 mkdir $tmp/cpio && (unlz4 | cpio -i -D $tmp/cpio) < $tmp/initrd_old cp initrd/custom $tmp/cpio/scripts/init-premount/custom echo '/scripts/init-premount/custom "$@"' >> $tmp/cpio/scripts/init-premount/ORDER