Go Back   DaemonForums > Other Operating Systems > Other BSD and UNIX/UNIX-like

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
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 21st May 2017
comet--berkeley comet--berkeley is offline
Real Name: Richard
Package Pilot
Join Date: Apr 2009
Location: California
Posts: 154
Default Linux bug mounting FreeBSD partitions

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:
--- 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
                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 */
Update 2017-05-29: This is now fixed in Linux-4.12-rc3 thanks to Christoph Hellwig and Jens Axboe and of course Linus.
When you see a good move, look for a better one.

Last edited by comet--berkeley; 30th May 2017 at 04:36 PM. Reason: Fixed in Linux-4.12-rc3
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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

All times are GMT. The time now is 07:12 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick