Last Updated on December 6, 2015 by Dave Farquhar
I like Turnkey Linux, which is a collection of pre-built server appliances based on Ubuntu. When you need a server fifteen minutes from now, it’s about the only way you can make it happen.
But as far as I can tell, it doesn’t mount USB drives automatically. That’s fine; these servers are designed to have the minimum necessary for their stated purpose in life and nothing more. Here’s how I mount a USB drive to use for making backups.
1. Plug in the USB drive
2. Log in as root or become root with su
3. Issue the following command:
mount -t vfat /dev/sdb1 /mnt
4. Verify it mounted with the following comand:
mount
You should see output that looks like this:
/dev/sdb1 on /mnt type vfat (rw)
5. Issue your backup command. I typically do something like this:
tar cvzf /mnt/backup/13nov2011.tar.gz /var/www /var/lib/mysql
It’s easy, but not necessarily obvious. Such things are common in the world of Linux and Unix.
To unmount the drive, issue the following command:
umount /mnt
David Farquhar is a computer security professional, entrepreneur, and author. He started his career as a part-time computer technician in 1994, worked his way up to system administrator by 1997, and has specialized in vulnerability management since 2013. He invests in real estate on the side and his hobbies include O gauge trains, baseball cards, and retro computers and video games. A University of Missouri graduate, he holds CISSP and Security+ certifications. He lives in St. Louis with his family.