Ubuntu Discussion on Ubuntu on the Dell Inspiron Mini range of netbooks.
| ||Thread Tools||Display Modes|
Join Date: Sep 2010
10-01-2010, 05:09 AM
I know this is an old topic, but none of the prior answers seem to address all the issues.
First, if you mount /usr to temp storage, it simply won't work in the long run. You'll never be able to resume from suspend because pm_suspend is in /usr/sbin, and to suspend you must umount /usr. From which point onward there will be no pm_suspend. Or most of your other programs.
Second, if you want to automount the card on startup, compose a small script and stick it somewhere (say, ~/bin) and have gnome run it on login (set it up in System > Preferences > Startup Applications). Make sure you render the script executable (chmod 755 yourscript). Here's mine:
#!/bin/sh if grep "mmcblk0p1" /etc/mtab > /dev/null; then exit 0 elif [ -e /dev/mmcblk0p1 ]; then mount /mountpoint/ fi
Create a script in /etc/pm/sleep.d to unmount the card when you put the computer to sleep, then remount it on resume. Here's mine, which I named 00_umountSD:
#!/bin/sh case "$1" in hibernate|suspend) if grep "mmcblk0p1" /etc/mtab > /dev/null; then umount /mountpoint fi ;; thaw|resume) if [ -e /dev/mmcblk0p1 ]; then mount /mountpoint fi ;; *) ;; esac exit $?
Why the 00_ prefix? The underscore is what other pm_suspend scripts used, so I stuck with the style. The 00 is to make the umount happen first, and the mount happen last. Suspend starts low number and goes to high, but resume starts high and goes to low. That way sequence is mirrored, and we can put both operations into the same script.
While it's true this won't work for a memory stick, who cares? They're comparatively way slow and stick out of the slot. If it's there, you'll notice.
Join Date: Oct 2008
10-15-2010, 03:20 PM
Help! After installing merecat on my daughter's mini9 (4gigSSD, 1gigRAM) I am going nuts trying to get the blasted thing to hibernate. Because the installer only set aside 215mb for swap space, I am trying to use a 4gig sd card. So far, here is what I've done:
First, I used gparted to create 1.2 gig partition on the sd card and clicked swapon in the rightclick menu to designate it as swap space. free -m confirms I have 1209 mb swap space. The system monitor app also confirms the swap space exists.
Next, I added the new partition's UUID to my /etc/fstab file
Next, I added the umount /dev/mmcblk1p1 to my /usr/sbin/pm-suspend file as suggested earlier in this thread.
But when I try to hibernate, the screen goes blank (but does not shut off) and I can hear the audio click off and the power light stays on. If I touch the trackpad or a key the password box pops up and I'm back to the desktop. Just before the screen goes blank I can see something like "cannot find swap device" appear for a second or so.
What am I missing?
Join Date: Dec 2008
10-15-2010, 07:10 PM
If you put the swap space on the sd card and then unmount it, you no longer have swap space. Hibernate dumps the contents of your ram into your swap space (more or less) which is why you should always have at least as much swap space as ram if you are going to hibernate. You can create swap files in much the same way without have a devoted partition but it must be on the internal drive or usb NOT on a card.
Join Date: Oct 2008
10-15-2010, 08:01 PM
Join Date: Apr 2009
10-16-2010, 01:55 AM
If it's an actual swap partition, you shouldn't be able to unmount it. I just tried unmounting my PC's swap partition, it failed and replied that the target partition is "not mounted".
As for why swap on the SD card doesn't work, I dunno. It seems like the SD reader is slow when coming up during resume (??), and that breaks things (like currently mounted filesystems, active swap, etc).
Finally, as for my solution, I never hibernate on my machines. I use suspend or off.
Mini 1012 | SSD | Intel 6200 Wifi | Ubuntu 11.10 64bit
Copyright © 2008-2016 MyDellMini.com.