User Tools

Site Tools


Sidebar

Dan's Wiki

DokuWiki Instructions (local) DokuWiki Manual
Site Checker (Orphans Wanted)

Edit Sidebar

miscscripts

This is an old revision of the document!


Misc. Scripts

Find out name of USB stick

 # fdisk -l

List USB drives, mounted and unmounted

 lsblk
 

Create mount point

 # mkdir /mnt/usb-drive 
 

List connected USB devices

 $ lsusb
 $ lsusb -v
 

More detailed version:

 $ usb-devices
 

dmesg - print or control the kernel ring buffer

This shows possible error messages from the drive mounting

  $ dmesg.

Mount USB drive to system

  # mount /dev/sdc1 /mnt/usb-drive/
  

Partition and Format GPT

  $ sudo parted /dev/sdd
  mklabel gpt
  
  (parted) print
  Model: ASMT 2105 (scsi)
  Disk /dev/sdd: 1000GB
  Sector size (logical/physical): 512B/512B
  Partition Table: gpt
  Disk Flags:
  
  Number  Start  End  Size  File system  Name  Flags
  
  mkpart primary 0% 100%
  (parted) quit
  

Create a Filesystem on the New Partition

  # mkfs.ext4 -L offsitebackup /dev/sdd1

Copy ISO to USB stick

miscscripts.1604945482.txt.gz · Last modified: 2020/11/09 18:11 by dwheele