Go to TogaWare.com Home Page. GNU/Linux Desktop Survival Guide
by Graham Williams
Duck Duck Go

New Disk Setup


20180527 Connecting a new disk to a computer may require the disk to be partitioned and then the partitions of the disks to be formatted before it can be used. The command cfdisk from the util-linx package can be used to partition a disk. Use mkfs.ext3 from e2fsprogs to format the disk:

  $ sudo cfdisk /dev/sdb
  $ sudo mkfs.ext3 /dev/sdb1

20180527 As an example I had an old 16GB USB thumb drive that I wanted to make use of. It had already been partitioned in some way but could not be mounted and I was unable to determine its contents. Perhaps it had become corrupted in some way (which could be a sign that it is not reliable, so best no to use it for archival purposes). I plugged it in and used gnome-disks to determine the device name after selecting the 16 GB Thumb Drive (San Disk Cruzer Slice) entry from amongst the identified disks. The device was /dev/sde1. Thus:

  $ sudo mkfs.ntfs /dev/sde1
  Cluster size has been automatically set to 4096 bytes.
  Initializing device with zeroes: 100% - Done.
  Creating NTFS volume structures.
  mkntfs completed successfully. Have a nice day.

This took quite some time given the zero wipe of the disk (writing zeros to the disk to reduce the possibility of data breach).

Copyright © 1995-2018 Togaware Pty Ltd
Support further development through the purchase of the PDF version of the book.
Brought to you by Togaware and the author of the open source software Rattle and wajig.
Also the author of Data Mining with Rattle and Essentials of Data Science.