You are not logged in.

#1 2011-07-21 08:48:59

czarkoff
Member
From: Herceg Novi, Montenegro
Registered: 2009-09-23
Posts: 18

fdisk doesn't give an option to create a partition from the beginning

I had a disk with a single BSD patition taking all space. To have the disk formatted with ext2 I used dd to blank it out and then tried to partition it with fdisk. There I got a weird thing:

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
72 heads, 63 sectors/track, 137818 cylinders, total 625142448 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
Disk identifier: 0x015d4cc9

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-625142447, default 2048): 

Setting first sector to anything bellow 2048 makes fdisk output:

Value out of range.

Why so, and what can I do to have a partition starting at CHS 0:1:1?

Last edited by czarkoff (2011-07-21 09:08:37)

Offline

#2 2011-07-21 10:47:08

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: fdisk doesn't give an option to create a partition from the beginning

I don't know why this 1MB value was choosen. I think it has to do with partition alignment and maybe leaving room for GPT or something, but 1MB is way too much for that.

If you really want to use all the space and need only one partition, you might be able to use /dev/sdb directly without any partition table... I've never tried that though.

However, 1MB is only 0.0003% of your 350GB disk. Do you still care? wink

Edit: removed two zeroes from the decimals. Still small smile.

Last edited by stqn (2011-07-21 11:11:56)

Offline

#3 2011-07-22 09:56:49

czarkoff
Member
From: Herceg Novi, Montenegro
Registered: 2009-09-23
Posts: 18

Re: fdisk doesn't give an option to create a partition from the beginning

stqn wrote:

I don't know why this 1MB value was choosen. I think it has to do with partition alignment and maybe leaving room for GPT or something, but 1MB is way too much for that.

The idea was to clear the mbr, and 1M size is what I am used to as it seems to be the best choice performance-wise.

From Your answer it seems that I misunderstand something. What should I do to make fdisk just partition this drive as if it was new and clean?

Offline

#4 2011-07-22 11:18:51

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: fdisk doesn't give an option to create a partition from the beginning

Hm, I'm not sure if I understand you either. When I talk about a "1 MB value", I'm talking about the 2048 sectors that fdisk forces you to keep before the first partition.

To "partition your drive as if it was new", just create one primary partition starting at 2048.

Offline

Board footer

Powered by FluxBB