# FreeBSD 9 installer doesn't recognize existing partitions



## jturner (Sep 10, 2012)

I'm trying to install FreeBSD 9.1-rc along side OpenBSD and 2 other primary partitions in a MBR layout. When bsdinstall reaches the partitioning section I select manual. My drive (Samsung SSD PM830 mSATA) is recognized as ada0, whoever the partitioning wizard presents the drive as if it's uninitialized, rather than showing the 3 primary partitions that are present.

I even tried creating a FreeBSD partition (A5) under OpenBSD with out any luck. If I run fdisk from the FreeBSD shell I see the 3 primary partitions. If I run gpart I only see the usb key I used to boot the installer.

Looking at the dmesg output the only piece of information that might be helpful is this:
GEOM_PART: integrity check failed (ada0, MBR)

I'm not sure if gpart is only for GPT layouts so this information may be irrelevant. I guess the big question is, does bsdinstall support MBR partitions and if it does, why doesn't it recognize mine?

Any help would be great, thanks.


----------



## wblock@ (Sep 10, 2012)

gpart(8) handles MBR in addition to GPT and several other types of partitioning schemes.  The problem is that your MBR partitions are messed up somehow and fail the integrity check.  The FreeBSD 9 release notes show how to disable this feature.


----------



## jturner (Sep 10, 2012)

Thanks, that did the trick. The other partitions are now showing up in the installer and gpart show them as well, with the CORRUPT label. Now to figure out why and how to fix it.


----------



## jturner (Sep 10, 2012)

Alright, I'm still trying to fix my MBR so I can continue the install process. Here is my fdisk output from OpenBSD. Is the problem the NTFS C/H/S locations?


```
Disk: sd0       geometry: 15566/255/63 [250069680 Sectors]
Offset: 0       Signature: 0xAA55
            Starting         Ending         LBA Info:
 #: id      C   H   S -      C   H   S [       start:        size ]
-------------------------------------------------------------------------------
 0: DE      0   1   1 -      4 254  63 [          63:       80262 ] Dell Maint  
 1: 07      5  25  21 -   2387  58  39 [       81920:    38268928 ] NTFS        
*2: A6   2387   1   1 -  10200 254  63 [    38347218:   125531847 ] OpenBSD     
 3: 00      0   0   0 -      0   0   0 [           0:           0 ] unused
```


----------



## wblock@ (Sep 11, 2012)

CHS stuff should be obsolete everywhere.  Disks don't work like that any more, and have not for a long, long time.

Please show the output from gpart(8).


----------



## jturner (Sep 11, 2012)

```
# gpart show
=>       63  250069617  ada0  MBR  (119G)  [CORRUPT]
         63      80262     1  !222  (39M)
      80325       1595        - free -  (797k)
      81920   38268928     2  ntfs  (18G)
   38350848  211718832        - free -  (101G)
```

My OpenBSD partition isn't showing up in spot 3. I wonder since it starts at the same cylinder (2387) the ntfs partition ends at, that might be the problem?


----------



## kpa (Sep 11, 2012)

Forget the cylinders, heads and sectors. The LBA numbers are the only ones that count now (the CHS numbers seem to be correct in this case but I wouldn't trust them in general). It looks like the NTFS partition is overlapping with the OpenBSD partition. The end LBA of the NTFS partition is 38350848 (81920 + 38268928) but the OpenBSD partition is marked to start at LBA 38347218. FreeBSD's geom(4) sees this as a corrupt MBR partition table.


----------



## jturner (Sep 11, 2012)

Yeah that was what I was afraid off. I appreciate everyone's help. Feel free to mark this thread as solved.


----------

