DISCOVER
×

How to format a disk in busybox

Updated April 17, 2017

Linux embedded systems and appliances usually do not have much physical data storage space or memory available, as such systems are designed for high availability with very few moving parts. The BusyBox application was designed to save space on embedded systems while still providing the essential command shell functionality needed for system administration. Adding an external hard disk drive to an embedded Linux appliance requires that the drive be formatted prior to use. Format an external hard disk drive using the functionality provided by BusyBox.

Log in to the embedded Linux device using the user name and password of the root account or an account with administrator permissions.

Type "df -h" on the command line, and press "Enter." Note the name of the new hard drive listed under the "Filesystem" column. The new hard drive can be identified based upon the size of the drive listed in the output.

Type "fdisk name_of_drive" on the command line, but replace "name_of_drive " with the name of the new hard drive noted earlier. Press "Enter." Type "mkfs.vfat --v name_of_drive size_of_drive," but replace "name_of_drive" with the name of the new hard drive noted earlier appended with the number "1," and replace "size_of_drive" with the size of the drive in "K" or kilobytes as displayed in the "df" command output. Press "Enter" to format the drive. The single partition on the drive will be formatted with the FAT32 file system.

Things You'll Need

  • Embedded Linux device with BusyBox installed and running
  • Credentials for administrator or root account on the embedded Linux device
  • Unformatted hard drive installed on embedded Linux device
  • Terminal access to the embedded Linux device
Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Dave Wilson has been writing technical articles since 1993, including manuals, instructional "how-to" tips and online publications with various websites. Wilson holds a Bachelor of Arts in psychology from the University of California, Los Angeles and has Microsoft, Cisco, and ISC2 (CISSP) technical certifications. He also has experience with a broad range of computer platforms, embedded systems, network appliances and Linux.