gpart: No partitioning scheme found reddit / freebsd ---------------------------------------------------------------------- idude0407 · 2023-07-25 10:51 I installed FreeBSD13.2 on hard a 500G hard drive. I did a manual partitioning using gpart, and it worked just fine, but left 171G on the hard drive of free space to create a ms-basic-data partition later on. => 40 625142368 diskid/DISK-0000AB1236A0 GPT (298G) 40 532480 1 efi (260M) 532520 1024 2 freebsd-boot (512K) 533544 984 - free - (492K) 534528 25165824 3 freebsd-swap (12G) 25700352 241172480 4 freebsd-zfs (115G) 266872832 358269576 - free - (171G) Doing some searching, I found out that gpart accepts only objects of class PART. The above info tells me that the disk is of object class DISK only even though I used gpart to create it, I'm a bit confused here. To make things short, how do I create another partition using the free space that I have left on the disk? Can I make the disk of class PART also, so I can use gpart? ---------------------------------------------------------------------- grahamperrin · 2023-07-25 14:59 I'm an infrequent user of [gpart\(8\)](https://man.freebsd.org/cgi/man .cgi?query=gpart&sektion=8&manpath=freebsd-release) (I prefer a utility with more integral guidance), so I can't write authoritatively. That said: at a glance, I see nothing wrong with the end result that's tabled above. I see a device with a GPT, with four partitions and two areas of free space. I guess that what you did was comparable to the first part of *GPT* under [EXAMPLES](https://man.freebsd.org/cgi/man.cgi?query=gpart&sekti on=8&manpath=freebsd-release#EXAMPLES). gpart should be usable for creation of the additional partition. Re: understandings of objects and classes, no comment from me other than a reference to [geom\(4\)](https://man.freebsd.org/cgi/man.cgi?qu ery=geom&sektion=4&manpath=freebsd-release). HTH ---------------------------------------------------------------------- FUZxxl · 2023-07-25 15:45 gpart add -s 171G -t ms-basic-data diskid/DISK-0000AB1236A0 ---------------------------------------------------------------------- grahamperrin · 2023-07-25 19:33 Thanks, > `gpart add -s 171G -t ms-basic-data diskid/DISK-0000AB1236A0` Theoretically, what would be the purpose of specifying an index number when adding a partition? ---------------------------------------------------------------------- FUZxxl · 2023-07-25 19:36 Partition indices need not to be contiguous. You can assign any unused partition index to a new partition. > Can there be an index number that's not associated with a partition, before adding a partition at the index? Yes. This is true for any partition index for which no partition exists. ---------------------------------------------------------------------- grahamperrin · 2023-07-25 19:44 > … any partition index for which no partition exists. I struggle to visualise this, I mean, how it would appear in output from `gpart show`. ---------------------------------------------------------------------- FUZxxl · 2023-07-25 20:23 E.g. you could have a partition 1 and a partition 4 with no partitions 2 and 3. ---------------------------------------------------------------------- grahamperrin · 2023-07-25 20:46 I probably threw a bunch of words from the manual page and elsewhere into the tumble drier in my head … hardly surprising that I couldn't make sense of what fell out when I opened the door. Confused myself with this imaginary partition index number without a partition: => 40 625142368 diskid/DISK-0000AB1236A0 GPT (298G) 40 532480 1 efi (260M) 532520 1024 2 freebsd-boot (512K) 533544 984 - free - (492K) 534528 25165824 3 freebsd-swap (12G) 25700352 241172480 4 freebsd-zfs (115G) 266872832 358269576 6 (171G) It's nonsense, of course. ---- /u/idude0407 sorry for the thread hijack. /u/FUZxxl non-contiguity is understandable. Thanks again. ---------------------------------------------------------------------- idude0407 · 2023-07-25 23:33 That did the trick, but I have no idea how to format it to fat32 or NTFS, since `/dev` doesn't contain any devices for diskid/DISK-0000AB1236A0. ---------------------------------------------------------------------- idude0407 · 2023-07-26 00:39 I was able to format it using `diskid/DISK-0000AB1236A0p5` as my device but I can't mount it using. `mount_msdosfs diskid/DISK-0000AB1236A0p5 /mnt` I get this error: **mount\_msdosfs: diskid/DISK-0000AB1236A0p5: Invalid fstype: Invalid argument** ---------------------------------------------------------------------- FUZxxl · 2023-07-26 07:01 You need to mount using the full path, e.g. mount -t msdosfs /dev/diskid/DISK-0000AB1236A0p5 /mnt ---------------------------------------------------------------------- idude0407 · 2023-07-26 09:41 Got it. It took forever to mount it, but it did mount. I must have missed that directory in /dev. Now everything makes sense!