diff --git a/copy_to_final.sh b/copy_to_final.sh index c5b971c..f82770e 100755 --- a/copy_to_final.sh +++ b/copy_to_final.sh @@ -13,3 +13,11 @@ cp deb/*.deb ${CHROOT_PATH}/ # prepare fs archive tar -cvpzf backup.tar.gz -C fs/ . tar -xzfv backup.tar.gz -C ${CHROOT_PATH}/ + +sudo dd bs=4M if=FINAL_2013-02-09-wheezy-raspbian.img of=/dev/sdd + +# /!\ always try to mount the root partition on the SD, it is usually brocken. +# if it is, use fdisk to remove the second partition and recreate it +# if you run rasp-config at least once, you will see the script running in case +# you have a screen connected. + diff --git a/fs/etc/rc.local b/fs/etc/rc.local index bd27260..68f0d11 100755 --- a/fs/etc/rc.local +++ b/fs/etc/rc.local @@ -19,7 +19,8 @@ fi if [ -e /dev/sda ]; then if [ -e /dev/sdb ]; then - /opt/groomer/init.sh + cd /opt/groomer + ./init.sh /sbin/shutdown -h now fi fi diff --git a/fs/opt/groomer/init.sh b/fs/opt/groomer/init.sh index fb95aff..59e1141 100755 --- a/fs/opt/groomer/init.sh +++ b/fs/opt/groomer/init.sh @@ -12,7 +12,7 @@ fi clean(){ echo Done, cleaning. - mount -o remount,rw / + #mount -o remount,rw / ${SYNC} # shutdown -h now } @@ -20,7 +20,9 @@ clean(){ trap clean EXIT TERM INT # Remount the root filesystem in RO mode -mount -o remount,ro / +#mount -o remount,ro / + +chown -R kitten:kitten /home/${USERNAME}/ su ${USERNAME} -c ./groomer.sh diff --git a/proper_chroot.sh b/proper_chroot.sh index e15c12f..31edc0f 100755 --- a/proper_chroot.sh +++ b/proper_chroot.sh @@ -4,8 +4,8 @@ if [ "$(id -u)" != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi -ls /usr/bin/qemu*arm* > /dev/null 2>&1 -if [ ! -e ${?} ]; then +ls /usr/bin/qemu*arm* +if [ -z $? ]; then echo "You need qemu user static binaries." 1>&2 exit 1 fi