Solved Mounting without device name

Excuse me that I ask perhaps trivial things, but better to ask that to do a big error. :)

I just did a "standard installation" long ago without thinking too much on the meaning of all the innovations (ZFS, UEFI, EFI, etc). I had more important things to do.

In /etc/fstab I have:

Code:
# Device                Mountpoint      FStype  Options         Dump    Pass#
/dev/ada0p2             none    swap    sw              0       0

And I do not want now to mount with the name /dev/ada0p2, because when I move the disk to other computer (with
more devices), this name changes. I need a label. And do it without spoiling the contents of the disk.

The command gpart show ada0 (that I do not understand :)) gives:

Code:
% gpart show ada0
=>       40  488397088  ada0  GPT  (233G)
         40       1024     1  freebsd-boot  (512K)
       1064        984        - free -  (492K)
       2048    4194304     2  freebsd-swap  (2.0G)
    4196352  484200448     3  freebsd-zfs  (231G)
  488396800        328        - free -  (164K)

% disklabel /dev/ada0
disklabel: /dev/ada0: no valid label found

Any hint?

Thanks!!
 
What you want to move or label is a swap partition.
If you're going to move your disk to another computer, you'll hopefully do that while the machine is turned off ;) then swap is empty.

Of course, labeling is never a bad thing, even for swap.
You can take a look at this little guide I wrote, for people new to labels.
There is a bit of history and the differences about different label types and what you need, an example how to label swap.
 
It seems, the standard installation put a label:

Code:
% gpart show -l
=>       40  488397088  ada0  GPT  (233G)
         40       1024     1  gptboot0  (512K)
       1064        984        - free -  (492K)
       2048    4194304     2  swap0  (2.0G)
    4196352  484200448     3  zfs0  (231G)
  488396800        328        - free -  (164K)

I will now change my /etc/fstab and come back. And if I do not come back, that it is because I spoiled my disk.

Hopefully till soon!!!!
 
Back
Top