Author Topic: Umount The Sd Card Before Removing?  (Read 6273 times)

PaulBx1

  • Newbie
  • *
  • Posts: 41
    • View Profile
Umount The Sd Card Before Removing?
« on: March 30, 2006, 04:08:59 pm »
In my current primitive understanding, if I have Meanie's automounter I can pop the sd in and out with abandon. However it is less clear to me if Cacko handles that task too, by itself. It does print an "eject" message when I pull it out. But is that telling me, "Stupid, you should have done umount first, your card contents are not guaranteed now?"    

Just wondering if I'm courting disaster. Oh, I used Mazlovsky's mem app to make a swap on the card too. I imagine I ought to turn that off as well <sigh>
SL-C1000 Cacko 1.23 in hand, PDP-11 RT-11 in brain

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Umount The Sd Card Before Removing?
« Reply #1 on: March 30, 2006, 04:54:33 pm »
Yes, Cacko 1.23 full and Lite both take care of mounting/unmounting SD & CF cards.
When I remove my SD, I get a message in the middle of the screen:
"Now updating information"
Taskbar says:
"Ejected SD/MMC"

When I insert my SD, I get a message in the middle of the screen:
"Now updating information"
Taskbar says:
"New Card: SD/MMC"

Inserting a CF card:
Taskbar says:
New Card: ATA/IDE fixed disk

Removing a CF card:
Taskbar says:
Ejected: ATA/IDE fixed disk

C3100 & Cacko Lite
« Last Edit: March 30, 2006, 04:57:19 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

Ferret-Simpson

  • Hero Member
  • *****
  • Posts: 572
    • View Profile
Umount The Sd Card Before Removing?
« Reply #2 on: March 30, 2006, 07:04:56 pm »
Surely that still risks frying the FAT table?
Cortana: PXA250/Poodle: OZ/GPE 3.4.2RC1
Tycho PXA270/HTC_Universal WM5  .30.107/1.09.00/42.42.P8/1.30.162
HollyWatch: Fossil AU5005 - POS 4.1.2
ATLANTIS: Fujitsu Lifebook T4210 TBPC2005

Tosh256CF, Adlink CF 802.11B, 512KingSD, 128VikSD, CFChiMeiG1GPRS

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Umount The Sd Card Before Removing?
« Reply #3 on: March 30, 2006, 08:08:41 pm »
Quote
Surely that still risks frying the FAT table?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=121153\"][{POST_SNAPBACK}][/a][/div]

on any computer system, it is always a bad idea to pull out the disk without first unmounting it. never pull out the card while there is disk activity. on an idle disk, it may be ok depending whether you have mounted using synchronouse/asynchonous i/o, but generally speaking, always unmount the card before you eject it.

both sharp and cacko distro mount the cf and sd card automatically when they are inserted (and if they are fat). they also unmount them if you use the card applet to do so.

what i have done for sharp distro is to also unmount loop devices and swapfile on the cf/sd card before unmounting the disk when you use the cf/sd applet. i think, cacko does that for you when you use the card applet, cant remember.

can someone who has cacko 1.23 please provide me with the output of the mount command? i want to know the default mounts on cacko.
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

Jon_J

  • Hero Member
  • *****
  • Posts: 1853
    • View Profile
    • http://
Umount The Sd Card Before Removing?
« Reply #4 on: March 30, 2006, 09:12:27 pm »
with SD card inserted
Code: [Select]
# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (ro)
/proc on /proc type proc (rw)
/dev/ram1 on /dev type minix (rw)
/dev/loop0 on /usr type squashfs (ro)
/dev/mtdblock3 on /home type jffs2 (rw,noatime)
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw)
/dev/hda1 on /hdd1 type ext3 (ro,noatime)
/dev/hda2 on /hdd2 type ext3 (rw,noatime)
/dev/hda3 on /hdd3 type vfat (rw,noatime)
/dev/mmcda1 on /usr/mnt.rom/card type vfat (rw,noatime)

With SD & CF card inserted:
Code: [Select]
# mount
rootfs on / type rootfs (rw)
/dev/root on / type jffs2 (ro)
/proc on /proc type proc (rw)
/dev/ram1 on /dev type minix (rw)
/dev/loop0 on /usr type squashfs (ro)
/dev/mtdblock3 on /home type jffs2 (rw,noatime)
none on /dev/shm type tmpfs (rw)
none on /dev/pts type devpts (rw)
/dev/hda1 on /hdd1 type ext3 (ro,noatime)
/dev/hda2 on /hdd2 type ext3 (rw,noatime)
/dev/hda3 on /hdd3 type vfat (rw,noatime)
/dev/mmcda1 on /usr/mnt.rom/card type vfat (rw,noatime)
/dev/hdc1 on /usr/mnt.rom/cf type vfat (rw, noatime)
« Last Edit: March 30, 2006, 09:17:06 pm by Jon_J »
C3100 Multiboot-->Angstrom 2007.12-r18 | Cacko 1.23 | ArchLinuxARM
C3200 pdaxii13v2-5.5-alpha4 Akita on NAND

Ambicom WL1100C-CF Wifi - Ambicom CF modem - Ambicom CF GPS - Belkin-F5D5050 USB LAN
Socket CF Bluetooth rev K - Iogear 4 port USB micro hub - pocket CF card reader
Targus mini USB optical mouse - 2 Targus SD card readers

PaulBx1

  • Newbie
  • *
  • Posts: 41
    • View Profile
Umount The Sd Card Before Removing?
« Reply #5 on: March 31, 2006, 02:39:14 pm »
Quote
both sharp and cacko distro mount the cf and sd card automatically when they are inserted (and if they are fat). they also unmount them if you use the card applet to do so.

Ah, you still have to manually (with the applet) unmount first? Hmmm, good to know.  

I was thinking there might be some way for the O/S to know you were removing the card, e.g. a signal that goes true when pushing the card in to release it, before it actually came out, thus giving it time to unmount things first. This would be consistent with the need to make consumer devices idiot-proof. But I guess there could be no such thing with CF cards, since they just pull out? (I have none at the moment so don't know.)

But you are telling me it is not idiot-proof, so I will have to stop acting like an idiot. Darn!  

It would be good to know if swap file and loop devices get taken care of by Cacko using the applet, too. But then if I figured out how to get automounter going I wouldn't care...

<later>
I tried "ejecting" the sd card with the applet, and it told me the eject failed. I then did a umount of /dev/loop1 (X/Qt cramfs) and tried the applet again, and it worked. So it looks like it is all manual, you have to go to a console and clean up loop and probably swap first, then eject. <sigh> Oh, well, looks like I have even more incentive to get automounter working.
« Last Edit: March 31, 2006, 02:46:57 pm by PaulBx1 »
SL-C1000 Cacko 1.23 in hand, PDP-11 RT-11 in brain

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Umount The Sd Card Before Removing?
« Reply #6 on: March 31, 2006, 03:54:08 pm »
just write a simple script to handle all those things then tie it to keyhelpers shortcut/menu stuff.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder