Browse Source

expanded readme and cleaned scripts

master
Roel 10 years ago
parent
commit
3c71c68d70
  1. 27
      lazyinstall/README.md
  2. 21
      lazyinstall/fstab_extroot
  3. 4
      lazyinstall/lazyinstall1.sh
  4. 5
      lazyinstall/lazyinstall2.sh

27
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: wireless file:
line 11,the wireless SSID that the router will get 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!

21
lazyinstall/fstab_extroot

@ -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

4
lazyinstall/lazyinstall1.sh

@ -17,7 +17,7 @@ mount -t ext4 /dev/sda1 /mnt/sda1
echo 'Cleaning USB drive' echo 'Cleaning USB drive'
rm -r /mnt/sda1/ rm -r /mnt/sda1/*
sleep 4 sleep 4
@ -25,7 +25,7 @@ echo 'Copying filesystem to USB drive'
mkdir -p /tmp/cproot mkdir -p /tmp/cproot
mount --bind / /tmp/cproot mount --bind / /tmp/cproot
sleep 1 sleep 1
tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1 -xf - tar -C /tmp/cproot -cvf - . | tar -C /mnt/sda1/ -xf -
sleep 1 sleep 1
umount /tmp/cproot umount /tmp/cproot

5
lazyinstall/lazyinstall2.sh

@ -8,7 +8,8 @@ echo 'You should review the settings of "wireless" and "network"'
mkswap /dev/sda2 mkswap /dev/sda2
swapon /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' 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 opkg install python git
sleep 1 sleep 1
git clone ://github.com/rscmbbng/meshenger /root/meshenger git clone git://github.com/rscmbbng/meshenger /root/meshenger
mv uhttpd /etc/config/uhttpd mv uhttpd /etc/config/uhttpd

Loading…
Cancel
Save