[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
grub-probe for nested BSD partition on Linux (was: [PATCH 1/1] add --par
From: |
Andrei Borzenkov |
Subject: |
grub-probe for nested BSD partition on Linux (was: [PATCH 1/1] add --partuuid to probe) |
Date: |
Tue, 28 Feb 2017 20:13:53 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
28.02.2017 17:08, Vladimir 'phcoder' Serbinenko пишет:
>>
>> OK I see, kernel skips BSD partition marked as "unused".
>>
>> So it appears that kernel always puts special nested partitions after
>> normal logical MSDOS partitions, so it will not skew MSDOS partition
>> numbers.
>>
>> [ 1.529752] vda: vda1 vda2 vda3 < vda5 vda6 >
>> vda2: <openbsd: vda7 >
>>
>>
>> /*
>> * Look for partitions in two passes:
>> * First find the primary and DOS-type extended partitions.
>> * On the second pass look inside *BSD, Unixware and Solaris
>> partitions.
>> */
>>
>> For such partition (vda7) PARTUUID is empty.
>>
>> P.S. I wonder whether we correctly map such partition ... no, we do not.
>>
>> 10:~ # cat /tmp/foo
>> (hd0) /dev/vda
>> 10:~ # grub2-probe -m /tmp/foo -t compatibility_hint -d /dev/vda2
>> hd0,msdos2
>> 10:~ # grub2-probe -m /tmp/foo -t compatibility_hint -d /dev/vda5
>> hd0,msdos5
>> 10:~ # grub2-probe -m /tmp/foo -t compatibility_hint -d /dev/vda7
>> hd0,msdos2
>>
> WAI. In case when subpartition starts at the same sector as partition
> itself.
>
Sorry? vda7 is 256M, how can you suddenly pretend it is 2G?
10:~ # fdisk -l /dev/vda
Disk /dev/vda: 5 GiB, 5368709120 bytes, 10485760 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
Disklabel type: dos
Disk identifier: 0x882b18da
Device Boot Start End Sectors Size Id Type
/dev/vda1 2048 2099199 2097152 1G 83 Linux
/dev/vda2 2099200 6293503 4194304 2G a6 OpenBSD
/dev/vda3 6293504 10485759 4192256 2G 5 Extended
/dev/vda5 6295552 6819839 524288 256M 83 Linux
/dev/vda6 6821888 7346175 524288 256M 83 Linux
10:~ # fdisk -l /dev/vda2
Disk /dev/vda2: 2 GiB, 2147483648 bytes, 4194304 sectors
Geometry: 16 heads, 63 sectors/track, 10402 cylinders
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: bsd
Slice Start End Sectors Size Type Fsize Bsize Cpg
a 2099200 2623488 524289 256M boot 0 0 0
b 2099200 2623488 524289 256M unused 0 0 0
c 2099200 6293503 4194304 2G unused 0 0 0
d 0 10485215 10485216 5G unused 0 0 0
Partition table entries are not in disk order.
- Re: [PATCH 1/1] add --partuuid to probe, (continued)
- Re: [PATCH 1/1] add --partuuid to probe, Vladimir 'phcoder' Serbinenko, 2017/02/15
- Re: [PATCH 1/1] add --partuuid to probe, Andrei Borzenkov, 2017/02/15
- Re: [PATCH 1/1] add --partuuid to probe, Vladimir 'phcoder' Serbinenko, 2017/02/15
- Re: [PATCH 1/1] add --partuuid to probe, Andrei Borzenkov, 2017/02/19
- Re: [PATCH 1/1] add --partuuid to probe, Vladimir 'phcoder' Serbinenko, 2017/02/26
- Re: [PATCH 1/1] add --partuuid to probe, Andrei Borzenkov, 2017/02/27
- Re: [PATCH 1/1] add --partuuid to probe, Vladimir 'phcoder' Serbinenko, 2017/02/27
- Re: [PATCH 1/1] add --partuuid to probe, Andrei Borzenkov, 2017/02/27
- Re: [PATCH 1/1] add --partuuid to probe, Vladimir 'phcoder' Serbinenko, 2017/02/28
- grub-probe for nested BSD partition on Linux (was: [PATCH 1/1] add --partuuid to probe),
Andrei Borzenkov <=
- Re: grub-probe for nested BSD partition on Linux (was: [PATCH 1/1] add --partuuid to probe), Lennart Sorensen, 2017/02/28
- Re: grub-probe for nested BSD partition on Linux, Andrei Borzenkov, 2017/02/28
- Re: grub-probe for nested BSD partition on Linux, Lennart Sorensen, 2017/02/28
- Re: grub-probe for nested BSD partition on Linux, Andrei Borzenkov, 2017/02/28