Other logical NTFS partition not detected by gpart

Hey,
my problem is the following, some help would be greatly appreciated:
I'm on FreeBSD 10.3, trying to mount (read/write) an NTFS-EBR partition, which is on the same disk as my operating system. I've been able to successfully mount my other NTFS-drives, have ntfs-3g/fuse installed and seem to fail at my insufficient knowledge about disk-schemes.
This is the ouput of gpart show, concerning that drive:

Code:
=>       63  976773105  ada0  MBR  (466G)
         63         63        - free -  (32K)
        126   97660773     1  freebsd  [active]  (47G)
   97660899         27        - free -  (14K)
   97660926  879110146     2  ebr  (419G)
  976771072       2096        - free -  (1.0M)

=>       0  97660773  ada0s1  BSD  (47G)
         0  97660772       1  freebsd-ufs  (47G)
  97660772         1          - free -  (512B)

=>        0  879110146  ada0s2  EBR  (419G)
          0          1          - free -  (512B)
          1    6246401       1  linux-swap  (3.0G)
    6246402  872863744          - free -  (416G)
As I interpret the output, gpart does not seem to know of the NTFS-partition (which is the 416G one) , so is that missing in the MBR? What confuses me though, is that my Windows has no Problem to see and read/write to that partition.
Is there some way to let BSD be able to read that partition, without deleting the content on it, since it is almost full? I've read the gparted manual thoroughly, is gpart set the option im searching for? I really want to keep my data, so that is why I am asking here, to be sure not to delete my stuff.
By the way, i already tried mounting every single da/ada device in etc/. But after looking at them with gpart show /dev/ad*, none seems to be the one I am searching for.
I hope you can help me and the problem is only resulting from my ignorance.
 
EBR is not a partition on its own, it contains partitions. Similar to a FreeBSD slice containing partitions. And looking further at the output the EBR only contains a single linux-swap partition and is pretty much empty.
 
I know that much. That is what is confusing me, since there definitely is that partition, which is here shown as empty, as I am able to use it under Windows. Or am I not seeing something?
 
You might need to take a closer look with diskpart.exe on Windows. I wouldn't be surprised if they did something non-standard.
 
Code:
DISKPART> list partition

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
  Partition 1    Primary             46 GB    63 KB
  Partition 0    Extended           419 GB    46 GB
  Partition 3    Logical           3050 MB    46 GB
  Partition 2    Logical            416 GB    49 GB

DISKPART> select partition 2

Partition 2 is now the selected partition.

DISKPART> attributes volume
Read-only              : No
Hidden                 : No
No Default Drive Letter: No
Shadow Copy            : No

DISKPART> filesystems

Current File System

  Type                 : NTFS
  Allocation Unit Size : 4096
  Flags : 00000000

File Systems Supported for Formatting

  Type                 : NTFS (Default)
  Allocation Unit Sizes: 4096 (Default), 8192, 16K, 32K, 64K

DISKPART> detail partition

Partition 2
Type  : 07
Hidden: No
Active: No
Offset in Bytes: 53201600512

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
* Volume 2     D   Data         NTFS   Partition    416 GB  Healthy

DISKPART>
Did you mean this?
Appears perfectly fine to me. Anything I missed, any commands that I should issue?
 
Judging by the "Offset in Bytes" it should indeed be after the linux-swap partition. There's a little "gap" in between but that shouldn't be a problem (probably lines up better at specific boundaries). To be honest I have no idea why it's not picking it up.
 
Well, what a shame. Thanks for trying anyways. So what would you recommend then for a NTFS-partition, which OS/tool should I use to recreate it, without the risk of this happening again?
 
So what exactly do you want inside that extended partition? Just a Linux root partition and swap partition, and an NTFS partition for sharing files between Linux and FreeBSD? Or do you also want to boot a Windows system?

If you only want Linux and FreeBSD, just remove the EBR altogether and have a standard 4 MBR partitions layout: FreeBSD, Linux /, Linux swap, NTFS.
 
No, I just want FreeBSD and a NTFS partition (not for booting), the swap partition is only there, because of former linux installs, as is the EBR. Could've removed that one already, but I'll do that, when I remove the EBR. But I had hoped I would get around backing up the whole partition.
Thanks for trying, though I still don't know what went wrong here.
 
I don't really see how this is relevant, since as I already wrote, I tried mounting all of them, and after looking at them individually, the NTFS partition, does not appear. Also this may add to the confusion, since I have a total of three disks. Also I'm sure you meant ls /dev/ad* ?! But here you go.

Code:
$ ls /dev/ad*
/dev/ad10       /dev/ad10s2     /dev/ad6        /dev/ad6s1      /dev/ad6s1a     /dev/ad6s2      /dev/ad6s5      /dev/ad8        /dev/ad8s1      /dev/ada0       
/dev/ada0s1     /dev/ada0s1a    /dev/ada0s2     /dev/ada0s5     /dev/ada1       /dev/ada1s1     /dev/ada2       /dev/ada2s2
 
I am having the same problem here (FreeBSD 12.1-RELEASE-p4).

NTFS partition is the second in EBR (same disk, as shiro), but instead FreeBSD recognizes it as a free space (same as shiro). In my case, it shares the EBR with a linux-data partition instead of linux-swap.

I am able to mount, read and write the NTFS partition in Linux with no problems, as well as it was the case with FreeBSD (12.1-RELEASE) using UFS. I went for a fresh install because I wanted to go for ZFS, and then the problem appeared (but as shiro has shown, it doesn't seem to be a ZFS-install-only issue).

Seems FreeBSD wasn't seeing that partition since the installation itself, but that did not become a problem in the previous installation, and in both cases I wasn't messing with EBR. Of course, now (different from the first installation) there is no dev to try to reach or mount the partition somehow.
Any clue/suggestion so FreeBSD can recognize that partition? I am afraid I will need to format the NTFS partition. shiro, have you tried formatting? Did that work?
Probably shiro will never see this (last seen around 3 years ago), but good to mention it can still be an issue, and it could be that it started in the installation itself, in my case. Perhaps if the installation's partitioner didn't assume anything as "free space", it would be recognized?

Best regards,
Tojil
 
Well, I'm back here to add some info and closure (at least to my case).

First (and interestingly), I should mention that FreeBSD's loader prompt (aka "OK prompt") was recognizing my NTFS partition normally, at the same time that FreeBSD itself wasn't (no dev for the partition, and gpart was showing it as "free" space).

I have tried some approaches, such as small changes using GParted in Linux (for example, changing label, uuid), with no success. Luckly I had space in the Linux (ext4) partition to backup everything that was in the NTFS partition. I then proceeded by trying to resize the NTFS partition, but again I had no success - while GParted was letting me define how I would like to resize the partition, it couldn't complete the task at all. Although I was mounting the NTFS partition normally in Linux, the partition was clearly messed up somehow. I did NOT run further tests in terminal (I tried in GParted, but it only returned generic errors - same as I got when trying to resize).

What SirDice commented (about the NTFS partition being placed after the Linux partition) gave me an insight for a possible explanation of the problem: the NTFS partition was /dev/sda6 in Linux, but it became /dev/sda5 somehow. Any thoughts to explain why and/or how? I suspect that this could have originated a conflict that made FreeBSD recognize the NTFS partition as a free space, as it should be placed AFTER my linux-data partition, but was forced as it was before it.

Well, the happy ending (at least in my case and for anybody that can backup or format anyway): after my smooth approaches, I then decided to erase the partition and create a new one (with 1mb before the new partition, and a different size), using the same filesystem (NTFS), and now FreeBSD recognizes it very well, as it was before: the partition has its dev (numbered after the Linux partition, as it should be), and gpart is showing everything properly. I guess it would probably work the same way if I just formatted the partition.

Best regards,
Tojil
 
Back
Top