# How to mount ext2fs correctly



## FreeDomBSD (Oct 6, 2013)

I am trying to mount an ext2fs hard drive (da1) that I formated with gparted in Ubuntu.

`# kldload ext2fs`

man ext2fs(5)

The `# mount -t ext2fs /dev/da1s1 /mnt` command returns 
	
	



```
mount: /dev/da1s1: No such file or directory
```


And the `# mount -t ext2fs /dev/da1 /mnt` command returns 
	
	



```
mount: /dev/da1: Invalid argument
```


What am I doing wrong?


----------



## wblock@ (Oct 6, 2013)

Making assumptions, probably.  Is da1 the correct drive?  Did you partition it?  What does `gpart show da1` say is on it?


----------



## FreeDomBSD (Oct 6, 2013)

```
[CMD]root@builder:/root # gpart show da1[/CMD]
=>        34  3907029101  da1  GPT  (1.8T)
          34        2014       - free -  (1M)
        2048  3907026944    1  linux-data  (1.8T)
  3907028992         143       - free -  (71k)
```


----------



## wblock@ (Oct 6, 2013)

There it is.  GPT partitions are used with a p notation, like /dev/da1p1.  The easy way to see what is on a drive is to look in /dev/:

`ls /dev/da1*`


----------



## FreeDomBSD (Oct 7, 2013)

Bingo! Maybe the example needs to be updated. I find it a bit misleading. :-\

Thanks!


----------



## wblock@ (Oct 7, 2013)

The example can't anticipate where a filesystem is located, which could be any type of device path.


----------



## FreeDomBSD (Oct 7, 2013)

Ahhh, I thought that p1 designation was standard for ext2fs, but it is GPT.

Thanks for the clarification.


----------



## HD Scania (Jan 24, 2018)

```
[hd_scania@trueos] ~% sudo mount -t ext2fs /dev/ada0p23 /data
mount: /dev/ada0p23: Operation not permitted
[hd_scania@trueos] ~% sudo gpart show
=>       34  976773101  ada0  GPT  (466G)
         34       2014        - free -  (1.0M)
       2048   58484736     1  freebsd-zfs  (28G)
   58486784     235520        - free -  (115M)
   58722304   16777216     2  freebsd-swap  (8.0G)
   75499520   58720256     3  freebsd-zfs  (28G)
  134219776    2097152     4  efi  (1.0G)
  136316928   33554432     5  linux-data  (16G)
  169871360   33554432     6  linux-data  (16G)
  203425792   33554432     7  linux-data  (16G)
  236980224   33554432     8  linux-data  (16G)
  270534656   16777216     9  linux-swap  (8.0G)
  287311872   33554432    10  linux-data  (16G)
  320866304   33554432    11  linux-data  (16G)
  354420736   33554432    12  linux-data  (16G)
  387975168   33554432    13  linux-data  (16G)
  421529600   16777216    14  linux-swap  (8.0G)
  438306816   33554432    15  linux-data  (16G)
  471861248   33554432    16  linux-data  (16G)
  505415680   33554432    17  linux-data  (16G)
  538970112   33554432    18  linux-data  (16G)
  572524544   57200640    19  freebsd-zfs  (27G)
  629725184     235520        - free -  (115M)
  629960704    1048576    24  freebsd-swap  (512M)
  631009280     235520        - free -  (115M)
  631244800    2097152    20  freebsd-boot  (1.0G)
  633341952   58720256    21  freebsd-zfs  (28G)
  692062208   16777216    22  freebsd-swap  (8.0G)
  708839424  267933696    23  linux-data  (128G)
  976773120         15        - free -  (7.5K)

=>      63  57200577  ada0p19  MBR  (27G)
        63  57200577           - free -  (27G)

=>      63  57200577  gpt/TrueOS.1  MBR  (27G)
        63  57200577                - free -  (27G)

[hd_scania@trueos] ~%
```
My path is correct (hims is wrong) but ‘‘operation not permitted’’, what’s wrong?


----------

