UFS label confusion

I set this system up with this fstab:-

root@X61:~ # cat /etc/fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ada0s1a / ufs rw 1 1

which works fine until I insert a second disk. gpart currently shows:-

Code:
=>       63  625142385  ada1  MBR  (298G)
         63  625142385     1  freebsd  [active]  (298G)

=>        0  625142385  ada1s1  BSD  (298G)
          0          1          - free -  (512B)
          1  209715200       1  freebsd-ufs  (100G)
  209715201  415427184          - free -  (198G)

I need to change fstab so I can boot from the same disk wherever it is installed. I haven't used mbr for quite a while so not sure which partition should be labelled or how to do it. I notice glabel or tunefs don't see to work on a live system... or am I mistaken?
 
I haven't used mbr for quite a while so not sure which partition should be labelled or how to do it.
In your example partition table ada1s1a. The partition can be labeled with tunefs -L <label> ada1s1a.

I notice glabel or tunefs don't see to work on a live system... or am I mistaken?
tunefs(8) works quite well. The installer image (default MBR) has a "FreeBSD_Install" label for example.

/etc/fstab
Code:
/dev/ufs/FreeBSD_Install         /         ufs        ro,noatime       1      1
 
tunefs: ada1s1a is not clean - run fsck.

Looks like I can't boot from the current partition for this to work.
 
Back
Top