You are not logged in.

#1 2013-03-04 05:40:09

costil
Member
From: Greece
Registered: 2012-02-21
Posts: 23

Partitioning SSD and HDD for GPT with gparted

A little help here,
according to what i've read so far I'm about to set my partitions on a 60GBssd and 1TBhdd system, using gparted from an ubuntu liveCD, like that:

On a gpt partition table

60GBssd, sda:

[ sda1 | sda2 ]
sda1: 1MB, unallocated filesystem with flag-bios_grub
sda2: rest of ssd, ext4 filesystem for /

1TBhdd, sdb:

[ sdb1 | sdb2 | sdb3 | sdb4 ]
sdb1: 1MB, unallocated filesystem no flag for gpt
sdb2: 15GB, ext4 for /var
sdb3: ext4 for /home
sdb4: 1GB swap

Question 1: is sdb1 needed?
Question 2: according to https://wiki.archlinux.org/index.php/User:Skodabenz/GPT do I have to leave 1MB partitions at the end of both drives for gpt backup table and header?

I believe I've misread the wiki's..
Making this clear will be helpfull for those who feel comfortable doing this job with gparted GU

Offline

#2 2013-03-04 06:14:12

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Partitioning SSD and HDD for GPT with gparted

First, the phrase "unallocated filesystem" is an oxymoron -- unallocated space is just that: unallocated (unused). You can't put a filesystem in unallocated space. You could put a filesystem in a partition and then delete the partition, rendering its disk space (and hence the filesystem) unallocated, but then you wouldn't be able to access the filesystem except by creating a new partition that covers the same space or by using awkward low-level access methods.

Your /dev/sda1 partition doesn't describe anything unallocated; aside from the improper use of the word "unallocated," and the fact that it's a partition but not a filesystem, I believe you're referring to a BIOS Boot Partition, which GRUB 2 uses to boot Linux from a GPT disk on BIOS-based computers.

It's unclear what /dev/sdb1 is. I suspect it's not needed -- but see below.

Note the distinction between a partition and a filesystem: A partition is a contiguous group of sectors on a hard disk, such as sectors 1024 to 290,208. Partitions are defined in fairly simple data structures known as partition tables (aka disk labels or some other names). Partitions can contain filesystems, which are much more complex data structures that enable you to read and write files by using filenames. Partitions can hold other types of data, too, such as swap space, GRUB 2 code, or logical volume manager (LVM) data.

In the GPT scheme, a few sectors are used at both the start and the end of the disk to hold the GPT data structures. You have no control over this and you don't explicitly allocate this space to partitions yourself; they're allocated in this way when you write a GUID Partition Table to the disk. The space is well under the 1MiB figure you quote, though -- it's normally about 17KiB. That said, for unrelated reasons having to do with disk performance, partitions are normally aligned to start on 1MiB boundaries on the disk. This means that there's usually a gap of just under 1MiB of unused space at the start of the disk. Some tools place a similar gap at the end of the disk, too, but this isn't quite as common.

Offline

#3 2013-03-04 09:20:28

costil
Member
From: Greece
Registered: 2012-02-21
Posts: 23

Re: Partitioning SSD and HDD for GPT with gparted

Yes you are right about the "unallocated filesystem" phrase being an oxymoron. What I meant is an unformatted-no filesystem partition. It is stated like this when you choose filesystem from the menu in gparted, choosing "unallocated" leaves the partition unformatted without filesystem.

So sdb1 as stated above is probably not needed, if I set "1MB free space preceding" the first partition in the hdd ( the second non bootable drive) will be adequate.

Finally in order to clarify, sould I set 1MB free space following the last partition in each drive, or is this taken care from he gpt partition table?

Offline

#4 2013-03-04 16:28:52

s1ln7m4s7r
Member
Registered: 2013-02-22
Posts: 262

Re: Partitioning SSD and HDD for GPT with gparted

I don't use grub2, instead a use syslinux and gpt table (bios system) and for it you don't need to create any extra partition. I have also another system with refind and gpt table (efi system) and the only extra partition you need is the efistub fat32 partition

UPDATE: Miss Information: Just to say that i created the partition structures with sgdisk, and it automatically moves first partition start to sector 2048 because of gpt specifications.

Last edited by s1ln7m4s7r (2013-03-04 20:23:08)

Offline

#5 2013-03-04 17:25:43

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: Partitioning SSD and HDD for GPT with gparted

costil wrote:

Yes you are right about the "unallocated filesystem" phrase being an oxymoron. What I meant is an unformatted-no filesystem partition. It is stated like this when you choose filesystem from the menu in gparted, choosing "unallocated" leaves the partition unformatted without filesystem.

There are two terms that GParted uses, in different contexts:

  • Unallocated -- This term applies to space that is unpartitioned; no partition exists in unallocated space, and you're free to create additional partitions in that space.

  • Unformatted -- This term applies to a partition that's been created but that contains no filesystem. It's used in the "Create a New Partition" dialog box and is shown in the main screen for empty partitions.

You're using "unallocated" in place of both terms, but they are distinct and each has its own meaning.

Finally in order to clarify, sould I set 1MB free space following the last partition in each drive, or is this taken care from he gpt partition table?

It doesn't really matter. GParted won't let you do anything illegal, like create partitions that overlap with each other or with the GPT data structures. If you want to leave some free space at the beginning or the end of the disk, that's fine, but it won't really serve any purpose unless you plan to use that space in the future. (Some OSes, like OS X, have partitioning tools that like to see free space between partitions, but Linux doesn't need this.) As I noted, most modern tools align the start points of partitions to 1MiB boundaries, which can result in close to 1MiB of free space at the start of the disk and sometimes small gaps between partitions. Some versions of GParted also leave a little space at the end of the disk and won't let you use that space.

Offline

Board footer

Powered by FluxBB