Author Topic: Moving directories to external storage  (Read 2679 times)

grey_moon

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Moving directories to external storage
« on: March 27, 2004, 10:54:29 am »
Can anyone point me to info on what directories I can easily move from my internal memory to a sd card on the Sharp 1.32 ROM please.  (Looked on the wbe and everything seems to be aimed at OZ)

Cheers
Moon
SL_5600 with Sharp ROM 1.32 - Windows XP Pro
AmbiCom 802.11b CF WL1100C, Pretec CompactBT Bluetooth CF, Hagiwara 256MB SD Card
Expansys Black Chairmans Case, ShirtPocket Battery Extender, ShirtPocket Retractable USB Sync/Charger

Nightruler

  • Newbie
  • *
  • Posts: 27
    • View Profile
Moving directories to external storage
« Reply #1 on: April 02, 2004, 12:57:08 am »
I\'ve been trying to figure this out for a while myself.  Everything seams to be either for the 5500 or for OZ.

What I\'ve come up with so far is (and I havn\'t tired this yet to verify), that you just make links of the directorys you want to move to your SD.

Copy the directory to another directory on your memory card (say /home/QtPalmtop to /mnt/card/QtPalmtop), then remove the directory in /home, make a link from /home/QtPalmtop to /mnt/card/QtPalmtop

Also I\'ve found that you can\'t use FAT on the card, ext2 or such linux filesystem (how can you make a JFSS2 filesystem?) or Zaurus won\'t work right.

Can anyone else help with this?  Maybe a script or something would be nice, and knowing what directorys to move would help a lot.
Zaurus 5600
Zynergy5600 ROM
512mb PNY SD
TRENDnet Ethernet CF
SMC 2642W 802.11b CF
32mb Kingston CF
Targus IR Keyboard

BlackCardinal

  • Jr. Member
  • **
  • Posts: 70
    • View Profile
    • http://www.gelhaus.net
Moving directories to external storage
« Reply #2 on: April 02, 2004, 03:47:58 am »
Yes, what you describe will work, although it\'s important to make sure permissions are preserved when you do the directory copy.  Use the -a (archive) flag  for this.  This would need to be done as root, of course.  Also, I would make it a temporary change until you have tested it to make sure things still work.  For example, to move the zaurus user home dir to the SD card:
Code: [Select]
# cp -a /home/zaurus /mnt/card/home/

# mv /home/zaurus /home/zaurus.OLD

# ln -s /mnt/card/home/zaurus /home/

  .

  .

  (do some testing)

  .

  .

# rm -rf /home/zaurus.OLD

If you have a problem and need to go back, do this instead of the above rm command:
Code: [Select]
# rm /home/zaurus

# mv /home/zaurus.OLD /home/zaurus

Of course, if the external storage card were removed and a critical directory was on it, you would have a bad situation that would require at least a reinsertion of the media, possibly a reboot, and depending on what was happening when the media was removed, maybe worse (like lost PIM data).  For this reason I instead chose to create a duplicate directory structure on my SD card, and then symlink files from the SD card to their corresponding directories in my internal memory.  This gives me the benefit of letting me install apps to the SD card, but without monkeying around with the file structure.  I also install anything I consider \"critical\" (e.g. openssh, terminal) to my internal memory in case I need them if something happened to my ability to access my SD card.
BlackCardinal : http://www.gelhaus.net : Zaurus page

SL-C1000, Cacko ROM v1.23
Lexar SD 512MB, Kingston CF 512MB
Symbol Spectrum24 CF 802.11b

SL-5500 Sharp ROM v3.10
Lexar SD 256MB
Pocketop keyboard, Nutshell 207 leather case

brownb2

  • Newbie
  • *
  • Posts: 20
    • View Profile
Moving directories to external storage
« Reply #3 on: April 02, 2004, 06:16:28 am »
If anybody figures out how to move /tmp please tell me - its a serious drawback when installing large ipks to internal as it unpacks to /tmp which is on internal....!

grey_moon

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Moving directories to external storage
« Reply #4 on: April 02, 2004, 08:32:42 am »
move /dev/shm/tmp to your external device and symlnk it
opps thats for sharprom 1.32

cheers
moon
SL_5600 with Sharp ROM 1.32 - Windows XP Pro
AmbiCom 802.11b CF WL1100C, Pretec CompactBT Bluetooth CF, Hagiwara 256MB SD Card
Expansys Black Chairmans Case, ShirtPocket Battery Extender, ShirtPocket Retractable USB Sync/Charger

brownb2

  • Newbie
  • *
  • Posts: 20
    • View Profile
Moving directories to external storage
« Reply #5 on: April 02, 2004, 10:23:55 am »
I uses Sharp ROM 3.13 and symlinking it causes it to crash on boot (probably due to the cf card being mounted after it trying to access /tmp which is on the card).

doseas

  • Full Member
  • ***
  • Posts: 207
    • View Profile
    • http://
Moving directories to external storage
« Reply #6 on: April 05, 2004, 04:19:17 pm »
Quote
If anybody figures out how to move /tmp please tell me - its a serious drawback when installing large ipks to internal as it unpacks to /tmp which is on internal....!

No need to move /tmp for this purpose...  Simply change the definition of tmpinst in /home/etc/ipkg.conf to point where you want to.