View previous topic :: View next topic |
Author |
Message |
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2716 Location: Edmonton, AB
|
Posted: Thu Dec 08, 2011 8:02 pm Post subject: Partitioning 2TB HD |
|
|
When try to partition 2TB HD "fdisk /dev/sda"
trying to create boot partition, first sector starts with 2048?
Why not 1?
first sector (2048-3907029167), default 2048
For root will be 50GB, home the rest; or should I split home to two larger ones?
On Gentoo Documentation page there use to be tendency to create separate partition for Home but it seems to me now home is under /root
Is there a reason for it? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Thu Dec 08, 2011 8:25 pm Post subject: |
|
|
Joseph_sys,
To understand why not 1, I need to describe some PC history. A long time ago, when the PC was first provided with hard drives, the first block on the drive was used by the Master Boot Record. Thats still true today, the first partition always began on Cylinder 0, Head 1, Sector 0, under the Cylinder/Head/Sector addressing scheme, whic is all there was than.
To add to the interest, hard drives actually had differing numbers of sectors per track then and you had to describe the real geometry of the drive to the BIOS. There was no auto dectect or Logical Block Addressing as used today. The Cylinder/Head/Sector addressing scheme broke permently when hard drives reached 4Gb but its legacy lives on.
The largest numbers that fit in the CHS addressing scheme is 255 heads and 63 sectors per track. Hence until recently, the first partition always started at sector 63. Thats head 1, sector 0.
Over the years, boot loaders have used some of the 'unallocated' space between the MBR and the start of the first partition.
With the death of the legacy BIOS (ok, its not quite dead yet) and its replacement with EFI BIOS, a special boot partitionis needed to allow EFI systems to boot in EFI mode.
Starting the first partition at sector 2048 leaves 1Mb for the EFI boot code. Modern partitioning tools do this anyway and fdisk has been updated to follow suit.
You can force some tools to give you back most of this 1Mb but its usually a bad idea.
Your 2Tb drive will use 4k physical sectors. Its very important that you create partitions that are aligned on 4kb boundaries or your read/write speeds will be very poor. That is, partition starts must be a multiple of eight sectors. Notice that 63 is not a multiple of 8 but that 2048 is.
As you really need to leave some space for grub, you should not start your first partition before sector 64. If you know how big grub is, you can make that smaller but its not worth the effort. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2716 Location: Edmonton, AB
|
Posted: Thu Dec 08, 2011 8:37 pm Post subject: |
|
|
NeddySeagoon wrote: | [snip]
Your 2Tb drive will use 4k physical sectors. Its very important that you create partitions that are aligned on 4kb boundaries or your read/write speeds will be very poor. That is, partition starts must be a multiple of eight sectors. Notice that 63 is not a multiple of 8 but that 2048 is.
As you really need to leave some space for grub, you should not start your first partition before sector 64. If you know how big grub is, you can make that smaller but its not worth the effort. |
Thank you for the explanation.
Yes, the first sector will be 2048, I can not change it. So all the number should be divisible by 8 isn't it?
50G for root
100G for home and the rests for home2
Should I use parted for partitioning or fdisk since I'll have smaller partitions. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Thu Dec 08, 2011 8:50 pm Post subject: |
|
|
Joseph_sys,
I would use parted now. fdisk used to have (may still have) the quaint habit of forcing partitions to start and end on cylinder booudaries, which was an old DOS 'rule of thumb' but never actually needed. if fdisk still does that, it will be very difficult to make partitions that start at a multiple of 8 sectors.
You might like to consider GPT partition tables and using Logical Volume Manager. Neither are required.
Logical Volume Manager allows you to resize 'partitions' on the fly to move space around provided you choose filesystems that also support resizing.
Windows does not support LVM, so this would be a Linux only feature. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2716 Location: Edmonton, AB
|
Posted: Thu Dec 08, 2011 9:06 pm Post subject: |
|
|
I'll try parted and using GPT but I don't think I'll need LVM I don't intend to resize the drives though I'll use windows under VirtualBox; hope this will not be a problem?
Though, I will use ext4 as it seems to be faster, found an interesting blog:
http://gavinroy.com/initial-ext3-vs-ext4-results
If I partition "root /" as ext4 will I have a problem mounting ext3 partitioned hard drives? |
|
Back to top |
|
|
tclover Guru
Joined: 10 Apr 2011 Posts: 516
|
Posted: Thu Dec 08, 2011 9:14 pm Post subject: |
|
|
I would recommend GPT fdisk (sys-apps/gptfdisk) to get a maximum flexibility to partion your disk GPT/MBR tables. You can set that value to whatever, well almost, you like. And if you don't need to dual boot with Windoze, you can pretty much use GPT partitioned disk. Well, maybe you'll need to trick GRUB LEGACY with a hybrid MBR, GRUB2 will boot with GPT partitioned disk without any tricks--if you include part_gpt modules when intsalling grub. And you can all those tricky hybrid MBR with GPT fdisk. That said, windoze can read GPT partitioned disk just fine, it simply cannot boot from if it's not in EFI mode with windoze 7 (x64) and later. _________________ home/:mkinitramfs-ll/:supervision/:e-gtk-theme/:overlay/ |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54813 Location: 56N 3W
|
Posted: Thu Dec 08, 2011 9:15 pm Post subject: |
|
|
Joseph_sys,
Virtual box will be fine.
If you make root ext4, you will need kernel support for ext4 to get root mounted.
You will also need support for ext3 to mout ext3 drives.
However, if you turn off both ext2 and ext3 support, you will get a new option under ext4 to use ext4 to mount ext2 and ext3 partitions.
This is what I use.
Code: | │ │ < > Second extended fs support │ │
│ │ < > Ext3 journalling file system support │ │
│ │ <*> The Extended 4 (ext4) filesystem │ │
│ │ [*] Use ext4 for ext2/ext3 file systems (NEW) │ │ |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Joseph_sys Advocate
Joined: 08 Jun 2004 Posts: 2716 Location: Edmonton, AB
|
Posted: Thu Dec 08, 2011 9:33 pm Post subject: |
|
|
I'll use ext2 for boot and "/" and "home" will be ext4 I think |
|
Back to top |
|
|
|
|
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
|
|