UFS Creating a FreeBSD data partition after an NTFS boot partition

Hi everyone,
long time no see, but for the most part, things have been going quite smoothly.
Now I'm trying to bring an old computer back to life with new disks and new OSes, and that is giving me headaches on various levels.

As of now, I have an SSD with FreeBSD 12.1, and a SATA disk with Windows 10 on a small (500GB) partition. I want to use the rest of this disk as a data disk for FreeBSD, but I'm just not getting it done.

I was't able to (read: couldn't figure out how to) create a second partition on this disk, so I created it from Windows. I did not assign a drive letter or format ist. The next step would probably be to use gpart modify, but I don't know where to obtain the index requred for this operation

Thanks,
Frank
 
Maybe this will help.
I think "gpart add" with no size (-s) parameter will allocate all the space until the end of the slice. You'll wind up with a single "a" partition that takes up the entire mirror, and the second command to allocate swap will fail. You'll have to use the -i parameter to specify the "index" of the partition you are adding. These indexes show up as letters in the partition names e.g., /dev/mirror/gm0s1a will be the partition at index 1. I dunno why gpart(8) doesn't use letters to match the partition device names. Makes it confusing.

I think what you're trying to do is in English "make one 4GB swap partition, and use the rest of the disk for a root partition". If so, the gpart commands you want are:
Code:
gpart add -t freebsd-swap -a 1m -s 4g -i 2 mirror/gm0s1
gpart add -t freebsd-ufs  -a 1m -i 1       mirror/gm0s1

N.B., You cannot use index 3, aka the "c" partition. That is reserved and always spans the entire slice.
 
Thanks! It took me some time to figure it out, though. I think the manual is a bit too concise if you're new to gpart 🤔
 
Thanks! It took me some time to figure it out, though. I think the manual is a bit too concise if you're new to gpart 🤔
I've been partitioning disks since the '80s and I took me some time to figure it out too.
 
Communication, feedback, simplicity & courage. Add a little bit of curiosity - not recklessness; but with a command named show it's usually hard to cause damage even as root.
 
I still question the choice to use numerical indices instead of the alphabetical system we're all used to. This is especially counter-intuitive when the device node names still use letters for the different partitions.
 
I still question the choice to use numerical indices instead of the alphabetical system we're all used to. This is especially counter-intuitive when the device node names still use letters for the different partitions.
On UNIX, numbers have always (?) been used to enumerate partitions. Drive letters are a unique "feature" of DOS/Windows. What is alphabetical are the BSD slices. These are slightly (sigh!) different from partitions. Some partitioning schemes allow for much more than 26 partitions, espc. the widely used GPT.
 
Drive letters are a unique "feature" of DOS/Windows.
They were actually common with CP/M. MS-DOS used the same naming convention, they're not "unique" to DOS/Windows.

What is alphabetical are the BSD slices.
No, those are partitions, slices are numbered. For example ada0s1a, where s1 is the first slice, and a the first partition of that slice.
 
Thx. Well, it's too easy to mix that up... ;) If I got it right, in the traditional BSD speech the slice is what is called a partition nowadays, right?
 
in the traditional BSD speech the slice is what is called a partition nowadays
Yes, a BSD slice and a MS-DOS or BIOS "partition" are the same thing. Note however that the name slice was used first, long before DOS started calling them partitions.

The naming convention is largely irrelevant on UNIX (-like) systems because we typically don't deal with disks but with filesystems. Everything is mounted on a single directory tree too.
 
Thx. Well, it's too easy to mix that up... ;) If I got it right, in the traditional BSD speech the slice is what is called a partition nowadays, right?
I have to look up the difference between slices and partitions every time...
 
Just stick to GPT, that only has partitions. MBR is old news.
 
Back
Top