How can I change the mount device?

Started by peppersass, February 06, 2023, 02:51:07 AM

Previous topic - Next topic
In preparation for upgrading from 21.7.8 to 22.1, I thought it would be a good idea to clone my OPNsense SSD in case something goes wrong. But when I boot from the cloned SSD, the root mount fails because the cloned SSD has a different device name than the original SSD. OK, so I entered ufs:/dev/<cloned disk/partition device> and it worked.

Now, how do I change the mount device so I don't have to enter the mount device every time the system reboots? Is it stored where it can be edited or is it in the boot record somewhere that can't be edited?

Thanks in advance for any help.

[I'm thinking if something goes wrong and I have to revert, I can clone the clone back to the original SSD and maybe it'll be assigned the original device name?]

Edit /etc/fstab and done :)


Cheers,
Franco

I just got around to changing the boot file system in /etc/fstab to /dev/da0p3, which worked. Thanks!  :)

When I edited /etc/fstab, I noticed there's also an entry for a swap file: /dev/gpt/swapfs. I get an error opening it when I reboot, but that hasn't caused any problems (yet.) I've got 8GB of memory, so I should probably create a swap file. How do I create a swap file and where?

Usually swap is configured as a partition on FreeBSD. It's possible to set up swap on a file. See here for instructions:
https://people.freebsd.org/~blackend/en_US.ISO8859-1/books/handbook/adding-swap-space.html

But are you sure you need it? And did you need it before? I run a fairly complex setup on 2GB RAM and no swap. You can run "swapinfo" on your 21.7.8 instance and see if any swap is configured there. If it's not, and your memory usage isn't concerning, why bother?