From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: GRUB2 msdos logical partition numbering mismatch with Linux partitions
Date: Tue, 16 Oct 2012 20:51:12 +0400 [thread overview]
Message-ID: <1350406272.2842.17.camel@opensuse.site> (raw)
It appears that in case of logical partitions GRUB2 counts each "glue"
entry (that points to the next EBR) as fully fledged partition which
results in
bor@opensuse:~/src/grub> sudo /usr/sbin/grub2-probe -t drive
-d /dev/sda8
(hd0,msdos11)
Quick script to walk logical partitions chain:
Extended partition 2, type 0x05, start at 1044225, size 487347840
Logical partition 5 (grub 5), type 0x82, start at 1044288, size 8385867
Glue partition (grub 6), type 0x05, start at 9430155, size 62910540
Logical partition 6 (grub 7), type 0x83, start at 9430218, size 62910477
Glue partition (grub 8), type 0x05, start at 72340695, size 125837145
Logical partition 7 (grub 9), type 0x83, start at 72340758, size
125837082
Glue partition (grub 10), type 0x05, start at 198177840, size 290214225
Logical partition 8 (grub 11), type 0x8e, start at 198177903, size
290214162
for a disk
bor@opensuse:~> LC_ALL=C sudo /sbin/fdisk -l /dev/sda
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x70000000
Device Boot Start End Blocks Id System
/dev/sda1 * 63 1044224 522081 83 Linux
/dev/sda2 1044225 488392064 243673920 5 Extended
/dev/sda5 1044288 9430154 4192933+ 82 Linux swap /
Solaris
/dev/sda6 9430218 72340694 31455238+ 83 Linux
/dev/sda7 72340758 198177839 62918541 83 Linux
/dev/sda8 198177903 488392064 145107081 8e Linux LVM
And to prove
bor@opensuse:~/src/grub> for i in 5 6 7 8; do sudo /usr/sbin/grub2-probe
-t drive -d /dev/sda$i; done
(hd0,msdos5)
(hd0,msdos7)
(hd0,msdos9)
(hd0,msdos11)
It is apparently also inconsistent between distributions (probably
different GRUB2 versions); reports are that Ubuntu 12.04 gets numbers
right and Fedora 16 and openSUSE 12.2 gets them wrong (I am under
openSUSE 12.2).
Is it intentional? If anything, this is extremely confusing for an
unprepared user.
-andrey
next reply other threads:[~2012-10-16 16:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-16 16:51 Andrey Borzenkov [this message]
2012-10-17 2:46 ` GRUB2 msdos logical partition numbering mismatch with Linux partitions Andrey Borzenkov
2012-10-17 10:07 ` Michael Chang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1350406272.2842.17.camel@opensuse.site \
--to=arvidjaar@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.