Skip to content

Commit

Permalink
update install instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
themighty1 committed Jan 17, 2022
1 parent adfc6e9 commit 14f76a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions make_oracle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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:"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 14f76a0

Please sign in to comment.