diff --git a/files/bootlocal.sh b/files/bootlocal.sh index 10c44f44f67fd6e067d94e47fe8c6206ea9d5a23..eb3918ce95b666f6f3e1cd54b75ad4d4e7a0d0c8 100644 --- a/files/bootlocal.sh +++ b/files/bootlocal.sh @@ -27,7 +27,8 @@ chmod 755 / installTcPackages bash parted bc ntfs-3g dosfstools # workaround for limited availability of btrfs-progs and reiserfsprogs -if [ uname -m -eq x86_64 ] +architecture=$(uname -m) +if [ "${architecture}" == "x86_64" ] then installTcPackages btrfs-progs else installTcPackages reiserfsprogs fi @@ -36,11 +37,13 @@ fi installTcPackages kmaps util-linux loadkmap </usr/share/kmap/qwertz/de-latin1-nodeadkeys.kmap +echo "create target directory" mkdir /target chmod 0755 /target -# include install.sh -. ./installer.sh | tee >> /tmp/installer.logfile +# run install.sh +echo "switch to bash and run installer" +bash ./installer.sh | tee >> /tmp/installer.logfile mkdir -p /target/etc/ssh/ chmod 0755 /target/etc/ssh/ @@ -50,8 +53,10 @@ cp /opt/ansible.pub /target/etc/ssh/authorized_keys chmod 0644 /target/etc/ssh/authorized_keys chown 0:0 /target/etc/ssh/authorized_keys -cp /tmp/fstab /etc/fstab -chmod 0644 /etc/fstab -chown 0:0 /etc/fstab +cp /tmp/fstab.target /target/etc/fstab +chmod 0644 /target/etc/fstab +chown 0:0 /target/etc/fstab -echo "installer finished" +sync + +echo "installer finished, logfile: /tmp/installer.logfile" diff --git a/files/installer.sh b/files/installer.sh index e9d6341ebbc6454f2f3ed8d06ecf492824506072..0ec2c60e9708114f5d35e3467a4f1f74344866b8 100755 --- a/files/installer.sh +++ b/files/installer.sh @@ -3,13 +3,30 @@ # include functions.sh again, thins it is a new environment . ./functions.sh -# include diskpreperation.sh -. ./diskpreperation.sh +# include diskspreparation.sh +echo "run disks preparation" +. ./diskspreparation.sh +echo "run disks preparation finished" + +# append local fstab, possible problems with outomount included in tinycore +cat /tmp/fstab.local >> /etc/fstab + +# inform kernel about changes +sync +sleep 2 +partprobe +sleep 2 + +# mount all unmounted file systems +mount -a +echo "mounting file systems" # include runinstaller.sh if it exists if [ -f runinstaller.sh ] + then + echo "run installer" . ./runinstaller.sh + echo "run installer finished" else echo "file runinstaller.sh not found" fi -