------------------------------------------------------------------------------- Software lsusb List USB connected to system usbview GUI to display what the kernel thinks of USB devices and system Watch usb events (plug/unplug) ------------------------------------------------------------------------------- Reformat a USB drive... VFat This is actually very fast as it only initialised the file system but does not clear the disk of old data. mkfs.vfat -v -n Ant_USB_4 /dev/sdb1 NTFS If you needed to save files larger than 4Gb with windows access But does not seem to be usable under MacOSX mkfs.ntfs -v -L Ant_USB_8 /dev/sdb1 Fast Method (no zeroing of all data blocks, no bad sector check) mkfs.ntfs -v -f -L Ant_USB_8 /dev/sdc1 Ext3/4 mkfs.ext3 -L Ant_USB_8 /dev/sdb1 mkfs.ext4 -L Ant_USB_8 /dev/sdb1 e2label /dev/sdb1 Ant_USB_8 After changes get it to 'auto-mount' by asking kernel to re-read partitions using... partprobe ------------------------------------------------------------------------------- Rename a USB partition... See https://help.ubuntu.com/community/RenameUSBDrive You need to be root to do this. For a VFAT partition (not case sensitive!)... #using dosfstools package -- does not work! # dosfslabel /dev/sdb1 # dosfslabel /dev/sdb1 MyLabel From mtools package Check current label mlabel -i /dev/sdb1 -s :: Set its Label mlabel -i /dev/sdb1 ::MyLabel For NTFS use ntfsprogs Check Label ntfslabel /dev/sdb1 Set Label ntfslabel /dev/sdb1 MyLabel For Ext2/3 use e2label Check Label e2label /dev/sdb1 Set Label e2label /dev/sdb1 MyLabel Now unmount, remove and repluging the USB and it will have a new label. Or use partprobe ------------------------------------------------------------------------------- Fix problems... dosfsck /dev/sdc1 -a automatically fix -atv find bad sectors on disk (verbosely) ntfsfix /dev/sdb1 ------------------------------------------------------------------------------- Bootable Fedora USB flash Disk https://fedoraproject.org/wiki/How_to_create_and_use_Live_USB Get the ISO image wanted sudo dnf install mediawriter sudo mediawriter Have it download a ISO, or install a ISO from local media ------------------------------------------------------------------------------- Raw "direct write" ISO to USB Unmount usb dd if=/path/to/image.iso of=/dev/sdX bs=8M status=progress oflag=direct ------------------------------------------------------------------------------- Bootable Linux USB flash Disk Take the usb pen drive, and use fdisk to wipe and recreate the DOS partition table, with bootable partition. Get latest UNetbootin http://unetbootin.sourceforge.net/ Clear USB fdisk -l fdisk /dev/sdc o n p a w Create partition (unetbootin wants to mount it!) mkfs.vfat -v -n Ant_White_2 /dev/sdc1 Mount mount /dev/sdc1 /mnt/t Run unetbootin to convert a ISO image to a image on USB QT_GRAPHICSSYSTEM=native unetbootin & Unmount and done. umount /mnt/t # ----------------------------------------------------------------------------- # Windows Boot Disk, Hirens Boot CD # (a free alternate Ghost) # # Download Hirens BootCD zip, and unpack it # Copy Ghost Files to CD/GHOST sub-directory # # Start wine explorer # HOME=/root wine explorer # # Launch Build-ISO.cmd # # Now use the unetbootin ISO to USB (above) to put image created # (same dir) onto USB stick # ------------------------------------------------------------------------------- Login using a USB key... * Install the pam_USB package rpm -Uvh http://solid.bounceme.net/pub_files/packages/fedora/4/i386/RPMS.solid/pam_usb-0.3.2-1.fc4.solid.i386.rpm * Create a private/public key pair for a user (as root) usbadm keygen 2048 This will work with all programs that use PAM. Their config files are in the folder /etc/pam.d From then you can now add lines to the pam system. * Open /etc/pam.d/(login|gdm|kde|su|sudo) * Insert this after the first line (If you want the USB to be optional) auth sufficient pam_usb.so !check_device * To make the USB compulsary, change it to this line auth required pam_usb.so !check_device -------------------------------------------------------------------------------