Show Disks

fdisk -l 

How to Format and Mount a Disk

fdisk /dev/sdb 
# Example output of the above command

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-3907029167, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-3907029167, default 3907029167): 
Using default value 3907029167
Partition 1 of type Linux and of size 1.8 TiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
mkfs.ext4 /dev/sdc
mount /dev/sdb /disks/nas
vim /etc/fstab
/dev/sdb                /disks/nas       ext4    defaults        0 0 
sdb               8:32   0 1.8T  0 disk /disks/nas

Create Bootable Flash

dd bs=4M if=/home/user/Documents/vyos-1.1.6-amd64.iso of=/dev/sde && sync

Mount and Unmount Drives (fstab)

mount -a
umount -a

File Recovery

grep -a -b "syscontact Robsan" /dev/sdd3

# Example output of the above command '22733033610' is the block number

22733033610:syscontact Robsan
dd if=/dev/sdd3 count=10 skip=$(expr 22733033610 / 512)    
dd if=/dev/sdd3 count=10 skip=$(expr 22733033610 / 512) > output.txt

Use Scalpel to find files or text

NONE    y  35000:50000  /# Config/  /# End of config/ 
scalpel -c /etc/scalpel.conf "/dev/sdd3" -o "/home/robsan/recovery/"
xxd -l 0x04 commands.bak; xxd -s -0x04 commands.bak

strings < ramdump | grep "503"