# Problems using mount - Invalid argument



## balanga (Oct 1, 2014)

I thought I had figured out how to use mount, but after pouring over countless posts and hints/tips, I'm none the wiser...

I have created a bootable USB pendrive and am trying access a hard disk which has FreeBSD installed on it.

```
root@X61:~ # gpart show /dev/ada0
=>       63  195371505  ada0  MBR  (93G)
         63         63        - free -  (32K)
        126  195371379     1  freebsd  [active]  (93G)
  195371505         63        - free -  (32K)
```

What is the recommended way of listing the partitions/slices/filesystem on the disk?

I have tried mounting each of ada0[s1[a]] on /mnt  but all return Invalid argument.

What am I doing wrong?

Please don't suggest I check the docs, as I've spent hours trying to sort it out...


----------



## kpa (Oct 1, 2014)

You're already using the best tool for the job, gpart(8). Command `gpart show` shows all the available information. The listing however suggests that there is only the slice (primary partition in Linux/Windows speak) ada0s1 on the disk with no BSD partitions inside it.  What is the history of this FreeBSD installation, which version of FreeBSD? Also, which version of FreeBSD on the USB pendrive?


----------



## wblock@ (Oct 1, 2014)

Use `gpart show` with no additional arguments to show all GEOMs, or `gpart list`.


----------



## kpa (Oct 1, 2014)

wblock@ said:
			
		

> Use `gpart show` with no additional arguments to show all GEOMsm, or `gpart list`.



You're correct, using a specific GEOM on the command line shows only that GEOM and not recursively down to all its children.  :r


----------



## balanga (Oct 1, 2014)

kpa said:
			
		

> You're already using the best tool for the job, gpart(8). Command `gpart show` shows all the available information. The listing however suggests that there is only the slice (primary partition in Linux/Windows speak) ada0s1 on the disk with no BSD partitions inside it.  What is the history of this FreeBSD installation, which version of FreeBSD? Also, which version of FreeBSD on the USB pendrive?



The pendrive has FreeBSD 10.0-RELEASE i386

The harddisk has the latest PC-BSD (10.0.3 I think)


----------



## usdmatt (Oct 1, 2014)

What devices do you have if you do `ls /dev/ada0*`


----------



## balanga (Oct 1, 2014)

```
ada0
ada0s1
ada0s1a 
adas1b
```


----------



## usdmatt (Oct 1, 2014)

Well by the look of that I would expect /dev/ada0s1a to be the correct device. Not sure why there's a 'b' device though. B is usually reserved for swap partitions.

Does is mount successfully if you boot with it?


----------



## balanga (Oct 2, 2014)

usdmatt said:
			
		

> Well by the look of that I would expect /dev/ada0s1a to be the correct device. Not sure why there's a 'b' device though. B is usually reserved for swap partitions.
> 
> Does is mount successfully if you boot with it?



ada0 is my hard disk which has PC-BSD installed. da0 is my USB pendrive which has a minimal installation of FreeBSD installed on it. For some reason when booting from USB I am unable to mount anything. I tried inserting another USB pendrive in the system as da1 and that could not be mounted either...

As a newbie I'm reluctant to suggest this might be a bug and would like to know if anyone can replicate this problem...


----------



## kpa (Oct 2, 2014)

What does `file -s /dev/ada0s1a` produce?


----------



## balanga (Oct 2, 2014)

kpa said:
			
		

> What does `file -s /dev/ada0s1a` produce?




```
/dev/ada0s1a: x86 boot sector: partition 4: ID=0xa5, active, starthead 0, startsector 0, 50000 sectors, code offset 0x3c, BSD disklabel
```


----------

