| ||||||||
Dell Mini 9 Hardware and Upgrades Discuss Dell Mini 9 Hardware and Upgrades.
|
| | LinkBack | Thread Tools | Display Modes |
(#61)
|
| Expert Member Posts: 692 Join Date: Mar 2009 | Took awhile since I've not been feeling well but here is a nicer script for the .sleep file for use with SleepWatcher for OS X folks. It will go through and stop any programs that have files open on the internal SHDC card then eject the card and if that fails unmount it. Code: #!/bin/bash
sync
echo $(date) >> $HOME/.log-jumount.log
# Figure out what volumes goes with /dev/disk1s1
# If you want you can just hard code a name in here instead
Vol=`df | grep /dev/disk1s1 | grep -o /Volumes/.\*`
# write list of open files on SD card to temp file
lsof | grep ${Vol} > /tmp/jumount.log
# copy temporary list to log file
cat /tmp/jumount.log >> $HOME/.log-jumount.log
# kill any processes with open files
grep ${Vol} /tmp/jumount.log | sort -u -k 2,2 | awk '{system ("kill -TERM "$2)}'
# wait for the processes to unwind
sleep 2
sync
# use eject to dismount the SD card (essential!)
diskutil eject ${Vol}
# check if eject has fully dismounted SD card. If not, dismount it explicitly
umount ${Vol} 2> /dev/null Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4] Dropbox Referral |
| | |
(#62)
|
| Expert Member Posts: 692 Join Date: Mar 2009 | A neater version with some error checking. Code: #!/bin/bash
sync
TMP=/tmp/jumount.log
JLOG=${HOME}/.log-jumount.log
echo $(date) >> ${JLOG}
# Figure out what volumes goes with /dev/disk1s1
# If you want you can just hard code a name in here instead
Vol=`df | grep /dev/disk1s1 | grep -o /Volumes/.\*`
if [ -z "${Vol}" ]
then
echo "Nothing to unmount" >> ${JLOG}
exit 0
fi
echo "Cleaning up ${Vol} for sleep" >> ${JLOG}
# write list of open files on SD card to temp file
lsof | grep ${Vol} | sort -u -k2,2 > ${TMP}
# [Optional, remove # to enable] copy temporary list to log file
# cat /tmp/jumount.log >> ${JLOG}
if [ -s ${TMP} ]
then
# kill any processes with open files
cat ${TMP} | awk '{system ("echo kill -TERM "$1 " >> ${HOME}/.log-jumount.log")}'
cat ${TMP} | awk '{system ("kill -TERM "$2)}'
# wait for the processes to unwind
sleep 2
sync
fi
# use eject to dismount the SD card (essential!)
sudo diskutil eject ${Vol} >> ${JLOG}
# check if eject has fully dismounted SD card. If not, dismount it explicitly
sudo /sbin/umount -f ${Vol} 2>/dev/null >> ${JLOG} Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4] Dropbox Referral |
| | |
(#63)
|
(#64)
|
| Senior Member Posts: 187 Join Date: Mar 2009 Location: Kanata, Ontario, Canada | Quote:
FWIW, I've been playing around with this for several weeks now and have no issues other than the bottom of the Mini feeling slightly warmer due to the addition of the extra card. I don't think battery life has been affected to any noticeable degree. I run both Win7 and OSX. For both OS to see the card, it must be formatted in FAT32. I have applications, games, pictures, movies etc running off of it with no problems. If using OSX, you need the SleepWatcher script installed for unmounting during sleep. Also, in Windows, if OSX has been using the drive, you'll have some hidden apple files taking up some space (like .trash etc). A small price to pay. For TimeMachine, I use yet another 16G SDHC on the external slot which I randomly put in to do a random backup. I guess, you could also use the internal one if you wanted. Not finding the proper low-height M2 standoffs is still buggin' me, so I might try to find another source for them that fits (i.e. the PEM ones supposedly had too large an inner diameter). It would be nice to have two standoffs for the Wifi and MR04. ![]() Dell Vostro A90 (96Gb) | SL 10.6.5 | 2G HyperX | 0.3Webcam | BIOS A04 | 64G Runcore SSD | 32G SDHC (ext) | and other stock features | CLICK HERE TO ADD AN INTERNAL SDHC CARD | | CLICK HERE TO TAKE THE HACKINTOSH POLL | | |
| | |
(#65)
|
(#66)
|
| Senior Member Posts: 187 Join Date: Mar 2009 Location: Kanata, Ontario, Canada | Quote:
So, what do you need as a bare minimum for parts if you aren't so lucky to have the WWAN connector installed by DELL? 1. MR04 card [which comes with screws for the standoff(s)] 2. SD/SDHC card - the bigger the better 3. mini pci-e connector (soldered somehow into the WWAN space) 4. standoff(s) - one minimum (either new and soldered into the available space(s) or steal one from the wifi card) 5. recommended -> electrical or kapton tape under the card (to prevent accidental component-to-pcb via shorts) 6. optional -> if you're going to do this yourself, make sure you have a good soldering iron/tips (and knowledge/patience/yadda-yadda-yadda ...) ![]() Dell Vostro A90 (96Gb) | SL 10.6.5 | 2G HyperX | 0.3Webcam | BIOS A04 | 64G Runcore SSD | 32G SDHC (ext) | and other stock features | CLICK HERE TO ADD AN INTERNAL SDHC CARD | | CLICK HERE TO TAKE THE HACKINTOSH POLL | | |
| | |
(#67)
|
| Expert Member Posts: 692 Join Date: Mar 2009 | I was explaining to someone in PM how the script worked and then later how to test it. Figured that since others may try this hardware mod it'd be useful for all. Warning longwinded… Let's see, where to begin… The script keeps a log of what it tries to do and puts it in your home directory. It is named '.log-jumount.log' but you won't see it if you just type ls. That's because files who's name starts with a '.' aren't listed. But you can look at it with cat or more. That is type "cat .log-jumount.log" and the contents will be shown on the screen. In unix/linux everything that's a device will have a corresponding /dev entry. So each HD, SSD, CD/DVD drive, touch tablet, printer, anything basically you plug into the computer will show up as some sort of /dev/something. The drives are going to show up as /dev/diskXsY where X is the physical device and Y is the logical device. For example I have a dual boot machine, Win7 and OS X so I have 2 partitions on my SSD. The first, the Win7, is /dev/disk0s1 and my OS X partition is /dev/disk0s2. (Physical numbers start at 0, logical at 1). The next mounted drive is /dev/disk2s1 then the next will be /dev/disk3s1, etc. You can see these by typing df in a terminal window. The lsof command (which you can also try out by typing in a terminal window) will list all the open files by any program. The output has the program name as the first item, the process ID# as the second and the last item is the filename. The first bit of the script tries to figure out the name of the disk by searching through the output of the df command, looking for the 2nd drive, disk1s1. I need the actual name of the mount point (the last part of any df output line) and that's what the 2nd grep in that line does. So you could have done: Vol=/Volumes/PATRIOT32G instead of the code that's there. Next the script checks to see if there actually was a second volume (it could have been unmounted) and just exits if it doesn't exist. At this point I know the name of the mount point and the list of all open files. So I go through the list of open files and look for any that start with the mount point of the SDHC. I sort them and drop duplicates, using the 2nd item of the lsof output which is the process ID#. That's stuck in the file /tmp/jumount.log If that file isn't empty, which means there is at least one process with a file open on the SDHC, I want to tell the system to stop that program. That's the kill command. I wait 2 seconds for those processes to actually stop. Then I try to eject the SDHC (since its removable) and then just for safety try to unmount it in case the eject failed. I tested the script with the drive unmounted before sleep and with and without files open on the SDHC so I don't know why it didn't work for you. As far as checking for files, try an easy one, open an app that's on the SD card. It should be quit, along with an entry in the logile, when you come back from sleep. If that works the last simple test is to make a text file on the SD and open it with TextEdit (which should be on the SSD as part of a basic OS X install), when you come back from sleep TextEdit should be gone, again with a logfile entry. Interesting that you have the card in the slot as disk1s1 and the PCI adapter as disk2s1, its consistently the other way for me. Could depend on brand of card and read/write speed, which one the OS mounts first. Mini2: Mini9, Black, 2G, 0.3 Webcam, Bluetooth, 32G RunCore, OS X/Win 7, internal PCI-e SHDC Reader Mini3: Mini10v. Black, 2G, Webcam, 640G HD, OS X 10.5.8/Win 7/Ubuntu [Hibernate w/NBI 0.8.3 RC4] Dropbox Referral |
| | |
(#68)
|
| Junior Member Posts: 2 Join Date: Apr 2009 | hello, will this adapter work for the sd/sdhc mod? http://cgi.ebay.com/Mini-PCI-e-DIY-H5-2 ... .m20.l1116 thank you in advance for your answer. |
| | |
(#69)
|
| Senior Member Posts: 187 Join Date: Mar 2009 Location: Kanata, Ontario, Canada | Quote:
Look back on pg4 of this thread to see the correct part number. Order from Mouser to make your life easier. PART NUMBER: 656-MM60-52B1-B1-R - this is the low height one 3.9mm Buy it at Mouser: $2.06US + shipping http://www.mouser.com/Search/Refine....MM60-52B1-B1-R Dell Vostro A90 (96Gb) | SL 10.6.5 | 2G HyperX | 0.3Webcam | BIOS A04 | 64G Runcore SSD | 32G SDHC (ext) | and other stock features | CLICK HERE TO ADD AN INTERNAL SDHC CARD | | CLICK HERE TO TAKE THE HACKINTOSH POLL | | |
| | |
(#70)
|
| Junior Member Posts: 19 Join Date: Feb 2009 | Quote:
You can use NTFS on the card if you install the Mac-fuse driver from macfuse - Google Code and then the NTFS-3g driver from NTFS-3G: Stable Read/Write NTFS Driver It's solid enough that our Men's and Women's Basketball teams both use it without a hitch to produce videos for our athletic conference. | |
| | |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.mydellmini.com/forum/dell-mini-9-hardware-upgrades/4635-sdhc-mini-pcie-adapter-would-work.html | ||||
| Posted By | For | Type | Date | |
| 3DCenter Forum - Diskussion Schnäppchen Dell Vostro A90 | This thread | Refback | 05-27-2009 08:43 PM | |
Copyright © 2008-2011 MyDellMini.com.









Linear Mode
