To have a chance of anyone (probably not me) helping you debug this, you need to tell us more than "was not able to mount the drive". What was the exact error message? What did dmesg on Linux say?
Thanks for the reply.
I'm basically trying to create an ext2/3/4 USB SSD external drive so that I can copy files from FreeBSD to Arch Linux and vice versa.
So I do not want to depend on using Linux OS to make ext4 file system since this requires me to have a linux box.
I rather create linux file systems on FreeBSD if possible.
I'm not able to find any info on how to create ext3/4 file systems to be used for as a flash drive/thumb drive properly on FreeBSD using "ext2fs" from:
pkg install e2fsprogs-core
So I was able to create an ext4 drive using the methods on my recent previous comment, however it is really weird.
I am now able to get it to read/write on Linux but when connecting it back to FreeBSD by using:
mount -t ext2fs /dev/da0 /mnt
I now get the error on FreeBSD:
Code:
mount: /dev/da0: Operation not permitted
(
Note: ran as root)
This is what I get when using:
gpart show
Code:
gpart: No such geom: da0.
When I use:
lsblk
I get the following:
Code:
DEVICE MAJ:MIN SIZE TYPE LABEL MOUNT
ada0 0:149 233G GPT - -
ada0p1 0:150 260M efi gpt/efiboot0 /boot/efi
ada0p2 0:151 512K freebsd-boot gpt/gptboot0 -
<FREE> -:- 492K - - -
ada0p3 0:152 2.0G freebsd-swap gpt/swap0 SWAP
ada0p4 0:153 231G freebsd-zfs gpt/zfs0 <ZFS>
<FREE> -:- 164K - - -
da0 1:166 233G ext2fs ext2fs/name_of_volume -
I am able to find "da0" but it is not able to mount on FreeBSD however it is able to mount on Linux and I created it on FreeBSD...
Thanks.
EDIT:
Alright I have followed a great guide on how create partitions for Linux file systems:
This guide will show you how to mount new volumes and create partitions on virtual servers with the FreeBSD operating system family.
serverspace.us
So now I did the following on FreeBSD:
pkg install e2fsprogs-core
gpart destroy -F da0
gpart create -s GPT da0
gpart add -t linux-data -s 232G /dev/da0
View the partitions:
gpart show da0
newfs -U /dev/da0p1
Next you need to create a mount point for each partition:
mkdir /mnt/volume1
Create the ext4 file system volume (Will complete in 1-2 mins):
mke2fs -L name_of_volume -F -E discard -t ext4 /dev/da0p1
To fix premissions:
chmod 777 /mnt/volume1
chmod operator /mnt/volume1
chmod g+w /mnt/volume1
Now mount the drive for FreeBSD:
mount -t ext2fs /dev/da0p1 /mnt/volume1
It mounts on FreeBSD perfectly.
However, once I plug it on Linux, I was able to plug and play the drive and mounts easily but get similar issue when trying to make it mount on FreeBSD again:
mount -t ext2fs /dev/da0p1 /mnt/volume1
Code:
mount: /dev/da0p1: Input/output error
This is what I get for:
file -s /dev/da0p1
Code:
/dev/da0p1: Linux rev 1.0 ext4 filesystem data, UUID=4bac9627-42dd-428f-b899-a202bc537fd9, volume name "name_of_volume" (extents) (64bit) (large files) (huge files)