Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
parted warning message: requesting a partition
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sun Jul 22, 2012 7:37 pm    Post subject: parted warning message: requesting a partition Reply with quote

From the Gentoo Handbook, Code Listing 4.5 (Creating the partitions) reads, in part:
Code:

# Create a 32 mbyte /boot partition
(parted) mkpart primary ext2 0 32mb
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i

parted shows slightly different output. This is what I see:
Code:

(parted) mkpart primary ext2 0 32mb
Warning: You requested a partition from 0.00B to 32.0MB (sectors 0..62500).
The closest location we can manage is 512B to 1048kB (sectors 1..2047).
Is this still acceptable to you?
Yes/No?

What is this warning message really trying to say? If I accept, will that break the installation?
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)


Last edited by Drone4four on Sun Jul 22, 2012 8:09 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5761

PostPosted: Sun Jul 22, 2012 7:49 pm    Post subject: Reply with quote

parted is helpfully asking before overwriting your disk's partition table (the first 512 bytes) with the start of that partition. You should accept its suggestion.

A better thing to do would be starting at 1MB, that way it's aligned correctly and also you won't have problems installing the GRUB bootloader later on.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jul 22, 2012 7:51 pm    Post subject: Reply with quote

Drone4four,

You have a drive with a physical sector sixe of 4096b (or more) rather than the standard 512b.
You can go ahead and ignore the warning by your disl accesses will be much slower than they need to be as your drive will fake 512b sectors by doing read/modify/writes.

You should make sure that your partitions start on a multiple of 4096b or 8x412b sectors so you do not have the speed hit. Emperical evidence shows that misaligned partitions can cost you a factor of 30 in speed.
With the avent of EFI and the need for some boot space, its become tradional to start the first partition at 1Mb. This leaves space for EFI to do its thing and ensures proper alignment for advanced format drives.
Note SSDs may use a larger physical sector size then 4kb.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sun Jul 22, 2012 8:34 pm    Post subject: Reply with quote

I decided to go ahead and accept that warning, even if the consequence is a 30 fold performance hit. Moving on to the next item in the code listing, I ran into another message -- this one seemingly fatal. The Gentoo Handbook Code Listing reads:
Code:

# Create a 32 mbyte /boot partition
(parted) mkpart primary ext2 0 32mb
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? i

# Create a 512 mbyte swap partition
(parted) mkpart primary linux-swap 32mb 542mb

My error message when passing that last parted parameter reads, "Can't create any more partitions." Rather than type out all the steps made, I took a screenshot of my virtual machine. Here is my Gentoo installation: http://picpaste.com/pics/partitioning-zY2Cnyja.1342988773.png

The sector I specified for the end of the swap partition was an estimate (6000mb). The, "Can't create any more partitions" seems completely irrelevant still.

What have I done wrong?

The last time I tried installing Gentoo was years ago. I recall using the mkpartfs command for formatting partitions which was so much easier compared to using parted today.
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jul 22, 2012 8:54 pm    Post subject: Reply with quote

Drone4four,

First, the partition table was a dirty hack to get around the fact that Hard Drives had grown above the 32Mb limit imposed by MSDOS of the day.
There was enough space left in the MBR, after the boot loader, to allow for a partition table with four entries. That allowed for HDD up to 128Mb. I really mean MB here too.

There were two fixes to the 128Mb limit. DOS allowed for cluster sizes of 32kb ... thats the smallest amount of spce it would allocate, which allowed a partition to be 2GB, and the concept of the Extended Partition was introduced. The Extended Partition only reserves space in the primary partition table. You then create logical partitions inside the Extended partition.

Today the rules for MSDOS disk lables are :-
You may have at most, four primary partitons. (This is the limiy you have hit)
One primary partition may be of type extended.
Further logical partitions may be created 'inside' the Extended partition.

Delete your partitions and start again if you need more than four partitions.

edit. Both parted and fdisk accept +32[kMGT] for the end of the partitoin for 32kb, Mb, Gb or TB. You don't need to do the aritemetic.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sun Jul 22, 2012 9:09 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Today the rules for MSDOS disk lables are :-
You may have at most, four primary partitons. (This is the limiy you have hit)
One primary partition may be of type extended.
Further logical partitions may be created 'inside' the Extended partition.

That is explained in the Gentoo Handbook. I get that. I am not trying to create more than 4 partitions. As you should be able to see in that screen shot of my virtual machine, using parted I am having trouble formatting my Linux swap partition. That is what I am trying to troubleshoot. What made you think that I was trying to create more than 4 partitions?
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jul 22, 2012 9:37 pm    Post subject: Reply with quote

Drone4four,

Drone4four wrote:
My error message when passing that last parted parameter reads, "Can't create any more partitions."

The partition type you give to swap in the partition is not used by te system. Its just a reminder for you. Anyway,
Code:
(parted) help set                                                         
  set NUMBER FLAG STATE                    change the FLAG on partition NUMBER

   NUMBER is the partition number used by Linux.  On MS-DOS disk labels,
        the primary partitions number from 1 to 4, logical partitions from 5
        onwards.
        FLAG is one of: boot, root, swap, hidden, raid, lvm, lba, hp-service,
        palo, prep, msftres, bios_grub, atvrecv, diag, legacy_boot
        STATE is one of: on, off
(parted)   

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Drone4four
Apprentice
Apprentice


Joined: 09 May 2006
Posts: 247

PostPosted: Sun Jul 22, 2012 9:48 pm    Post subject: Reply with quote

I already partitioned my virtual disc drives using fdisk. Does this mean I don't have to continue partitioning using parted? Am I to use one or the other and not both?
_________________
My rig:
IBM Personal System/2 Model 30-286 - - Intel 80286 (16 bit) 10 Mhz - - 1MB DRAM - - Integrated VGA Display adapter
1.44MB capacity Floppy Disk - - PS/2 keyboard (no mouse)
Back to top
View user's profile Send private message
Xootneg
n00b
n00b


Joined: 19 Oct 2003
Posts: 23
Location: N. California

PostPosted: Mon Aug 06, 2012 7:53 pm    Post subject: Reply with quote

I also had to deal with this issue. For more information on how to fix this issue see the following article from IBM:

http://www.ibm.com/developerworks/linux/library/l-4kb-sector-disks/

The article explains work-arounds and performance hit test results when not corrected properly.

I used fdisk, and this is the command I used to solve the issue:
fdisk -H 224 -S 56 /dev/sda
Read the article under "fdisk family" for explanation of this command...

There is one cravat I ran into. I wanted the first partition to be fat32. After setting partition 1 to fat32 I had to write fdisk (w) and then reenter fdisk again with the original fdisk command to set up my extended and logical partitions. In other words, I entered with - fdisk -H 224 -S 56 /dev/sda - for a second time after writing partition 1 as fat32..

When I continued making all the partitions AFTER setting partition 1 to fat32 without writing the partition 1 changes first, it fails with the partition error again.

I no longer get any error messages in fdisk.

There is quite a bit of differing information about this on the Internet which can actually add to the confusion. I think the above IBM article can really help to provide you clarity.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum