Gentoo Archives: gentoo-user

From: Mike Gilbert <floppym@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Fdisk reports new HD as 10MiB
Date: Tue, 09 Jul 2019 22:06:37
Message-Id: CAJ0EP42WVCtUT87vXXY+D+A865TCghZNakAJo==XFvZfrfbb4A@mail.gmail.com
In Reply to: Re: [gentoo-user] Fdisk reports new HD as 10MiB by Vladimir Romanov
1 On Fri, Jul 5, 2019 at 10:14 AM Vladimir Romanov <blueboar2@×××××.com> wrote:
2 >
3 > Fdisk can not work with drives larger than 2TB. Your drive may be slightly (10 mb) larger than that, so the result. For such disks you need not Fdisk, but GPT programs.
4
5 Correction: modern fdisk provided by util-linux supports
6 creating/modifying GPT disks, and emits a warning that MBR cannot be
7 used for disks over 2 TB. Just enter a "g" to switch to GPT mode.
8
9 That looks something like this:
10
11 % truncate -s 3T foo.img
12 % fdisk foo.img
13
14 Welcome to fdisk (util-linux 2.34).
15 Changes will remain in memory only, until you decide to write them.
16 Be careful before using the write command.
17
18 Device does not contain a recognized partition table.
19 The size of this disk is 3 TiB (3298534883328 bytes). DOS partition
20 table format cannot be used on drives for volumes larger than
21 2199023255040 bytes for 512-byte sectors. Use GUID partition table
22 format (GPT).
23
24 Created a new DOS disklabel with disk identifier 0x9a0d6a8c.
25
26 Command (m for help): g
27 Created a new GPT disklabel (GUID: 0B1A00C7-7E53-9644-ACD1-F9A4B67A34AA).