Linux format external USB hard disk Partition

Q. I have an external new hard drive connected using USB port under Red Hat Fedora Core Linux. I want to use it for backup. There are two partition /dev/sda1 and /dev/sda2. This hard disk was setup and formatted by friend under Windows XP (NTFS partition). Now I want to format and use one partition for Linux and another for Windows XP.


How do I format sda1 without losing data from /dev/sda2?

A. To format /dev/sda1 as Linux ext3 partition use command mkfs.ext3. It is used to create an ext2/ext3 filesystem

Type the command as follows:
# mkfs.ext3 /dev/sda1

Before hitting [enter] key make sure you double check partition device name (/dev/sda1). If unsure make backup of important data on USB pen or DVD disk.

🥺 Was this helpful? Please add a comment to show your appreciation or feedback.

nixCrat Tux Pixel Penguin
Hi! 🤠
I'm Vivek Gite, and I write about Linux, macOS, Unix, IT, programming, infosec, and open source. Subscribe to my RSS feed or email newsletter for updates.

15 comments… add one
  • OhHenree Mar 4, 2010 @ 18:54

    After a lot of deliberation I am finally getting off the procrastination and trying to migrate away from the MS arena; but even though the Linux crowd defend it so, I find the obscurity just as dark as windows. Upon reading this post I see other new users have run into the same problem I have and the time I have spent, together with the multiple Linux books leaves me still in the dark. Why is it so difficult to buy a sata drive, plug it into a usb port and set it up? Linux does not even detect it, or at least say “there’s something out there” – nothing. So I have to format it in the system I want to leave and then bring it to Linux just so it will acknowledge it. Oh and the wireless is just as difficult, WPA-personal allows for 16 characters in the text box to set it up, damn and my network was using 31 characters, break out the CAT5 and run the extensions down all the hallways “Its back to yesterdays technology!” – great.

  • Manshell Jul 20, 2010 @ 16:43

    Hi, i installed Ubuntu in my external Hardisk and now i want to format it so the disk can be fully empty. How can i do it?
    Thanks in advanced

  • another Sep 20, 2010 @ 19:56

    mkntfs -Q -v -L “DISKLABEL” /dev/sdc1

  • PitaJé Dec 19, 2010 @ 22:43

    In ubuntu, you can use gparted to manage disk partitions via a gui.

    # sudo apt-get install gparted

  • swetha Jan 11, 2011 @ 6:45

    If a new hard disk is given to you what are the commands you use in
    order to make partition & format the hard disk in linux

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Your comment will appear only after approval by the site admin.