On Fri, Oct 16, 2009 at 7:54 PM, Joachim Ott &lt;<a href="mailto:jo.omsl@googlemail.com">jo.omsl@googlemail.com</a>&gt; wrote:<br>&gt; 2009/10/12 Gabor Laszlo &lt;<a href="mailto:glaszlo@gmail.com">glaszlo@gmail.com</a>&gt;:<br>
&gt;&gt; I also finetuned my post-flash setup and install scripts, so<br>&gt;&gt; reflashing, updating and getting all my settings back is a matter of a<br>&gt;&gt; few commands and an hour&#39;s thumb-twiddling. If anyone is interested I<br>
&gt;&gt; can post them.<br>&gt;<br>&gt; Yes, I&#39;d like to look at that script. Actually I&#39;d like 2 scripts, one<br>&gt; to save my changes I made to system files on the FR to the desktop pc<br>&gt; and the other script to merge this changes to a newly flashed system.<br>
<br>Well, I have all personal data on a flash card, including the scripts, so after a reflash I just need to call /media/mmcblk0/setup.sh in the terminal. Note that I moved Maps, Music, and Books to /media/card/home. Here&#39;s the script:<br>
### start setup.sh<br><br>#!/bin/sh<br>echo &quot;# Set card device name&quot;<br>sed -i -e &#39;s/mmcblk0p1/mmcblk0/&#39; /etc/fstab<br>grep card /etc/fstab<br>mount /media/card<br>mount |grep card<br><br>echo &quot;# Relink home&quot;<br>
cd /media/card/home<br>for i in $(ls -a); do rm -rf ~/$i; done<br>cd<br># link Books      .FBReader  Maps       .mplayer   Music      .navit     .purple    .ssh       .tangogps<br>ln -s /media/card/home/* .<br>ln -s /media/card/home/.* .<br>
<br>echo &quot;# Configure network&quot;<br>sed -i -e &#39;s/192\.168\.0/192\.168\.1/g&#39; /etc/network/interfaces<br>/etc/init.d/networking restart<br>ifconfig usb0<br><br>killall dropbear &amp;&amp; dropbear<br><br>echo &quot;# Set timezone&quot;<br>
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime<br><br>echo &quot;# Resume speedup&quot;<br>cat &gt; /etc/init.d/resumespeedup &lt;&lt; EOF<br>#!/bin/sh<br>/sbin/klogd -c 1<br>EOF<br><br>chmod +x /etc/init.d/resumespeedup<br>
ln -s ../init.d/resumespeedup /etc/rc1.d/S06resumespeedup<br>ln -s ../init.d/resumespeedup /etc/rc2.d/S06resumespeedup<br>ln -s ../init.d/resumespeedup /etc/rc3.d/S06resumespeedup<br>ln -s ../init.d/resumespeedup /etc/rc4.d/S06resumespeedup<br>
ln -s ../init.d/resumespeedup /etc/rc5.d/S06resumespeedup<br><br>echo &quot;# Depmod when needed&quot;<br>cat &gt; /etc/init.d/moduledepends &lt;&lt; EOF<br>#!/bin/sh<br>if cmp /proc/version /var/lib/kernelversion; then<br>
   echo Not recalculating the module dependencies: Kernel has not changed.<br>else<br>   echo Recalculating the kernel module dependencies...<br>   depmod -a<br>   cp /proc/version /var/lib/kernelversion<br>fi<br>EOF<br><br>
chmod +x /etc/init.d/moduledepends<br>ln -s ../init.d/moduledepends /etc/rc1.d/S00moduledepends<br>ln -s ../init.d/moduledepends /etc/rc2.d/S00moduledepends<br>ln -s ../init.d/moduledepends /etc/rc3.d/S00moduledepends<br>
ln -s ../init.d/moduledepends /etc/rc4.d/S00moduledepends<br>ln -s ../init.d/moduledepends /etc/rc5.d/S00moduledepends<br><br>### end setup.sh<br><br>And here&#39;s the other, run after connecting to the PC:<br><br>### start install.sh<br>
<br>#!/bin/sh<br><br>echo &quot;# Fix software repos&quot;<br>sed -i &#39;s-ipk//-ipk/-&#39; /etc/opkg/*feed.conf<br>mv /etc/opkg/armv4-feed.conf /etc/opkg/armv4-feed.conf_<br>echo &quot;src/gz navit <a href="http://download.navit-project.org/navit/openmoko/svn">http://download.navit-project.org/navit/openmoko/svn</a>&quot; &gt;/etc/opkg/navit-feed.conf<br>
<br>echo &quot;# Run update&quot;<br>opkg update<br>opkg list_upgradable<br>if read dummy; then opkg upgrade; fi<br>echo &quot;# Install other packages&quot;<br>opkg install libpurple-protocol-yahoo libpurple-protocol-icq libpurple-protocol-bonjour fbreader midori-doc libgps17 navit pidgin-doc pythm libcanberra-gtk mokomaze<br>
ln -s /usr/lib/libgps.so.17 /usr/lib/libgps.so.16 <br>#diff -w -U 0 navit.xml /usr/share/navit/navit.xml<br><br>### end install.sh<br><br>The list of packages there at the end is a matter of personal preference.<br>&gt;<br>
&gt; Much better would be, if I could mount the rootfs readonly and have an<br>&gt; overlay-fs for changes.<br>Or at least put root&#39;s home on the card from the start. Hmmm, I might try that.<br><br>Gabor<br>-- <br>We are born wet, naked and hungry.<br>
Then things get worse.<br><br>