Art Alexion on 16 Aug 2009 12:46:08 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Swap on SD


On Sunday 16 August 2009 15:03:25 bergman@merctech.com wrote:
> Given that you're talking about swapping onto a removable device, I'd
> suggest not mounting swap via /etc/fstab. In case the SD card is removed
> before boottime, the machine may be unbootable. However, if you do
> something like this in /etc/rc.local (or the moral equivalent for whatever
> distro you're using), it's a bit more resiliant:
>         
>         check if the /dev/SDHC1 card is available (ie. check files in
> /proc, use lspci, use dmidecode, etc.)
>
>         if [ /dev/SDHC1 ] ; then
>                 swapon /dev/SDHC1
>         fi


This sounds reasonable.  The EeePC is not a distro, it is a brand of netbook 
with two SSD drives, an 8 GB (on which I have installed '/'  and '/boot') and 
a 32 GB (on which I have '/home').  The distro is ubuntu 9.04.  It comes with 
1 GB RAM, so I split the 4 GB SDHC into two partitions, sdc1 being the 
shrunken fat32 fs, and sdc2 being swap.

I followed Casey's advice with fstab and added the following lines:

# swap is /dev/sdc2 (SDHC card)
UUID=41d27b10-5a3f-4523-b170-08542387c830 none	swap	sw	0	0
# /mnt/extra is on SDHC card
UUID=72AD-2013	/mnt/extra	vfat	relatime	0	2

I used uuid instead of /dev/sdc# so as to avoid confusion with other removable 
media that may wish to become sdc.

Is there a way, with your init script, to handle sdc1 and take advantage of 
uuid?

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug