diff --git a/lazyinstall/README.md b/lazyinstall/README.md index 6ff2707..2e4ebab 100644 --- a/lazyinstall/README.md +++ b/lazyinstall/README.md @@ -16,4 +16,31 @@ lines 11 and 13, the ip adress you want to use plus the ip adress of the gateway wireless file: line 11,the wireless SSID that the router will get +Once you've set all of this up copy the lazyinstall directory to your open-wrt router: + scp -r /path/to/meshenger/lazyinstall/ root@target.router.ip.adress:~/ + +ssh into the target router: + + ssh root@target.router.ip.address + +navigate to where you copied the lazyinstall directory: + cd ~/lazyinstall + +first execute lazyinstall1, it will set up the ext_root on ths usb drive + + ./lazyinstall1.sh + +once that's done reboot the router: + + reboot -f + +once it is up again, ssh back in. the router has now booted from the external usb drive. you can verify that by doing: + + df -h + +which should show you that rootfs is the size of your external usb drive + +run lazyinstall2. this will copy all the config files, download python and git and clone the meshenger project. This can take a while. + +After this is done you can reboot and you will have a fully functioning meshenger node! diff --git a/lazyinstall/fstab_extroot b/lazyinstall/fstab_extroot deleted file mode 100644 index 745b760..0000000 --- a/lazyinstall/fstab_extroot +++ /dev/null @@ -1,21 +0,0 @@ -#/etc/config/fstab from Meshenger project - -config global automount - option from_fstab 1 - option anon_mount 1 - -config global autoswap - option from_fstab 1 - option anon_swap 0 - -config mount - option target / - option device /dev/sda1 - option fstype ext4 - option options rw,sync - option enabled 1 - option enabled_fsck 0 - -config swap - option device /dev/sda2 - option enabled 1 diff --git a/lazyinstall/lazyinstall1.sh b/lazyinstall/lazyinstall1.sh index c5224ad..3f06617 100755 --- a/lazyinstall/lazyinstall1.sh +++ b/lazyinstall/lazyinstall1.sh @@ -17,7 +17,7 @@ mount -t ext4 /dev/sda1 /mnt/sda1 echo 'Cleaning USB drive' -rm -r /mnt/sda1/ +rm -r /mnt/sda1/* sleep 4 @@ -25,7 +25,7 @@ echo 'Copying filesystem to USB drive' mkdir -p /tmp/cproot mount --bind / /tmp/cproot sleep 1 -tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf - +tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1/ -xf - sleep 1 umount /tmp/cproot diff --git a/lazyinstall/lazyinstall2.sh b/lazyinstall/lazyinstall2.sh index d9cd6da..18569b5 100755 --- a/lazyinstall/lazyinstall2.sh +++ b/lazyinstall/lazyinstall2.sh @@ -8,7 +8,8 @@ echo 'You should review the settings of "wireless" and "network"' mkswap /dev/sda2 swapon /dev/sda2 -mv fstab_extroot /etc/config/fstab +head -n -1 /etc/config/fstab > fstab_temp; echo '\toption enable 1' >> fstabt; mv fstab_temp /etc/config/fstab + echo 'Configuring wireless and hotspot' @@ -32,7 +33,7 @@ sed -i -e "s/option 'interfaces' 'mesh'/option 'interfaces' 'adhoc0'/g" /etc/con opkg install python git sleep 1 -git clone ://github.com/rscmbbng/meshenger /root/meshenger +git clone git://github.com/rscmbbng/meshenger /root/meshenger mv uhttpd /etc/config/uhttpd