Discussion:
GPT - BIOS Boot Partition - Disk Alignment
(zu alt für eine Antwort)
Thomas Wildgruber
2013-01-11 22:02:50 UTC
Permalink
Hi Group,

ich habe ein Debian System auf einer BIOS basierten VM zu Testzwecken
installiert. Dazu habe ich während der Installation als erste Partition
eine kleine BIOS Boot Partition angelegt. Grub2 will die wohl haben.

Als Größe habe ich nach diversen im Netz gefundenen Empfehlungen[1] 1MB
gewählt. 1 MiB hat der Installer nicht zugelassen. Jetzt habe ich mit
parted das Alignment überprüft und festgestellt, dass die Platte falsch
ausgerichtet ist:

---snip---
# parted /dev/sda align-check opt 1
1 not aligned
---snap---

Das Partitionslayout schaut so aus:

---snip---
# parted /dev/sda unit s print unit MB print unit MiB print
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 10485760s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 34s 1987s 1954s bios_grub
2 1988s 8595738s 8593751s ext3
3 8595739s 10485726s 1889988s linux-swap(v1)

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 0,02MB 1,02MB 1,00MB bios_grub
2 1,02MB 4401MB 4400MB ext3
3 4401MB 5369MB 968MB linux-swap(v1)

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 5120MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 0,02MiB 0,97MiB 0,95MiB bios_grub
2 0,97MiB 4197MiB 4196MiB ext3
3 4197MiB 5120MiB 923MiB linux-swap(v1)
---snap---

Kann es sein, dass der Debian Installer die Angabe MB bei der
Partitionsgröße wörtlich nimmt und die Partition nur 1000 MB groß macht?
Das könnte wohl die falsche AUsrichtung erklären ... aber wie verhindere
ich das nun während der Installation?

[1] http://www.rodsbooks.com/gdisk/booting.html

Thx & Bye Tom
--
"Ich weiß nicht, was der französische Staatspräsident Mitterand denkt, aber
ich denke dasselbe." (Helmut Kohl)
Thomas Wildgruber
2013-01-12 22:34:51 UTC
Permalink
Post by Thomas Wildgruber
Kann es sein, dass der Debian Installer die Angabe MB bei der
Partitionsgröße wörtlich nimmt und die Partition nur 1000 MB groß macht?
Das könnte wohl die falsche AUsrichtung erklären ... aber wie verhindere
ich das nun während der Installation?
Also ich hab das jetzt mal gefixt aber das ist recht umständlich. Ich hab
bei der Installation das parted-Paket mit geladen und bin an der Stelle wo
die Festplatten erkannt werden in ein Terminal gesprungen und habe dort die
Partitionen mit parted angelegt:

---snip---
# parted --align optimal /dev/sda
(parted) mklabel gpt
(parted) unit s
(parted) mkpart primary 2048 4096
(parted) set 1 bios_grub on
---snap---

Die restlichen Partitionen habe ich dann im Installer angelegt. Das
Partitionslayout war dann wie folgt:

---snip---
# parted /dev/sda unit s print unit MB print unit MiB print
Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 10485760s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 2048s 4096s 2049s primary bios_grub
2 4097s 8597847s 8593751s ext3
3 8597848s 10485726s 1887879s linux-swap(v1)

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 5369MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1,05MB 2,10MB 1,05MB primary bios_grub
2 2,10MB 4402MB 4400MB ext3
3 4402MB 5369MB 967MB linux-swap(v1)

Model: VMware, VMware Virtual S (scsi)
Disk /dev/sda: 5120MiB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 1,00MiB 2,00MiB 1,00MiB primary bios_grub
2 2,00MiB 4198MiB 4196MiB ext3
3 4198MiB 5120MiB 922MiB linux-swap(v1)
---snap---

Und das Alignment passt jetzt aber das kann doch nicht sein oder? Da müsste
man doch über Tonnen von Tutorial stolpern aber die Info war echt zäh zu
finden...

Thx & Bye Tom
--
"One good Whiskey a day, keeps the doctor away"
Loading...