![]() |
|
Other BSD and UNIX/UNIX-like Any other flavour of BSD or UNIX that does not have a section of its own. |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
My MBR formatted disk drive has Linux, OpenBSD and FreeBSD in separate partitions.
When Linux starts up and tries to recognize FreeBSD subpartitions, it always fails with this message: sda3: <bsd:bad subpartition - ignored ... Linux has no trouble with the OpenBSD subpartitions: sda2: <openbsd: sda16 sda17 sda18 ... FreeBSD subpartitions use relative block addresses whereas OpenBSD and NetBSD use absolute block addresses. Here is a patch to Linux to adjust the FreeBSD partitions: Code:
--- a/block/partitions/msdos.c 2015-12-27 18:17:37.000000000 -0800 +++ b/block/partitions/msdos.c 2015-12-29 10:44:25.813773357 -0800 @@ -300,6 +300,8 @@ static void parse_bsd(struct parsed_part continue; bsd_start = le32_to_cpu(p->p_offset); bsd_size = le32_to_cpu(p->p_size); + if (memcmp(flavour, "bsd\0", 4) == 0) + bsd_start = bsd_start + offset; if (offset == bsd_start && size == bsd_size) /* full parent partition, we have it already */ continue;
__________________
When you see a good move, look for a better one. --Lasker Last edited by comet--berkeley; 30th May 2017 at 04:36 PM. Reason: Fixed in Linux-4.12-rc3 |
|
|||
![]()
This should be now fixed in Linux 4.4.73, 4.9.33, 4.11.6 and 4.12
__________________
When you see a good move, look for a better one. --Lasker |
|
|||
![]()
There is a problem mounting older FreeBSD file systems using the original patch.
Here is a newer patch: Code:
--- a/block/partitions/msdos.c.orig 2017-11-05 13:05:14.000000000 -0800 +++ b/block/partitions/msdos.c 2017-11-06 09:46:00.148228242 -0800 @@ -301,7 +301,9 @@ static void parse_bsd(struct parsed_part continue; bsd_start = le32_to_cpu(p->p_offset); bsd_size = le32_to_cpu(p->p_size); - if (memcmp(flavour, "bsd\0", 4) == 0) + /* FreeBSD has relative offset if C partition offset is zero */ + if (memcmp(flavour, "bsd\0", 4) == 0 && + le32_to_cpu(l->d_partitions[2].p_offset) == 0) bsd_start += offset; if (offset == bsd_start && size == bsd_size) /* full parent partition, we have it already */
__________________
When you see a good move, look for a better one. --Lasker |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot mount Linux ext2 partitions | notooth | NetBSD General | 4 | 25th October 2015 02:54 PM |
mounting UFS partitions? | chessmaster | OpenBSD General | 0 | 10th February 2014 01:50 AM |
Weird problem mounting RAID partitions | clevershark | FreeBSD General | 1 | 12th March 2010 05:28 PM |
Mounting ext2 partitions seems to fail | Sunsawe | FreeBSD Installation and Upgrading | 2 | 17th June 2009 01:38 PM |
Moving linux partitions out of the BSD disklabel/slice | fbsduser | NetBSD Installation and Upgrading | 5 | 4th March 2009 07:07 AM |