Mounting a Filesystem : on BSD flavour of Juniper box

By | July 14, 2020

What is mounting : ?

Mounting is the process of attaching the file system [ location to store the files ] to plugging device [ e.g USB ] that attached to our system. We might not need to do this all time as some flavour of linux system do this for us but that function varies depending upon the system configuration and also a format type of plugging device.

why we mount the device in file system ?

Once we mount the device to a particular storage point [ mount point] , we can then able to access the files stored in that plugging device and copy it in our local device drive.

Let’s see how this process work on free-BSD [ one of linux flavour ] running on juniper box.

Please Note : I am using here juniper virtual box [ vlab ] to show this without connecting any real USB to it.

To view the current existing mounted files system on our Juniper box use mount command as shown below.

mount

Alternate way to check this is using df command. This command also show the size and utilisation of currently mounted file system.

1. let’s create one such file system [ also known as mounting point ] for USB that will be connected to our Juniper box using mkdir command.

2. Once we created mounting point, we can now connect usb to the juniper box . we can use dmesg to see the events.

please look for key words ‘scsi‘,’da‘ in the output

3. Once we know the device is connected , we can just use mount command and specify file system type [ optional because mount command can find that for you ] , device name or UUID [ Universally Unique Identifier – associated with the device] / mounting point to mount it.

mount -t < type > < device > < mountpoint >

-t stand for type. Used to indicate the files system type. E.G ext2,ext3,ext4,proc,vfat,nfs.
device – The actual connected device. in case of USB
mount point – the place in the current system directory [ /tmp/usb ] where the filesystem will be attached.

To find device name or uuid, you can use commands like gpart list , camcontrol devlist or usbconfig .

On juniper box running freeBSD the mount [ ref ] command would be slightly different as shown below.

Once we execute above command, we should be able to access the files and copy them to existing directory on the Juniper box.

1.Copy the file from mounted point to existing directory.

2. Now can request upgrade from new stored location or also directly from mounting point.

Once the image been copied , we need to unmount it first in order to safely remove from the box.

Resources:

how linux works

freebsd.org

Leave a Reply

Your email address will not be published. Required fields are marked *