LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-22-2006, 01:23 AM   #1
twelvenine
Member
 
Registered: Sep 2006
Posts: 72

Rep: Reputation: 16
formatting my external hard drive


i have this external hard drive and i want to use it to back up some files from my linux box, which can't write ntfs. the external drive is broken into two partitions(sda1 and sda2), both are ntfs.

i want to take one of the partitions(sda1) and format it in something that linux can write to(i'm thinking fat32), so i can store files from my linux box on it. My probelm is that i'm not sure how to go about doing this without messing up the other partition on the drive. i thought i would start by using cfdisk to change sda1 to a linux partition, then mkfs to write a new filesystem, but i'm afraid that re-writing the partition table will damage sda2. am i going about this correctly?

my memory is fuzzy on this, but i think i may have done something like this before during a linux install: even though i had only changed one partition, re-writing that partition table caused some problems with another drive partition.
 
Old 12-22-2006, 01:41 AM   #2
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The partition table can be re-written several times with out the data be affected. The partition table just gives the OS where a partition starts and ends using cylinders. Use sfdisk to help you backup the information of present partition table, so you revert to the partition table where you started from.

Use mkdosfs to format the desire partition to FAT32 and make sure you specify -F32 or else it still going to be FAT16. Double check the syntax of mkdosfs before hitting enter.
 
Old 12-22-2006, 02:03 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL
Distribution: Funtoo
Posts: 6,926

Rep: Reputation: 128Reputation: 128
If you issue "fdisk -l" as root you can double check your partitions.

Then if you want to change the label of the partition, use "cfdisk /dev/sda"
and change it to type "0C W95 FAT32 (LBA)".

If you want to format /dev/sda1 as FAT32 (both Windows and Linux can write):
Code:
/sbin/mkdosfs -F32 -v /dev/sda1
will do the job just fine.
 
Old 12-22-2006, 08:02 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Rep: Reputation: Disabled
If you use it for linux backups only (you didn't specify in the OP) I'd suggest a linux file system e.g. like ext3, since FAT doesn't store the permissions and owner attributes.
 
Old 12-22-2006, 08:11 PM   #5
twelvenine
Member
 
Registered: Sep 2006
Posts: 72

Original Poster
Rep: Reputation: 16
sounds good, thanks for the help
 
Old 12-22-2006, 11:50 PM   #6
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
If you want to have access to your files with out Linux and using FAT32 as the filesystem, but still keep the Linux permissions, use tar or dar.
 
Old 12-24-2006, 03:21 PM   #7
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 233Reputation: 233Reputation: 233
If you're really worried about your partition table, check out sfdisk w/ the "-d" option. (See man sfdisk.)
 
Old 12-27-2006, 03:53 AM   #8
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 42.1_64+Tumbleweed-KDE, Mint 17.3
Posts: 3,957

Rep: Reputation: Disabled
Quote:
Originally Posted by Electro
If you want to have access to your files with out Linux and using FAT32 as the filesystem, but still keep the Linux permissions, use tar or dar.
Whoa. Thanks for this one .
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting an external hard drive for Linux & Mac compatability. whyatt Linux - Hardware 7 03-15-2006 07:05 AM
Help formatting an external hard drive. ruddyss4 Linux - Hardware 3 03-04-2006 02:01 PM
formatting external hard drive usb_control/bulk_msg:timeout philasson Linux - General 0 03-16-2005 01:28 PM
formatting an external hard drive pobfosheezy Linux - Laptop and Netbook 1 09-18-2003 12:12 PM
Problem formatting and using Maxtor 5000LE external hard drive jwilde Linux - Hardware 1 08-11-2003 06:58 PM


All times are GMT -5. The time now is 12:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration