1 |
On 07/01/2010 08:59 AM, SpaceCake wrote: |
2 |
> that's good if I want to mount at a specific location, but for swap I |
3 |
> need the device name, but this is changes depending on how many other |
4 |
> usb drives are connected. Looks lik this is a tricky question :) |
5 |
|
6 |
No, you don't *NEED* the device name to mount swap, you can use a UUID |
7 |
or a filesystem label: |
8 |
|
9 |
# swapon -h |
10 |
|
11 |
Usage: |
12 |
swapon -a [-e] [-v] [-f] enable all swaps from /etc/fstab |
13 |
swapon [-p priority] [-v] [-f] <special> enable given swap |
14 |
swapon -s display swap usage summary |
15 |
swapon -h display help |
16 |
swapon -V display version |
17 |
|
18 |
The <special> parameter: |
19 |
{-L label | LABEL=label} LABEL of device to be used |
20 |
{-U uuid | UUID=uuid} UUID of device to be used |
21 |
<device> name of device to be used |
22 |
<file> name of file to be used |
23 |
|
24 |
Just put |
25 |
|
26 |
LABEL=cakeswap none swap sw,user 0 0 |
27 |
|
28 |
in your fstab |
29 |
|
30 |
and use "mkswap -L cakeswap" on your USB stick. |
31 |
|
32 |
Certainly, you'd want to use "swapoff" *before* you removed the stick, |
33 |
so that's going to have to be a manual step so I think you're stuck |
34 |
unsticking your stick. |