UFS Dual boot (W10/Freebsd): names of slices changed and freebsd-swap disappeared

Hi,
The name of the partitions changed (after a W10 update). I am not sure if this is the root cause but this is what happened apparently.
Basically to start my freebsd, I had to select the new name of the partition at the boot (rootmount). Before this issue, the name of the partition was /dev/ada0s3a and now is /dev/ada0s4 (see gpart below)
Freebsd-swap disappeared and now there is a partition named !39. In the man of gpart(), I can't find some reference to the partition named "!39".

How to restore the Freebsd-swap ?
Can I use this partition (/dev/ada0s3) as swap by edit fstab ?

Thanks for you insights.

% gpart show
=> 63 500118129 ada0 MBR (238G)
63 1985 - free - (993K)
2048 1185792 1 ntfs (579M)
1187840 108609084 2 ntfs (52G)
109796924 452 - free - (226K)
109797376 1196032 3 !39 (584M)
110993408 2048 - free - (1.0M)
110995456 389122736 4 freebsd [active] (186G)

Fstab
# Device Mountpoint FStype Options Dump Pass#
/dev/ada0s4 / ufs rw 1 1
/dev/ada0s3b none swap sw 0 0
proc /proc procfs rw 0 0


 
Makes perfect sense. The "adaXsY" is not a permanent name of the slice, it is just a numbering of which slices were found. If you add another disk drive, then ada1 can easily become ada2. And if you add another slide (a.k.a. partition a.k.a. ...), then ada0s3 can become ada0s4. Or any other combination. What do we learn from this? Using disk and slice numbers works, but is brittle, and that house of cards will collapse if you blow on it wrong. Better idea: name your partitions. How to do it is described in the handbook, regularly described here, and I think somewhere on the forum is a good guide for doing it. Once you are 110% sure which partition is which, you should name them.

Now, what happened to your swap partition? Good question. Some purple monster came and ate it? Seriously, the WIndows 10 install or update must have eaten it. Which is sort of OK, since swap has no permanent data on it anyway.

I have no idea what is in the partition of type "!39" (that is its type, not its name). Matter-of-fact, a quick web search shows that partition type 39 (or perhaps 0x27) is not used commonly. Before you should use it for swap, you should probably find out. Try determining whether it contains a file system. The fstyp utility is a starting point. If that doesn't work, then save the first 10...100 MiB of it to a temporary file, zero them out, and restart both FreeBSD and Windows. If everything works, it wasn't needed (might even be free). If something breaks, copy the data you saved back.

Welcome to running dual-boot with a single disk drive; it causes interesting complications.
 
  • Thanks
Reactions: BB_
Back
Top