grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-probe for nested BSD partition on Linux (was: [PATCH 1/1] add -


From: Lennart Sorensen
Subject: Re: grub-probe for nested BSD partition on Linux (was: [PATCH 1/1] add --partuuid to probe)
Date: Tue, 28 Feb 2017 13:31:41 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Feb 28, 2017 at 08:13:53PM +0300, Andrei Borzenkov wrote:
> 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.

Well that does look mostly sane for an ancient BSD version.

Slice a is the rootfs for BSD

Slice b should traditionally be swap, but appears to be unused here,
and for some reason uses the same part of the disk as slice a, which
does look odd.  Maybe since the type is unknown, it doesn't matter.

Slice c is the whole partition containing the slices (vda2)

Slice d is the whole disk (vda), which apparently hasn't been used in
BSD for a couple of decades now, if wikipedia can be trusted.

So if linux only bothers to count the partition with a type that isn't
unused, then it probably makes sense.  That appears to be what the
partition parsing code does.

The start being the same as the start of vda2 does seem odd given it
appears that you are supposed to leave space at the start (1 track
recommended, or 64 sectors), and it appears the disklabel is at sector
1 (0 being the first), so it doesn't seem like having your filesystem
start there would be safe unless the filesystem has reserved space at
the start for such things.

-- 
Len Sorensen



reply via email to

[Prev in Thread] Current Thread [Next in Thread]