Ssh the server as root user and find the device label using :
- # dmesg | tail
On the device list confirm the device name of your pen drive. Say for example ” /dev/sda “, if it is mounted first you needed to unmount it first.
- # umount /dev/sda
Use the mkfs.vfat command to format the drive with FAT32 filesystem. For ext3 use mkfs.ext3
Formatting with FAT32
- # mkfs.vfat -n “Your-label” -I /dev/sda
Formatting with Ext3 & Ext2
- # mkfs.ext2 -n “Your-label” -I /dev/sda
- # mkfs.ext3 -n “Your-label” -I /dev/sda
Replace the “Your-label” with your own label. After formatting just mount the drive again.
- # mount /dev/sda /mountpoint