1

I had fdisk segfault and just wondered if anyone had any other options?

EDIT: It was late and that was a dumb question. Good answer though!

Gareth
  • 8,413
  • 13
  • 43
  • 44

2 Answers2

4

fdisk is for partitioning drives. To format a drive, you would use the mkfs command. You need to specify the filesystem type using the -t option. I believe the default is ext2. The mkfs man page will explain more.

Example:

# mkfs -t vfat /dev/sda1
David Pashley
  • 23,151
  • 2
  • 41
  • 71
  • Note that gnu-fdisk can create a filesystem in addition to partitioning disks (and also resize, copy and move partitions). – pgs Jun 07 '09 at 09:45
  • Aye, it appears that gnu-fdisk is a reimplementation of the util-linux fdisk based on libparted. I suspect that most distributions ship util-linux fdisk by standard. You might as well use parted as that has a much nicer user interface than fdisk, which frankly wouldn't be hard. :) – David Pashley Jun 07 '09 at 10:20
1

If fdisk segfaults, then try cfdisk or sfdisk.

pgs
  • 3,471
  • 18
  • 19