Ubuntu Discussion on Ubuntu on the Dell Inspiron Mini range of netbooks.

Reply
 
Thread Tools Display Modes
  (#31) Old
sirebral sirebral is offline
Junior Member
 
Posts: 20
Join Date: Dec 2008
Default 07-09-2010, 06:25 AM

Quote:
Originally Posted by Teh Lurv View Post
I entered it like this:

# The rule here? Simplicity.
umount /media/<name of SD card>
export STASHNAME=pm-suspend

worked like a charm for both hibernate and suspend. My remaining unresolved issue with my SD card is that it doesn't auto mount on boot. But that's not such a big deal.
Thanks!! You guys fixed my biggest problem with MeeGo right now. I used umount /media/* to bypass any naming specifics and it works great. Much love!!!
Reply With Quote
  (#32) Old
timocharis timocharis is offline
Junior Member
 
Posts: 2
Join Date: Sep 2010
Default 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:


Code:
#!/bin/sh
    if grep "mmcblk0p1" /etc/mtab > /dev/null;
    then
        exit 0
   elif [ -e /dev/mmcblk0p1 ];
    then
        mount /mountpoint/
    fi
That just tests to see if you actually have the card in, and if so, mounts it. Now what about suspend?

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:

Code:
#!/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 $?
On suspend, it tests to see if the card is mounted. If so, unmount it. On resume, make sure the card is in the slot and it has at least one partition. If so, mount it to your chosen directory.

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.
Reply With Quote
  (#33) Old
yorgle yorgle is offline
Senior Member
 
Posts: 159
Join Date: Oct 2008
Default 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?
Reply With Quote
  (#34) Old
ubuntufanXD ubuntufanXD is offline
Member
 
Posts: 38
Join Date: Dec 2008
Default 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.
Reply With Quote
  (#35) Old
yorgle yorgle is offline
Senior Member
 
Posts: 159
Join Date: Oct 2008
Default 10-15-2010, 08:01 PM

Quote:
Originally Posted by ubuntufanXD View Post
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.
Well, that shows you what I know 'bout linux. Thanks. I guess I'll be soldering in a dedicated thumbdrive to the unused WWAN usb lines. The 10.10 installer doesn't leave enough room for a 1 gig swap space. I had hoped a card would work the same as the usb drive.
Reply With Quote
  (#36) Old
reflex reflex is offline
Guru
 
reflex's Avatar
 
Posts: 1,997
Join Date: Apr 2009
Default 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 9 | Intel 5100 Wifi | Ubuntu 10.04 Netbook
Mini 1012 | SSD | Intel 6200 Wifi | Ubuntu 11.10 64bit
Reply With Quote
Reply

Tags
hibernate, suspend

« Previous Thread | Next Thread »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright © 2008-2016 MyDellMini.com.