HOWTO_Mount_UFS_partitions
| Installation • Kernel & Hardware • Networks • Portage • Software • System • X Server • Gaming • Non-x86 • Emulators • Misc |
Contents |
Introduction
The UFS file system is used in the BSD operating systems (among others). The filesystem has slices and partitions which makes it a bit strange to mount. This how to is based heavily on a how to found in the gentoo forums.
Kernel Configuration
This is applicable to the 2.6 kernel. UFS file system support is not enabled by default. First, the kernel should be compiled with support for the UFS file system.
| Linux Kernel Configuration: file systems |
File Systems --->
Miscellaneous Filesystems --->
<*> UFS file system support
|
If this is a FreeBSD partition, you'll also want support for the partition type
| Linux Kernel Configuration: file systems |
File Systems --->
Partition Types --->
[*] Advanced partition selection
[*] PC BIOS (MSDOS partition tables) support
[*] BSD disklabel (FreeBSD partition tables) support
|
Save your settings, recompile your kernel (and reboot), or load the modules when finished.
Mounting Partitions
UFS has some special mount options. (See MAN Mount 8 for more information) If the partition is UFS1 (FreeBSD < 5) then the option ufstype=44bsd should be included. If the partition is UFS2 then the option ufstype=ufs2 should be used.
mount -r -t ufs -o ufstype=44bsd /dev/hda1 /mnt/point
This will mount the first partition on the slice that gentoo believes to be the partition hda1. If you want to mount other partitions that are on your (freebsd) ufs drive you should do something like:
dmesg | grep bsd
This should show you which harddrive has which (freebsd) partitions on it, the line you really need looks like:
p1: <bsd: p5 p6 >
In this case there are 2 partitions on the drive. But keep in mind that you may also see thing in this list like your /tmp and /swap partitions from your freebsd drive, as well as your /home link which you won't be able to mount (since it's a softlink to /usr/home under freebsd, unless you made it a real partition during your install).
In the example above p5 means that you are able to mount /dev/hdX5 (replace X with your drive letter) to your mount destination. Which would look something like:
mount -r -t ufs -o ufstype=44bsd /dev/hdX5 /mnt/fbsd_partion5
Desired Additions
- fstab entry
- how to detect the relationships between /dev/hda# and /dev/ad0s#x
- More thorough treatment of topic
- Better explanation of how to choose between ufstypes 44bsd, ufs2, and 5xbsd
Browse categories > Filesystems
Browse categories > Gentoo Linux Wiki > Wiki maintenance > Cleanup
Browse categories > Operating systems > FreeBSD
Created by NickStallman.net, Luxury Homes Australia
Real estate agents should be using interactive floor plans and list their apartments, townhouses and units.
