Re: New 12.04 install using Advance Format Drive and LVM
You can try simply creating the partitions in advance with parted. parted is very precise when creating partitions and can work with many different units like sectors, MiB, GiB, etc. I usually start of with MiB to align the first partitions starting at 2048 sectors (1MiB). But note that some 4k disks might have different sector size. parted can also show you the logical and physical sector size.
Separate /boot partition is no longer needed for LVM but I think it might help having it. So, to create a /boot partition of 500MiB with parted you would do something like (also starting with new blank gpt table if you don't use dual boot).
Code:
sudo parted /dev/sda
mklabel gpt
unit MiB
mkpart GRUB 1 2
set 1 bios_grub on
mkpart BOOT 2 502
quit
That will create 1MiB bios_grub partition which you need for grub2 if you use gpt table, and 500MiB partition that you will use as ext4 /boot during the install. If you want you can continue creating partitions while the unit is still MiB, so to create a 100GiB partition marked as lvm you would do like:
Code:
mkpart LVM1 502 102902
set 3 lvm on
The above assumes the partition is #3 and it will set the lvm flag on it so that it can be used as physical device for LVM later easily.
EDIT NOTE: If you decide to go with gpt and bios_grub partition, DO NOT format it as any filesystem. it should have NO filesystem. Just create it with parted, set the bios_grub flag and that's it. The installer will use it while installing grub2 to the MBR.
EDIT PPS: Most 4k disks have logical sector size of 512B for compatibility reason, but 4096B physical sector size so that more capacity can fit on the plates. The disk electronics usually handles the logic of the difference between the logical and physical sector size, so to the machine the hdd looks exactly like the older 512B disks. But in some cases the logical sector size can be 4096B too, so be careful if working with sectors. That's why I prefer MiB in parted because MiB is a MiB regardless of sector size.
If you have any questions, ask. You can see details about the disk and the sector size and total number of sectors with:
sudo parted /dev/sda print
Last edited by darkod; January 25th, 2013 at 11:44 AM.
Darko.
-----------------------------------------------------------------------
Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit
Bookmarks