How can I extend the life of my SD card?
I run 2 commands in sudo su mode, and restart my pi.
What I run:
# swapoff --all
# apt-get remove dphys-swapfile
# reboot
After that, I notice that I can't access to SSH and anything. So I connect to a monitor, pull out/plug in, and the messages says:
[ok] Setting kernel variables .done.
[.....] Configuring network interfaces...
^ THIS TAKE EXTREMELY LONG TIME. And this won't be finished. Just blinking "_". Nothing happened, and I still can't access to anything.
"Configuring network interfaces" stuck I suspect /etc/network/interfaces. I add a line pre-up bash /pifolder/reloadip.sh (Sorry, I forget what I write. But I'm sure reboot works good untill I try swap issue!) ^ This .sh writes tons of IP ranges to iptables.
So, what should I do? I don't want to lose data/config... How can I stop "Configuring network interfaces", so I can install dphys-swapfile again... ( And what command should I run to return back? apt-get install dphys-swapfile only? )
Type B box of Raspbian.
> How big is your reloadip.sh script?
I'm not sure, because it's blocklist.txt is in the pi, and I don't have a backup.
It contains China,Korea,Taiwan,Russia,and other 3 countries. Full range, CIDR format.
> Have you tried running it manually or in post-up?
Of course. Before I try those "swap-remove" commands,
I can do:
# bash reloadip.sh (complete takes about 40 minutes)
# reboot (with no problem)
And I add it in /etc/network/interfaces, to make pi to run reloadip.sh on startup.
I already test it many times, and several weeks passed.
I'm 100% sure that these SWAP-remove command make this thing worse ;(
2 hours has passed since I put the power on... Still showing config netw interfaces.
reloadip.sh
script? Have you tried running it manually or in post-up? – foibs Jan 17 '14 at 12:26