Page 1 of 2

Mount Ext4 internal SSD [SOLVED]

Posted: Mon Aug 28, 2017 12:20 am
by chris35
Hi !
First many thanks for this great OS, very happy to work under BSD so easly...
Just before installing GhostBSD i was under linux. And i dont forgot to backup my ext4 disk to another disk or usb key...
My question is simple, how can i mount this internal SSD ext4 disk to acess contents ?

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 12:44 am
by chris35
i tried that
sudo mount -t ext2fs /dev/ada0s1 /mnt
but :
mount: /dev/ada0s1: Invalid argument

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 9:23 am
by NevilleGoddard
It's no wonder you have the message "invalid argument" because /dev/ada0 is the disk you have installed GhostBSD on and it should already be mounted

Do you have 2 internal SSDs?

I have actually done this. When I went from Xubuntu to BSD I had a ton of ext4 data which I copied to UFS. :D Then I copied it all to ZFS :lol: a couple of weeks ago.

you need to install ext4fuse. It's a little slow but it does the job well.

The ext4 disk should be /dev/ada1 depending on how many disks you have

Can you give the output of :

geom disk list

and

gpart show ada0

gpart show ada1

?

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 10:57 am
by chris35
hi ty !
i have the boot and GhostBSD disk on SSD Nvme, and other "classical" SSD, both are internal drives.
i already have ext4fuse installed and loaded.
Geom name: nvd0
Providers:
1. Name: nvd0
Mediasize: 250059350016 (233G)
Sectorsize: 512
Mode: r2w2e5
descr: Samsung SSD 960 EVO 250GB
ident: S3ESNX0J116079P
rotationrate: 0
fwsectors: 0
fwheads: 0

Geom name: ada0
Providers:
1. Name: ada0
Mediasize: 64023257088 (60G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
descr: SAMSUNG SSD 830 Series
lunid: 5002538043584d30
ident: S0VXNYABB00628
rotationrate: 0
fwsectors: 63
fwheads: 16


gpart show ada0
=> 63 125045361 ada0 MBR (60G)
63 125045361 1 linux-data (60G

gpart show ada1
gpart: No such geom: ada1.

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 10:58 am
by chris35
sudo mount -t ext4 /dev/ada0 /mnt
mount: /dev/ada0: Operation not supported by device
chris@chris ~> sudo mount -t ext2fs /dev/ada0 /mnt
mount: /dev/ada0: Invalid argument

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 11:12 am
by NevilleGoddard
My apologies.
You have your ext4 data on the ada0 drive. ;) Forgot about NVMe drives.

To mount the drive try:

ext4fuse ada0 /mnt

or

ext4fuse /dev/ada0 /mnt

If that doesn't work try:

ext4fuse /dev/ada0s1 /mnt

if you want to mount the device into your home folder, create a folder with a name you like for example ext4data

then mount the disk with:

ext4fuse /dev/ada0s1 /home/yourusername/ext4data

if you get an error it may be the /dev/ada0s1 is incorrect somewhere. Like I said I did this a couple of years ago and it works great!

How's the NVMe disk running. Lucky you! ;)

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 11:20 am
by chris35
ext4fuse /dev/ada0s1 /home/yourusername/ext4data
works !
many thanks !!! I can copy whole disk on my NVMe now

i'd like to format it now, is there a gparted or other GUI solution for it ?

NMMe works very fine, quick to boot, then i dont have any loud program to run so except on booting system i dont notice huge difference with a classical SSD ;)
But on copy disk, its really quick, yes ;)

Re: Mount Ext4 internal SSD

Posted: Mon Aug 28, 2017 11:46 am
by NevilleGoddard
Great news! :)

To format the disk for UFS there is this guide:

https://www.freebsd.org/doc/handbook/disks-adding.html

The ssd is ada0

so to format it and automount it you have to do this:

remove old data:

gpart destroy -F ada0

Create new partitions:

gpart create -s GPT ada0

gpart add -t freebsd-ufs -a 1M ada0

Format or create new file system:

newfs -U /dev/ada0p1

To use the disk and automount it at each boot, create a mount point:

mkdir /ssd (or any name you want)

Then edit fstab to mount the disk at each boot so you can use it:

ee /etc/fstab

and in fstab put this at the bottom:

/dev/ada0p1 /newdisk ufs rw 2 2

then mount it and use it straight away without reboot:

mount /ssd

If there is an error message after the mount /ssd command, don't reboot ! check your /etc/fstab entry and make sure you wrote everything correctly, because if there is an error, you won't be able to boot to the desktop without editing fstab and fixing any errors.

I think I'll get an NVMe SSD very soon. My motherboard is an ASUS prime x370-A with an nvme slot built in. I think I'll get the same disk as yours or a Patriot NVMe. I can't decide. :D

Re: Mount Ext4 internal SSD [SOLVED]

Posted: Mon Aug 28, 2017 12:05 pm
by chris35
Many thanks for you great help Neville !
I dont know the patriot NVMe, i hope you will have one too soon ;)

Re: Mount Ext4 internal SSD [SOLVED]

Posted: Mon Aug 28, 2017 12:30 pm
by NevilleGoddard
No worries.

Glad to help. Hope you enjoy GhostBSD.