Adding packages (specifically Parted). Need some guidance

Hi again everyone. Using my standard “knowing just enough to be dangerous/get into trouble”, I’m trying to add parted to openwrt, using the makefile here: [https://github.com/tobiaswaldvogel/openwrt-addpack/blob/master/parted/Makefile]

The one small glitch in my plan is that I have absolutely no idea what I’m doing, if I’m honest about it. I’m trying to partition my 8tb drive which I’ve installed in my NAS enclosure. I tried formatting it on my desktop, but it doesn’t seem to like the job I did (“Partition 2 does not start on physical sector boundary”), so I figured I’d try partitioning it directly from the T/O, but from what I gather, fdisk doesn’t do GPT.

I’m not wedded to parted, this was just the solution I thought I’d found. Can anyone give me some pointers?

Thanks!

Chris

1 Like

try

cfdisk /dev/sda

or whatever your disk is…

fdisk, sfdisk, cfdisk are all only for MBR usage, for GPT you need to use gdisk or similiar. The TO and OpenWrt is able to mount GPT disk, but there are no tools to create GPT partition table directly from OpenWrt system (see https://wiki.openwrt.org/doc/howto/storage#partitioning). To create GPT table use some full-feature OS (e.g.: Ubuntu in VirtualBox, or maybe lxc-container - but this I don’t test).

Turris has fdisk that is able to create GPT table and partitions:

Command (m for help): g
Created a new GPT disklabel (GUID: CA77609D-E952-485A-8FFE-FB73B54922E3).

Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-12766, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-12766, default 12766):

Created a new partition 1 of type ‘Linux filesystem’ and of size 5.2 MiB.

Command (m for help): p
Disk abc: 6.3 MiB, 6553600 bytes, 12800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: CA77609D-E952-485A-8FFE-FB73B54922E3

Device Start End Sectors Size Type
abc1 2048 12766 10719 5.2M Linux filesystem

2 Likes

Sorry, my mistake, I life in older time, I just check ubuntu man pages, and I see there is 2 different packages gnu-fdisk and util-linux, and origin gnu-fdisk doesn’t support GPT. The fdisk which is in util-linux support it.