[NB. I think the problem is because the partition /home is always busy and cannot be umounted. So, the same will apply to /var - also cannot be mounted if mounted this way.]
I think this should work on any EeePC model, but I would like more people to test and report on this (and also sort out the problem with mounting /home) before putting this into the wiki.
========================================
Here is a brief summary of how I did this on my 4G. In this example, I am mounting sdb5 with a volume label USRLOCAL to /usr/local/.
1) Backup /sbin/fastinit and edit the file either with a hex editor or with this sed command:
sed -i 's@mkdir -p /dev/shm/network@ /sbin/mountdrv.sh @' /sbin/fastinitBasically, I take out this command from fastinit and replace it with a command to run a script that runs this command + mount the SD partition.
2) EDIT: Download this script and save it to /sbin/mountdrv.sh
[NB. This script will load USB modules to seek and mount a partition in /usr/local according to its volume label and also will take care to automatically create device if necessary. If you want to mount to /usr or /opt, just change it in the script.] [EDIT 2009/8/16: Changed download link to www.mediafire.com.]
Check and make sure both /sbin/fastinit and this script /sbin/mountdrv.sh have exec permission.
3) Umount the new partition in your SD, format it to ext3 and give it a volume label, e.g. with sdb5 mounted in E:
umount /media/E: sudo mke2fs -L USRLOCAL /dev/sdb5 sudo tune2fs -j /dev/sdb54) Now mount sdb5 again and copy everything from existing /usr/local/ to sdb5. You should do it with a Root File Manager.
5) Reboot into rescue mode (or from another Linux) and rename /usr/local to say /usr/local_old. Then make a new empty directory /usr/local/. For example, if you do this in rescue mode:
mount /dev/sda1 /mnt-system mv /mnt-system/usr/local /mnt-system/usr/local_old mkdir /mnt-system/usr/local umount /mnt-systemWait a few seconds, then press [ctrl]-[alt]-[del] to reboot.
[NB. After you have confirmed this works, then you can delete the old /usr/local_old folder.]
Now I end up with sdb5 mounted in /usr/local, and the Device Detection Dialog show up no more for the SD.
EDIT: I have found that doing this, usbstorageapplet is disabled at system startup. Even though I left other USB sticks plugged in. They won't get mounted. I have to take it out and plug it in again and then usbstorageapplet works again. So effectively, I have get ride of the annoying popup for left in USB devices at system startup.
Actually, a more decent way is to also modify /sbin/scanuser.sh and formatuser.sh to include this new /usr/local partition. But let's leave it after everything is confirmed.
albkwan
Edited by albkwan, 16 August 2009 - 03:10 PM.











