Mount exFat filesystem on Debian

ExFat file systems are not supported out of the box on Debian, but support is provided by installing the exfat-utils package:

# apt-get install exfat-utils

Reading package lists... Done

Building dependency tree       

Reading state information... Done

The following additional packages will be installed:

  exfat-fuse

The following NEW packages will be installed:

  exfat-fuse exfat-utils

0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.

Need to get 73.0 kB of archives.

After this operation, 295 kB of additional disk space will be used.

Do you want to continue? [Y/n] y

fdisk -l shows my usb disk as:

Disk /dev/sdc: 186.3 GiB, 200049647616 bytes, 390721968 sectors

Units: sectors of 1 * 512 = 512 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disklabel type: gpt

Disk identifier: ...

Device      Start       End   Sectors   Size Type

/dev/sdc1      40    409639    409600   200M EFI System

/dev/sdc2  411648 390721535 390309888 186.1G Microsoft basic data

So to mount sdc2:

mkdir /media/usbdisk (or whatever mountpoint you prefer)

mount -t exfat /dev/sdc2 /media/usbdisk

Done!

Checklist for accessing an AWS EC2 instance with ssh

Quick checklist of items to check for enabling ssh instance into a running EC2 instance:

  • EC2 instance is started (check from AWS console)
  • From AWS console, check Security Group for the instance has an inbound rule for SSH – if only accessing remotely from your current IP, you can press ‘My IP’ to set your current public IP
  • From Network & Security, create a keypair and download the .pem file
  • Check the public DNS name for your EC2 instance from the console
  • chmod 400 your .pem file, otherwise you’ll get an error that it’s publicly readable

Connect with:

ssh -i path-to-.pem-file ec2-user@ec2-your-instance-name.compute-xyz.amazonaws.com

Docker usage notes – continued (2)

A few rough usage notes, continuing from my first post a while back.

Delete all containers:

Run a container from an image and delete it when it exits: use –rm:

docker run -it --rm containerid

 

Pass an argument into a build:

  • use ‘ARG argname’ to declare the argument in your Dockerfile
  • pass value for argname with –build-arg argname=value

Test during build if an arg was passed:

RUN test -n "$argname"