Solved Ubuntu HDD access

Just switched from Ubuntu to FreeBSD 10.3 and was wondering if I could access Ubuntu's HDD from FreeBSD.

The drive is seen by the OS, but partition is inaccessible.

ub.jpg

Thanks
 
Quoting from the Handbook:
20.2.1. ext2
Kernel support for ext2 file systems has been available since FreeBSD 2.2. In FreeBSD 8.x and earlier, the code is licensed under the GPL. Since FreeBSD 9.0, the code has been rewritten and is now BSD licensed.

The ext2fs(5) driver allows the FreeBSD kernel to both read and write to ext2 file systems.

Note:
This driver can also be used to access ext3 and ext4 file systems. However, ext3 journaling, extended attributes, and inodes greater than 128-bytes are not supported. Support for ext4 is read-only.

Or you can opt for sysutils/fusefs-ext4
 
I've never done this myself but, have a look at the FreeBSD Handbook's section on GNU/Linux filesystems (EDIT: As quoted by Maxnix, who pipped me to the post with a response). I expect your Ubuntu installation uses ext3 and that page has a caveat:
This driver [ext2fs(5)] can also be used to access ext3 and ext4 file systems. However, ext3 journaling, extended attributes, and inodes greater than 128-bytes are not supported. Support for ext4 is read-only.
I also see there is the sysutils/e2fs port that is GPL licensed but may offer greater support. No doubt somebody who does this regularly will comment.
 
Got fuse installed.

An attempt to mount any of the partitions failed. Apparently they are not EXT4.

Code:
pkg install fusefs-ext4fuse
kldload fuse
ext4fuse /dev/da1s1 /mnt
Partition doesn't contain EXT4 filesystem.

ext4fuse /dev/da1s2 /mnt
Partition doesn't contain EXT4 filesystem.

ext4fuse /dev/da1s4 /mnt
Partition doesn't contain EXT4 filesystem.
 
Just checked here: https://www.win.tue.nl/~aeb/partitions/partition_types-1.html
83 Linux native partition
Linux is a Unix-like operating system written by Linus Torvalds and many others on the internet since Fall 1991. It runs on PCs (386 and up) and a variety of other hardware. It is distributed under GPL. Software can be found numerous places, like ftp.funet.fi, metalab.unc.edu and tsx-11.mit.edu. See also comp.os.linux.* and http://www.linux.org/. Various filesystem types like xiafs, ext2, ext3, reiserfs, etc. all use ID 83. Some systems mistakenly assume that 83 must mean ext2.​
So, your partition could not be an ext* one. In case it is reiserfs (always from the page of the Handbook):
20.2.2. ReiserFS
FreeBSD provides read-only support for The Reiser file system, ReiserFS.​

To load the reiserfs(5) driver:​

# kldload reiserfs
Then, to mount a ReiserFS volume located on /dev/ad1s1:​

# mount -t reiserfs /dev/ad1s1 /mnt
 
Code:
mount -t reiserfs /dev/da1s1 /mnt
comes back with: mount: /dev/da1s1: Read-only file system
which would be OK as I just need to grab a few files from it, but when iI navigate to /mnt it does not show any files.
 
Try file -s /dev/da1s1 to determine the filesystem type.

Assuming it comes back as ext2, ext3 or ext4 (appreciating you already tried to mount it as ext4)... If you just need to read files then the suggestion in the handbook is probably good enough:
Code:
kldload ext2fs
mount -o ro -t ext2fs /dev/da1s1 /mnt
Edit: Changed to include read-only mount
 
Aha... you mentioned LVM. Have a look at the man page for geom_linux_lvm(4). Try kldload geom_linux_lvm followed by geom linux_lvm_list geom linux_lvm list.

You should then be able to mount the partition with something like mount -o ro -t ext2fs /dev/linux_lvm/yourvolumegroup /mnt.

Reference: Thread 42925
Edit: Removed errant underscore in geom(4) command.
 
da1s1 is ext2 partition with a bootloader i was able to mount it and see the files, but it's not the partition i am interested in.

da1s2 shows u[ as DOS/MBR boot sector partition 1
da1s3 is an LVM2 PV

what would be my volume group?
 
got access to file system using this
geom showed Name: linus_lvm/ubuntu-vg-root
after i issued mount -o ro -t ext2fs /dev/linux_lvm/ubuntu-vg-root /mnt , i was able to acces the mount.

Thank you!
 
Back
Top