Ext4 partition not mountable

Good day,

I just got a pendrive on which I made 3 partitions:

  • BFS
  • Exfat
  • Ext4

On Linux I can see and mount all three. On Haiku can only mount the BFS and Exfat. The Ext4 partition is there shown by Drive Setup, but can’t do anything with it, not even mount it.

I have installed the e2fsprogs but no difference.

Before I was able to transfer files from/to ext4 (File Systems Status and Compatibility - #17 by roiredxsoto). But lately I’m starting to have issues.

Any hint on this one?

Thanks in advance.
Regards,
RR

1 Like

Anything on the system log when you try to mount it ?

Haiku doesnt support all ext* feature flags.

These one line replies deserve a bit more detail :slight_smile:

So, the “ext4” filesystem in Linux is in somewhat continuous development and receives new features from time to time. These may change the disk format. To avoid problems with that, the filesystem has “feature flags” in the superblock to indicate which features are used on a specific volume.

If our driver sees a feature flag it doesn’t know how to handle, to avoid any risk of system crashes, it will ignore that volume. Currently, the only way to check for this is to have a look in the syslog (/var/log/syslog) for messages from the ext4 driver, it will complain there about the unknown flag and give its numeric value.

If you share that info with us, we can look at what that new flag is, and see if we can safely add support for it in our driver.

4 Likes

Good day,

Thanks @PulkoMandy. I’ll try to use the pendrive again and check the syslog. That might also be the reason, or at least related?, of that KDL I got when trying to copy files from an Ext4 pendrive to Haiku (already reported).

Thanks again. I’ll report what the syslog spits out.

Regards,
RR

Good day,

So today I’m testing things again. When I plug in a Full EXT4 pendrive (single partition and try to mount it through Drive Setup, it reports this when trying to mount the partition:
error

But the disk is not available in the Mount menu (Right click).

When I plug it in, Syslog records this:

Blockquote
KERN: usb hub 2: port 2: new device connected
KERN: usb_disk: device reports a lun count of 1
KERN: usb_disk: vendor_identification “SanDisk”
KERN: usb_disk: product_identification “Ultra”
KERN: usb_disk: product_revision_level “1.00”
KERN: publish device: node 0xffffffffe2732148, path disk/usb/0/0/raw, module drivers/disk/usb_disk/device_v1
KERN: DMAResource@0xffffffffe1d69960: low/high 0/ffffffffffffffff, max segment count 16, align 1, boundary 0, max transfer 65536, max segment size 18446744073709551615
KERN: usb_disk: got device name “SanDisk Ultra 1.00”: No error
KERN: intel: Found GPT signature, ignoring.
KERN: EFI header: EFI PART
KERN: EFI revision: 10000
KERN: header size: 92
KERN: header CRC: 961cc0f6
KERN: absolute block: 1
KERN: alternate block: 120176639
KERN: first usable block: 34
KERN: last usable block: 120176606
KERN: disk GUID: c9c148b2-72ab-4109-8aca-ca31170ee909
KERN: entries block: 2
KERN: entry size: 128
KERN: entry count: 128
KERN: entries CRC: d7c489e4
KERN: EFI header: EFI PART
KERN: EFI revision: 10000
KERN: header size: 92
KERN: header CRC: 3cd6e823
KERN: absolute block: 120176639
KERN: alternate block: 1
KERN: first usable block: 34
KERN: last usable block: 120176606
KERN: disk GUID: c9c148b2-72ab-4109-8aca-ca31170ee909
KERN: entries block: 120176607
KERN: entry size: 128
KERN: entry count: 128
KERN: entries CRC: d7c489e4
KERN: [ 0] partition type: 0fc63daf-8483-4772-8e79-3d69d8477de4
KERN: unique id: 0ef58457-41f8-4637-88ab-a49b25c3ef8c
KERN: start block: 2048
KERN: end block: 120174591
KERN: size: 58677.999 MB
KERN: attributes: 0
KERN: name: Vesta64Ext4
KERN: identify(66, 0xffffffffe276e210)
KERN: usb_disk: unhandled ioctl 10102
KERN: efi_gpt_scan_partition(cookie = 0xfffffffff282b8c8)
KERN: identify(66, 0xffffffffe276e2d0)
KERN: e[34mext2:e[0m ext2: incompatible features not supported: 2000 (extents 40)
KERN: usb_disk: unhandled ioctl 10102

Now, If I try with the drive with the 3 partitions: Ext4, BFS y Exfat, the EXT4 partition behaves like the single pendrive. It’s not there in the menu, it shows in Drive Setup as Unknown (Linux data).
In this case, it’s also not mountable spitting the same error as shown above (the picture)

Syslog now adds the following:

Blockquote
KERN: usb_disk: got device name “Sandisk Ultra 1.00”: No error
KERN: intel: Found GPT signature, ignoring.
KERN: EFI header: EFI PART
KERN: EFI revision: 10000
KERN: header size: 92
KERN: header CRC: c95b58d4
KERN: absolute block: 1
KERN: alternate block: 3907029167
KERN: first usable block: 2048
KERN: last usable block: 3907029134
KERN: disk GUID: 4623c61d-4506-4880-9952-729611c7bcfb
KERN: entries block: 2
KERN: entry size: 128
KERN: entry count: 128
KERN: entries CRC: 7e907e8e
KERN: EFI header: EFI PART
KERN: EFI revision: 10000
KERN: header size: 92
KERN: header CRC: 23e82777
KERN: absolute block: 3907029167
KERN: alternate block: 1
KERN: first usable block: 2048
KERN: last usable block: 3907029134
KERN: disk GUID: 4623c61d-4506-4880-9952-729611c7bcfb
KERN: entries block: 3907029135
KERN: entry size: 128
KERN: entry count: 128
KERN: entries CRC: 7e907e8e
KERN: [ 0] partition type: 0fc63daf-8483-4772-8e79-3d69d8477de4
KERN: unique id: a3d63bde-7b4f-4760-a742-de09cb74dea3
KERN: start block: 2048
KERN: end block: 1579157503
KERN: size: 771071.999 MB
KERN: attributes: 0
KERN: name:
KERN: [ 1] partition type: 0fc63daf-8483-4772-8e79-3d69d8477de4
KERN: unique id: 7e286ebc-59c6-4436-bf95-29b1031f9215
KERN: start block: 1579157504
KERN: end block: 3158312959
KERN: size: 771071.999 MB
KERN: attributes: 0
KERN: name: HyakutakeBfs
KERN: [ 2] partition type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
KERN: unique id: 1c7c9c91-b542-4e8f-9d80-34e925fb9169
KERN: start block: 3158312960
KERN: end block: 3907028991
KERN: size: 365583.999 MB
KERN: attributes: 0
KERN: name:
KERN: identify(67, 0xfffffffff303dc50)
KERN: usb_disk: unhandled ioctl 10102
KERN: efi_gpt_scan_partition(cookie = 0xfffffffff282fe00)
KERN: identify(67, 0xfffffffff3040bc0)
KERN: e[34mext2:e[0m ext2: incompatible features not supported: 2000 (extents 40)
KERN: usb_disk: unhandled ioctl 10102
KERN: identify(67, 0xfffffffff3040bc0)
KERN: usb_disk: unhandled ioctl 10102
KERN: identify(67, 0xfffffffff3040bc0)
KERN: usb_disk: unhandled ioctl 10102

So yep, looks like in both situations I have “incompatible features not supported”.

Strange thing (from my POV) is that if the pendrive only holds the EXT4 partition, Syslog catches the partition Name. In the case of the multipartition, Syslog does not catch the names but the BFS partition one. This is odd.

Guess that I have to wait to have a filesystem format that can be used across systems…

Thanks again for your help.
Regards,
RR

ext3 should be fine, or ext4 if you format the partition with the right flags to disable the unsupported features. This will require a bit of detective work to find which feature has the identifier 2000.

According to linux/Documentation/filesystems/ext4/super.rst at master · torvalds/linux · GitHub it is:

“Metadata checksum seed is stored in the superblock. This feature enables the administrator to change the UUID of a metadata_csum filesystem while the filesystem is mounted; without it, the checksum definition requires all metadata blocks to be rewritten (INCOMPAT_CSUM_SEED).”

So if you use mkfs (on Linux) with the option -O ^metadata_csum_seed, when creating your partition, this will be disabled.

And you can make a ticket asking for one of Haiku developers to implement support for that feature in our ext4 driver as well.

Would it be feasible to add a mount option to force mounting such volume in read-only mode?

Nice Idea, read only would be more than enough!?

No. The ext4 filesystem has specific feature sets for each case: compatible (safe to mount even if the feature is not supported), read-only compatible (you can read the filesystem even if you don’t support the feature, but writing would corrupt it), not compatible (the feature changes the filesystem storage format so much that it’s not possible to read it).

We can implement only read-only support for that feature, but we still need to make some changes to the code for that. Otherwise it will just fail further down, not being able to make sense of what’s stored on the disk.

1 Like

Aha, nice but what kind of files-ystem do you recommend for HAIKU and Windows and exchange use, I do not use LINUX

Windows only does FAT and NTFS. Haiku can read and write both of these.

3 Likes

Good day @PulkoMandy ,

Thanks for the explanation. If Haiku has no need to gain access to an EXT4 filesystem, I don’t see the need to make a ticket. Actually I just need a filesystem that can be used on Linux and Haiku without any issues, and that has support for long filenames.

I used to use ext4 before and it did work nicely. Just recently I started to have issues with it. I would do fine with exfat if is stable on Haiku (read-write), also the filesystem used on SD cards for cameras.

If XFS is a more appealing filesystem than Ext4 for Haiku, I would be fine with it too (exfat & XFS would certainly be more than enough).

Thanks again,
Regards
RR

Yes FAT and NTFS are supported but the attributes will get lost if copy and pasted a BeFs File there!
What is the way to keep the attributes in Windows? Only keep them as .zip file?
Or use the BeFs File reader only?

Xfs and exfat are currently read-only in Haiku. Improving the ext4 driver to fix this problem is the easiest solution to sharing files with Linux.

FWIW, last august 2024, I’ve noticed that I was unable to mount ext4 partitions created by newer Linux distros (older partitions mounted just fine).

In my case at least, managed to narrow it to lack of “journal recovery” support on the Haiku ext4 driver (with Haiku showing on the syslog: "ext2: incompatible features not supported: 2000 (extents 40)"..

Sadly my skills are not good enough to help with improving the ext2/3/4 driver, but maybe a better developer might find it a good fit for their contribution to Haiku.

Roger that @PulkoMandy.

Regarding XFS, XFS partitions don’t show up thus they are not able to be mounted neither, even read-only, at least on my device. I’ll have to check with a full XFS device.

Looks like the ticket is the way to go for the time being.

I got an Ext4 pendrive completely ruined thanks to force mounting read-write. Caused lots of issues, even KDLs trying to copy pdfs from the Ext4 drive to Haiku. Had to reformat it completely. Maybe because I use Arch, the filesystem drivers are “too much up to date?”. :thinking:

Too much to learn, too little time. :older_man:

Regards,
RR

Yes, it looks like linux added new features to ext4 and now enabled it by default for new filesystems