Re: format external drive ext3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 23 March 2007, Daniel Jensen wrote:
>I purchased an external drive  (250GB) and would like to format ext3 to
>use for back-ups or additional storage.  Since, I'm new to Linux not
>sure how to start the process.  Any help would be greatly appreciated...

First, do a 'df' from a shell, which will show you the currently mounted 
drives so that you can make sure you are not accidentally formatting your 
system drive as that might be embarrasing.

Then start a "tail -f /var/log/messages" so you can watch it in real time 
as you plug this drive in.

Note where the drive shows up this tail of the messages log when you plug 
it in.  Cancel any automount requestor's thrown up.

The find a shell, become root and do 'fdisk /dev/name-from-messages-log', 
where this name-from-messages-log will probably something in the sda 
through sdf set of devices.  We'll use sdb here since sda has a small 
chance of being the system drive if all your internal drives are SATA 
drives.

When its up, hit p once to see what the drives says it is now.  Probably 
some M$ format.  I'd assume it only has one partition showing so hit 
a 't'.  fdisk will ask you for the partition number, give it a 1 for the 
first one, and a new partition type number, and linux ext2/3 is a type 83 
so enter that and hit the return.  Do another 'p' and verify it was 
changed correctly.  If it was, hit 'w' which will actually do the write 
to the drive and exit after doing a synch operation so the kernel knows 
it has this new partition.  If it doesn't exit, hit a 'q' and it should.

Now its an ext drive, but its not yet formatted, so,
Still as root, do:

mke2fs -j /dev/name-from-messages-log but append a 1 to the devicename to 
indicate the first partition.

This will install the ext3 filesystem on that partition.

Now its a mountable drive/partition, so do:

mkdir /mnt/sdb1 <make this the same name as above but with the partition #

And then:

mount -t ext3 /dev/sdb1 /mnt/sdb1

Now the drive should be usable, and its capacity should show up as a new 
entry in the 'df' report when a df is run.

HTH

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
"Elvis is my copilot."
-- Cal Keegan


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux