Re: add in SATA card -- ada0 "moves" to ad1, breaking the boot process ?

From: William Dudley <wfdudley_at_gmail.com>
Date: Thu, 18 Jul 2024 00:27:21 UTC
I was able to fix my boot problem by doing:

boot single user,
tunefs -L 60Gboot-SATA /dev/ada1s1a
reboot single user again,
mount -rw /
fix /etc/fstab to use the label,
reboot into multi-user

However, now, the swap partition has disappeared:

tunefs -p /dev/ada1s1b
tunefs: /dev/ada1s1b: No such file or directory

Of course, I can evidence it once existed:

ls /dev/ada1*
/dev/ada1       /dev/ada1s1     /dev/ada1s1a    /dev/ada1s1b

Where did it go, and is it possible to use it, or is it gone forever?
(I know I can create a swap file on ada1s1a, so it's not the end of the
world.)

Thanks,
Bill Dudley



On Wed, Jul 17, 2024 at 6:02 PM William Dudley <wfdudley@gmail.com> wrote:

> Thanks
>
> tunefs -L foo it is, then.
>
> Bill Dudley
> This email is free of malware because I run Linux.
>
>
> On Wed, Jul 17, 2024 at 4:33 PM Matthew Seaman <matthew@freebsd.org>
> wrote:
>
>> On 17/07/2024 20:58, William Dudley wrote:
>> > How do I prevent the drive names from changing?  Or can't I?
>> >
>>
>> One of the following?
>>
>> * glabel(8) for gpart(8) disk partitions
>>
>> * tunefs(8) can add a label to UFS2 filesytems
>>
>> In either case a disk device using the label will appear under /dev, and
>> you can use that in fstab(5)
>>
>> You might already have labels on your drive partitions: the FreeBSD
>> installer creates them by default.  Try `gpart show -l` to see.
>>
>> Or just use ZFS -- it knows its own drives, no matter what device the OS
>> wants to call them.  There's a fun party trick to take out the drives
>> containing a ZFS pool, shuffle them around, reinstall and boot up again.
>>
>>         Cheers,
>>
>>         Matthew
>>
>>