Linux format external USB hard disk Partition

by on December 22, 2006 · 15 comments· LAST UPDATED December 22, 2006

in , ,

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.

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 15 comments… read them below or add one }

1 rocky March 16, 2007 at 8:43 am

Thanks a lot

Reply

2 norman March 27, 2007 at 10:31 am

I have put ubuntu onto a hard drive and would like to know if I could format it so I can use windows xp
most obliged
Norman

Reply

3 Dan Saint-Andre August 7, 2007 at 5:40 pm

I have a usb drive without any partitions. Win-doze sees a drive but will not partition same. Linux sees the connect, but /dev/sdXX never gets created. Maybe it comes and goes, but there is nothing I can find.

How do you access an empty hard drive out on a usb port?

Reply

4 lewis lipkin August 27, 2007 at 8:46 pm

Have you received any replies to your query?
If so can you pass on the solution.
TIA

Lew Lipkin

Reply

5 kasi September 26, 2007 at 11:49 am

I had a usb drive it was detecting under linux and windows ,but after some time it was not detected under windows, now i want to format the usb under knopix linux

Reply

6 Allen April 27, 2009 at 2:32 am

I have installed USB drive and created a single partition for data only. Everything seems to be working except my ability to move a file to the partition with a file name. Then I need the ability to extract that file or any file on the partition for the purpose of edit, then move back.

Reply

7 Vadim Motorine August 5, 2009 at 1:39 pm

Thanks a lot. It indeed works.

Reply

8 Mandy February 16, 2010 at 5:09 pm

Hi, I am a first time user on Ubuntu Linux and I am trying to format my USB Flash Drive. I am able to fdisk and type the format command mkfs.xxx /dev/sdb1 but then I get a long list of commands to choose from. I have no idae which one to choose. All I really want to do is format my USB, I want everything off.

Please help. I honestly am lost.

Thank you

Reply

9 Blerim February 22, 2010 at 4:06 pm

Hi,can someone tell me how to install two OS (first Linux is installed) now Windows,but my laptop dosnt have DVD-ROM?

Reply

10 charlie maaere February 28, 2010 at 12:37 pm

hey guys, to format a USB, Flash drive in Linux there is graphical tool created check this link

https://sourceforge.net/projects/cha-formatter

enjoy!

Reply

11 OhHenree March 4, 2010 at 6:54 pm

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.

Reply

12 Manshell July 20, 2010 at 4:43 pm

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

Reply

13 another September 20, 2010 at 7:56 pm

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

Reply

14 PitaJé December 19, 2010 at 10:43 pm

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

# sudo apt-get install gparted

Reply

15 swetha January 11, 2011 at 6:45 am

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

Reply

Leave a Comment

Tagged as:

Previous Faq:

Next Faq: