All of lore.kernel.org
 help / color / mirror / Atom feed
* GRUB2 msdos logical partition numbering mismatch with Linux partitions
@ 2012-10-16 16:51 Andrey Borzenkov
  2012-10-17  2:46 ` Andrey Borzenkov
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2012-10-16 16:51 UTC (permalink / raw)
  To: grub-devel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GRUB2 msdos logical partition numbering mismatch with Linux partitions
  2012-10-16 16:51 GRUB2 msdos logical partition numbering mismatch with Linux partitions Andrey Borzenkov
@ 2012-10-17  2:46 ` Andrey Borzenkov
  2012-10-17 10:07   ` Michael Chang
  0 siblings, 1 reply; 3+ messages in thread
From: Andrey Borzenkov @ 2012-10-17  2:46 UTC (permalink / raw)
  To: grub-devel

В Вт., 16/10/2012 в 20:51 +0400, Andrey Borzenkov пишет:
> 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)
> 

Sorry, ignore that. It was caused by local distribution patch. I had to
check better.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GRUB2 msdos logical partition numbering mismatch with Linux partitions
  2012-10-17  2:46 ` Andrey Borzenkov
@ 2012-10-17 10:07   ` Michael Chang
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Chang @ 2012-10-17 10:07 UTC (permalink / raw)
  To: The development of GNU GRUB

2012/10/17 Andrey Borzenkov <arvidjaar@gmail.com>:
> В Вт., 16/10/2012 в 20:51 +0400, Andrey Borzenkov пишет:
>> 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)
>>
>
> Sorry, ignore that. It was caused by local distribution patch. I had to
> check better.

Probably the patch allowing embedding on extended partition is the
culprit. It's only in openSUSE.

http://www.mail-archive.com/grub-devel@gnu.org/msg18893.html

Regards,
Michael

>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-17 10:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-16 16:51 GRUB2 msdos logical partition numbering mismatch with Linux partitions Andrey Borzenkov
2012-10-17  2:46 ` Andrey Borzenkov
2012-10-17 10:07   ` Michael Chang

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.