# Mount NetBSD filesystem

## orviwan

Could someone please tell me what I need to do to mount a NetBSD 1.5 filesystem on my gentoo box.

I guess I need to modify the kernel, but not sure what I'm looking for.

Thanks.

Linux gentorv 2.4.20-gentoo-r8 #12 Sun Dec 7 20:20:55 GMT 2003 i686 Pentium III (Coppermine) GenuineIntel GNU/Linux

----------

## Kitohe

hmm...I've never considered this question before.  I'm curious to know the answer.  BTW what file systems are available to NetBSD?  Do all *BSDs use the same file system.

----------

## orviwan

I asked this question to a friend and he said "ffs", so I'm not sure of that is the name of the filesystem or he was just appauled by the stupidity of my question   :Embarassed: 

----------

## nephros

You have to enable UFS filesystem support (File systems-> Miscellaneous Filesystems->UFS filesystem support).

[EDIT:]I took this from the kernel help which mentions NetBSD with this fs, but posts below indicate otherwise...[/EDIT]

In case NetBSD uses BSD disklabels as a partitioning scheme (the other two BSDs do), you might want to check File Systems->Partition types->PC BIOS support-> BSD disklabel support also.

HTH  :Smile: 

Kitohe: I know Free- and OpenBSD have support for ext2 (3?) at least, my guess is NetBSD with its "we support everything under the sun" attitude does too.

----------

## cram

 *Quote:*   

> I asked this question to a friend and he said "ffs", so I'm not sure of that is the name of the filesystem or he was just appauled by the stupidity of my question 

 

FFS is indeed the name of the filesystem, it's the Fast File System

----------

## whoami

 *nephros wrote:*   

> Kitohe: I know Free- and OpenBSD have support for ext2 (3?) at least, my guess is NetBSD with its "we support everything under the sun" attitude does too.

 

free, net, open and dragonfly support mounting ext2 filesystems (which also works for ext3 filesystems, but without the journal). they can't be installed on ext2 though. they all must be installed on ffs. freebsd 5.x and iirc netbsd -current have support for ufs2.

----------

## orviwan

Thanks for the tips.

I added UFS and BSD Disklabel support, I can only mount the disk readonly as I didnt add write support in the kernel, but nothing is shown using "ls".

```
root@gentorv / # mount -r -t ufs /dev/hdc7 /mnt

root@gentorv / # ls /mnt  

root@gentorv / # df -l

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/hda3             14239124   2757036  10758764  21% /

none                    127512         0    127512   0% /dev/shm

/dev/hdc7              9110605   5819228   2835847  68% /mnt
```

Any ideas?

----------

## Kitohe

Type mount (without any options) and it will show you everything that has been mounted on your system.

----------

## orviwan

```
root@gentorv# mount -r -t ufs /dev/hdc7 /mnt/bsd/

root@gentorv# mount

/dev/hda3 on / type ext3 (rw,noatime)

none on /dev type devfs (rw)

none on /proc type proc (rw)

none on /dev/shm type tmpfs (rw)

none on /proc/bus/usb type usbfs (rw)

none on /proc/bus/usb type usbdevfs (rw)

/dev/hdc7 on /mnt/bsd type ufs (ro)

root@gentorv# ls /mnt/bsd

root@gentorv# df -k

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/hda3             14239124   2759044  10756756  21% /

none                    127512         0    127512   0% /dev/shm

/dev/hdc7              9110605   5819228   2835847  68% /mnt/bsd
```

----------

## orviwan

Nevermind, I found something whilst googling which mentioned specifying the ufstype in the mount command.

To cut a short story even shorter, it works.

```
root@gentorv # mount -t ufs -o ro,ufstype=44bsd /dev/hdc7 /mnt/bsd

root@gentorv # ls /mnt/bsd

X11R6  games  include  libdata  lkm    mdec      pkg   share

bin    home   lib      libexec  local  packages  sbin
```

----------

