Step-by-step how to format and partition a 2TB drive

I simply want to format with ext4 and partition my 2TB drive! 2 days searching, and this couldn’t be any more elusive to me.

Step-by-step-how-to… does such a thing exist?

Here’s the error I get running fdisk:


linux-l89o:~ # fdisk -l


Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000bf99c


   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              63  3904293014  1952146476   83  Linux
Partition 1 does not start on physical sector boundary.


linux-l89o:~ # fdisk /dev/sdb

The device presents a logical sector size that is smaller than
the physical sector size. Aligning to a physical sector (or optimal
I/O) size boundary is recommended, or performance may be impacted.


Command (m for help): 

I don’t care about the partition already there… I just want it gone, drive reformatted properly, set as a single partition, mount it, and start over with my friggin life…

step-by-step… like I’m 5… pretty please.

On 07/12/2012 11:36 AM, goltoof wrote:
>
> I simply want to format with ext4 and partition my 2TB drive! 2 days
> searching, and this couldn’t be any more elusive to me.
>
> Step-by-step-how-to… does such a thing exist?
>
> Here’s the error I get running fdisk:
>
> Code:
> --------------------
>
> linux-l89o:~ # fdisk -l
>
>
> Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
> 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 4096 bytes
> I/O size (minimum/optimal): 4096 bytes / 4096 bytes
> Disk identifier: 0x000bf99c
>
>
> Device Boot Start End Blocks Id System
> /dev/sdb1 63 3904293014 1952146476 83 Linux
> Partition 1 does not start on physical sector boundary.
>
>
> linux-l89o:~ # fdisk /dev/sdb
>
> The device presents a logical sector size that is smaller than
> the physical sector size. Aligning to a physical sector (or optimal
> I/O) size boundary is recommended, or performance may be impacted.
>
>
> Command (m for help):
>
> --------------------
>
>
> I don’t care about the partition already there… I just want it gone,
> drive reformatted properly, set as a single partition, mount it, and
> start over with my friggin life…

You are using too old a version of fdisk. Your 2 TB driver is certain to have
4096 byte sectors, and starting partition 1 in sector 63 will give you lousy
performance because every write will be split across a physical sector and
require 2 writes.

My suggestion is that you cownload the latest System Rescue CD from
http://www.sysresccd.org/Download, burn and boot it. You will get a version of
fdisk that knows about 4K sectors. In addition, you will get a copy of Gparted,
which gives you a GUI. If you have questions about partitioning, you should also
read the partitioning tutorial at
http://www.sysresccd.org/Sysresccd-Partitioning-EN-Introduction-to-disk-partitioning.

If you don’t care about the data and the partition, it will be simple. With sdb1 NOT mounted, just wipe out the first sector*. It will blank the partition table. Once you’ve done that, just reboot (it will be easier and save me some explanations). Then use gpart or YaST partitioner to create, format and mount the new partition. This time, it will be properly aligned and should start at sector 2048.

  • I assume you’re not booting from this hard disk. Otherwise the explanation will be more complicated.

To blank the first sector, type the following in a terminal:


su -l
dd if=/dev/zero of=/dev/sdb bs=512 count=1

MAKE ABSOLUTELY SURE sdb is the disk you want to wipe out! Double and triple check - because device names may sometimes change between reboots (sda beconing sdb and vice versa).

Okay, I did everything up to the point of creating a partition in gparted


The only option it gives me to format is hfs… everything else is grayed out. Why can’t I do it in ext4? How should I set each field to allow me to do so?

And only one other question… isn’t there a way to simply change the sector size from 512/4096 for sectors to 4096/4096 in parted?

You have to specify the size of the partition you want to add (even if it is the only partition). To do so, you can drag the rigth arrow to the end to use all the available space. Then you will be able to select ext4. You might optionally enter a label (something like ‘DATA’ would be appropriate), and finally click on ‘add’.

It will not allow me to specify any size greater than 2048, nothing other than hfs, no matter what I do… and only allows 2048 if I try to add another partition in addition to the 1st…

Indeed, I can see that. Humm … I see that the block size I give you was wrong. It should have been 2048.


su -l
dd if=/dev/zero of=/dev/sdb bs=2048 count=1

and to zero fill more sectors:


su -l
dd if=/dev/zero of=/dev/sdb bs=2048 count=64

On 2012-07-12 22:36, goltoof wrote:
> Okay, I did everything up to the point of creating a partition in
> gparted
> http://i.imgur.com/p7zPU.png

GPT!


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Unless you got a better howto… please try to follow along and answer coherently so as not to confuse me or the people helping out :slight_smile:

After running the latter command, I create a gpt partition table for the device, and when creating a new partition it’s till not allowing me to select more than 2048mb, and hfs still only option.

In addition… fdisk still tells me the
“Sector size (logical/physical): 512 bytes / 4096 bytes”
and
“Partition 1 does not start on physical sector boundary.”

On 2012-07-13 00:06, goltoof wrote:
>
> robin_listas;2474026 Wrote:
>> On 2012-07-12 22:36, goltoof wrote:
>>> Okay, I did everything up to the point of creating a partition in
>>> gparted
>>> http://i.imgur.com/p7zPU.png
>>
>> GPT!
>>
>
> Maybe you noticed it’s open in the screen shot? Try to follow along
> and answer relevantly so as not to confuse the people helping out :slight_smile:

It is relevant. Very relevant.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Not relevant in any way to the STEP I’m on… again… if you’ve been paying any attention to where I am currently at all.
Step-by-Step… please. Seriously. I am begging… please. Step-by-step is the title of this post.
.

On Thu, 12 Jul 2012 22:18:07 +0000, Carlos E. R. wrote:

> On 2012-07-13 00:06, goltoof wrote:
>>
>> robin_listas;2474026 Wrote:
>>> On 2012-07-12 22:36, goltoof wrote:
>>>> Okay, I did everything up to the point of creating a partition in
>>>> gparted http://i.imgur.com/p7zPU.png
>>>
>>> GPT!
>>>
>>>
>> Maybe you noticed it’s open in the screen shot? Try to follow along
>> and answer relevantly so as not to confuse the people helping out :slight_smile:
>
> It is relevant. Very relevant.

Perhaps if you explained how that would avoid the inevitable argument
about whether or not it is relevant.

Generally, one word answers aren’t very useful to those who don’t know
what the terminology is. Even knowing what the terminology means, I have
to admit that I don’t really know what you’re trying to say here.

Clarity is always preferred over brevity. Remember that not everyone has
the experience or understanding that those with more experience have.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

On 2012-07-13 00:18, Carlos E. R. wrote:
> On 2012-07-13 00:06, goltoof wrote:
>>
>> robin_listas;2474026 Wrote:
>>> On 2012-07-12 22:36, goltoof wrote:
>>>> Okay, I did everything up to the point of creating a partition in
>>>> gparted
>>>> http://i.imgur.com/p7zPU.png
>>>
>>> GPT!
>>>
>>
>> Maybe you noticed it’s open in the screen shot? Try to follow along
>> and answer relevantly so as not to confuse the people helping out :slight_smile:
>
> It is relevant. Very relevant.

After your private post, I insist that it is relevant, and the people that
are helping you will know it. It is in fact a pointer to them.

You can not make a bigger partition because you do not have a partition
table, you have a GPT table.

You do not know me. Do not think that what I said was in vain.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Something tells me it’s too late. People tend to not respond after so many responses and so many confusing intruders. That’s how quickly an entire post, that I’m pretty WAS going somewhere can get completely derailed… just like my last post.

Admin, is there any way I can delete this post and start over? And do the same for the last one? No reason to keep unresolved posts that no one will answer due to compounded confusion, would you agree?

All day… and still no ccohesive answer why I can’t setup a FRESH 2tb drive on a FRESH opensuse install. This is unreal…

Thanks for your response.

No, it is not, especially since it it not the boot disk here.

No. This hard disk didn’t have GPT before (otherwise fdisk -l in post #1 would have complained). And it certainly doesn’t have a GPT now after wiping out the first track. It should be blank. On a blank disk, some distros - such as Fedora - would simply install the system using GPT ( and an extra BIOS partition to boot). I’m not aware that gparted does create a GPT on a blank disk. But even it would, it shouldn’t not be a problem.

@goltoof,
To answer the question if it is relevant or not to use GPT on your second hard disk, it is NOT relevant … unless it matters to you. It would matter if your hard disk was over 2 TB - although with some tricks, you could also use up to 4 TB with MBR partitioning by creating a single 2 TB partition just before the end of the addressable space (it will only work under Linux, not Windows). But it is not the case here. So don’t worry about that! You should be able to create a single 2 TB partition on that disk whether you use MBR or GPT. Did you try YaST partitioner? And how did you start gparted? As root? You should start it as root, because normal users don’t have write access to disk devices.

I see the end of a warning in the upper left corner of your screenshot - which could indicate that sda has a GUID partition table. But if it’s the case how are you booting? Legacy Grub can not boot GPT. Are you using Grub2? Are you using openSUSE at all?

On Thu, 12 Jul 2012 23:26:03 +0000, goltoof wrote:

> Admin, is there any way I can delete this post and start over?

There’s no need - starting over is likely to result in a similar
discussion, so let’s just continue here and for those who are trying to
assist, let’s make sure that the answers provided (as always) contribute
clearly to helping the OP with the issue they’re having.

Since there’s a GPT table involved here and that’s limiting the ability
to create a larger partition, what advice would you give someone in this
situation?

If (as I understand, and I haven’t read the entire thread myself so I may
be missing something) the OP’s goal is to create a 2 GB partition on an
external drive, the contents of which he doesn’t care to preserve, then
it seems the easiest solution to propose is to wipe out the partition
table and create a new, single partition, then run mkfs.<whatever> to
create the filesystem.

Or alternatively, use the YaST partitioner to create a new partition
table and filesystem.

Let’s not make the answer any more complicated than it needs to be.

Thanks,

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Yes, something is weird. Your hard disk should appear blank if it had MBR before. If it had GPT, it might still have the second GPT header at the last logical sector of the disk. Something like that could confuse gparted. Maybe your disk had MBR (the one you showed us in post #1), but it used to have GPT earlier at some point. You could wipe out the whole disk. You have nothing to lose on hat disk anyway.

su -l
dd if=/dev/zero of=/dev/sdb bs=2048

and then … get some sleep. It will take hours.

On 2012-07-13 01:36, please try again wrote:
>
> robin_listas;2474048 Wrote:
>>
>>> It is relevant. Very relevant.
>>
>
> No, it is not, especially since it it not the boot disk here.

I agree that GPT is not needed here, yes. But GPT doesn’t relate to boot
disks only, it is needed for disks over 2.19 TB or 2 TiB. However, the
photo he posted shows that he is indeed using GPT, and that is messing the
issue, because the partition is created in the faked partition table that a
GPT table contains. I think he is getting into hybrid mode.

> robin_listas;2474048 Wrote:
>>
>> You can not make a bigger partition because you do not have a
>> partition
>> table, you have a GPT table.
>>
>
> No. This hard disk didn’t have GPT before (otherwise fdisk -l in post
> #1 would have complained).

See post #10:

> After running the latter command, I create a gpt partition table for the device, and when creating a new partition it’s till not allowing me to select more than 2048mb, and hfs still only option.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

On 2012-07-13 01:56, please try again wrote:

> Yes, something is weird. Your hard disk should appear blank if it had
> MBR before. If it had GPT, it might still have the second GPT header at
> the last logical sector of the disk. Something like that could confuse
> gparted. Maybe your disk had MBR (the one you showed us in post #1), but
> it used to have GPT earlier at some point. You could wipe out the whole
> disk. You have nothing to lose on hat disk anyway.

Should not gparted be able to create a new table (partition or gpt) on
request, erasing old data?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)