Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2024 20:27:21 -0400
From:      William Dudley <wfdudley@gmail.com>
Cc:        questions@freebsd.org
Subject:   Re: add in SATA card -- ada0 "moves" to ad1, breaking the boot process ?
Message-ID:  <CAFsnNZKE7SxySu=vUGWYb8rYvrNoFGtwV062HnuUOz1Wj499Gw@mail.gmail.com>
In-Reply-To: <CAFsnNZJ1KdqSypM3KsZVEfMhRwUA=zDRP_6sujrmFeLQXjnR7w@mail.gmail.com>
References:  <CAFsnNZJ2iq8bm=71S3Gp379gqE9H0aF6ucqmERO-q_BhGui1DA@mail.gmail.com> <a2d4a02d-ffdd-483b-8ff5-4e27a70530b4@FreeBSD.org> <CAFsnNZJ1KdqSypM3KsZVEfMhRwUA=zDRP_6sujrmFeLQXjnR7w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000000e1006061d7aa302
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=E2=80=AFPM 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=E2=80=AFPM Matthew Seaman <matthew@freebsd.o=
rg>
> 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
>>
>>

--0000000000000e1006061d7aa302
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I was able to fix my boot problem by doing:<div><font face=
=3D"monospace"><br></font></div><div><font face=3D"monospace">boot single u=
ser,</font></div><div><font face=3D"monospace">tunefs -L=C2=A060Gboot-SATA =
/dev/ada1s1a</font></div><div><font face=3D"arial, sans-serif">reboot singl=
e user again</font><font face=3D"monospace">,</font></div><div><font face=
=3D"monospace">mount -rw /</font></div><div><font face=3D"arial, sans-serif=
">fix /etc/fstab to use the label,</font></div><div><font face=3D"arial, sa=
ns-serif">reboot into multi-user</font><font face=3D"monospace"><br clear=
=3D"all"></font><div><div dir=3D"ltr" class=3D"gmail_signature show" data-s=
martmail=3D"gmail_signature"><br></div><div class=3D"gmail_signature show" =
data-smartmail=3D"gmail_signature">However, now, the swap partition has dis=
appeared:</div><div class=3D"gmail_signature show" data-smartmail=3D"gmail_=
signature"><br></div><div class=3D"gmail_signature show" data-smartmail=3D"=
gmail_signature"><font face=3D"monospace">tunefs -p /dev/ada1s1b</font></di=
v><div class=3D"gmail_signature show" data-smartmail=3D"gmail_signature"><f=
ont face=3D"monospace">tunefs: /dev/ada1s1b: No such file or directory</fon=
t><br></div><div class=3D"gmail_signature show" data-smartmail=3D"gmail_sig=
nature"><font face=3D"monospace"><br></font></div><div class=3D"gmail_signa=
ture show" data-smartmail=3D"gmail_signature"><font face=3D"arial, sans-ser=
if">Of course, I can evidence it once existed:</font></div><div class=3D"gm=
ail_signature show" data-smartmail=3D"gmail_signature"><font face=3D"monosp=
ace"><br></font></div><div class=3D"gmail_signature show" data-smartmail=3D=
"gmail_signature"><font face=3D"monospace">ls /dev/ada1* =C2=A0 <br>/dev/ad=
a1 =C2=A0 =C2=A0 =C2=A0 /dev/ada1s1 =C2=A0 =C2=A0 /dev/ada1s1a =C2=A0 =C2=
=A0/dev/ada1s1b<br></font></div><div class=3D"gmail_signature show" data-sm=
artmail=3D"gmail_signature"><br></div><div class=3D"gmail_signature show" d=
ata-smartmail=3D"gmail_signature">Where did it go, and is it possible to us=
e it, or is it gone forever?</div><div class=3D"gmail_signature show" data-=
smartmail=3D"gmail_signature">(I know I can create a swap file on=C2=A0ada1=
s1a, so it&#39;s not the end of the world.)</div><div class=3D"gmail_signat=
ure show" data-smartmail=3D"gmail_signature"><br></div><div class=3D"gmail_=
signature show" data-smartmail=3D"gmail_signature">Thanks,</div><div class=
=3D"gmail_signature show" data-smartmail=3D"gmail_signature">Bill Dudley</d=
iv><div dir=3D"ltr" class=3D"gmail_signature show" data-smartmail=3D"gmail_=
signature"><br></div></div><br></div></div><br><div class=3D"gmail_quote"><=
div dir=3D"ltr" class=3D"gmail_attr">On Wed, Jul 17, 2024 at 6:02=E2=80=AFP=
M William Dudley &lt;<a href=3D"mailto:wfdudley@gmail.com">wfdudley@gmail.c=
om</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margi=
n:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex=
"><div dir=3D"ltr">Thanks<div><br></div><div>tunefs -L foo it is, then.</di=
v><div><br></div><div>Bill Dudley<br clear=3D"all"><div><div dir=3D"ltr" cl=
ass=3D"gmail_signature">This email is free of malware because I run Linux.<=
/div></div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Wed, Jul 17, 2024 at 4:33=E2=80=AFPM Matthew Seaman=
 &lt;<a href=3D"mailto:matthew@freebsd.org" target=3D"_blank">matthew@freeb=
sd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left=
:1ex">On 17/07/2024 20:58, William Dudley wrote:<br>
&gt; How do I prevent the drive names from changing?=C2=A0 Or can&#39;t I?<=
br>
&gt; <br>
<br>
One of the following?<br>
<br>
* glabel(8) for gpart(8) disk partitions<br>
<br>
* tunefs(8) can add a label to UFS2 filesytems<br>
<br>
In either case a disk device using the label will appear under /dev, and <b=
r>
you can use that in fstab(5)<br>
<br>
You might already have labels on your drive partitions: the FreeBSD <br>
installer creates them by default.=C2=A0 Try `gpart show -l` to see.<br>
<br>
Or just use ZFS -- it knows its own drives, no matter what device the OS <b=
r>
wants to call them.=C2=A0 There&#39;s a fun party trick to take out the dri=
ves <br>
containing a ZFS pool, shuffle them around, reinstall and boot up again.<br=
>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Cheers,<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 Matthew<br>
<br>
</blockquote></div>
</blockquote></div>

--0000000000000e1006061d7aa302--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFsnNZKE7SxySu=vUGWYb8rYvrNoFGtwV062HnuUOz1Wj499Gw>