LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 02-04-2005, 02:39 PM   #1
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Rep: Reputation: 31
Formatting external harddrive to Linux format


I've got an external hard drive I'd been using for Windows up til now. But I got a larger one and want to use this one for Linux. (Never for Windows again) Since I used it for video editing and wanted to have files sizes greater than 4 GB I formatted it NTSF. Thus I know I will have to reformat it for Linux use. Can someone point me in the right direction on how to do this?

I have Fedora Core 3 and whatever the default file system was for FC2, which was my last clean install. (IOW I just upgraded to FC3, didn't wipe it clean minus /home as some others do)

My current plans are to connect the drive while the machine is off so that (I forget the name of the program) finds it upon boot time during the new hardware search and I'm figuring at that point I may be able to format it. If not, then from within KDE how do I format it? Or, since I also have Gnome installed, how do I format it from there?

Thank you,
 
Old 02-04-2005, 02:40 PM   #2
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Original Poster
Rep: Reputation: 31
(help within the next 2 or so hours would be just perfect for my time table) q;o)
 
Old 02-04-2005, 03:41 PM   #3
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
If the disk is already mounted, start by unmounting the disk (but don't disconnect it...); you can do this in Konquerer by right-clicking the disk label in the devices browser, or in Konsole (or any terminal) by typing

umount <your drive's mountpoint>

I'm not aware of any handy builtin KDE tools for disk management (Someone feel free to jump in here if I'm wrong), but you can do it from a terminal with this command:

mkfs.ext3 /dev/sda

Where /dev/sda is the device name for your drive. Check this first! I'm not a Fedora expert, so it might have a different label on your system. Additionally, if you have any other SCSI, USB, or Firewire drive attached, it may refer to one of those. Check by using the command cat /proc/partitions ; There should be an entry there that cooresponds to how big your Firewire drive is.

You'll likely have to logged in as root to do this.

This will, obviously, erase everything on the drive, just like with any reformat.

You'll then probably want to add this drive to your fstab so it will connect automatically when you boot up. Add a line like this to the file /etc/fstab

/dev/sda1 /mnt/firewire ext3 defaults,user 0 1

Change "defaults" to "noauto" if you'd like the drive not to be mounted until you do so yourself (such as by clicking on it in KDE)
 
Old 02-05-2005, 01:45 AM   #4
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Original Poster
Rep: Reputation: 31
Thanks for the information! I'm in the formmatting process now. I was wondering, for the /mnt/firewire do I replace that with /mnt/usb if mine is usb drive?

Everything else was right on target, even the cat /proc/partitions.

You were extremely helpful!
 
Old 02-05-2005, 01:51 AM   #5
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Original Poster
Rep: Reputation: 31
oh, I figured it out based on another example. But thank you once again for the previous information.
 
Old 02-05-2005, 02:33 AM   #6
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
Glad that worked out for you.

Yes, the mount point is just a name of your choosing; you can make it anything, anywhere you'd like...as long as you make sure it cooresponds to an empty directory.
 
Old 02-05-2005, 02:53 AM   #7
jtan325
LQ Newbie
 
Registered: Jan 2005
Location: Seattle
Distribution: Mandrake 10.1
Posts: 15

Rep: Reputation: 0
well i guess this would help if i had read your post earlier, but there is a package called Captive that allows Linux to read and write NTFS (using some Windows files). i got it to work fine with my 300 GB external USB hard drive, it's pretty sweet.

it has a moderate risk, i took the leap of faith: http://www.jankratochvil.net/project/captive/
 
Old 02-05-2005, 04:48 AM   #8
movery
Member
 
Registered: Jun 2004
Posts: 30

Rep: Reputation: 15
On a slightly tangential point, have you got your drive transferring data at USB2? I just got an external drive and it will only use the USB1 controller which is really slow...

Did you have to do anything special to get it working?

Thanks,
 
Old 02-05-2005, 11:40 AM   #9
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Original Poster
Rep: Reputation: 31
1) Movery - As of right now I have the drive on a USB 1 port. I am waiting to buy a pci card to upgrade it.

2) Anyone - I've got a bit of a problem. I did fdisk to create a partition. Then I did:

mkfs.ext3 /dev/sda1

So now my /proc/partition reads:

blah blah
8 0 120059904 sda
8 1 1200053713 sda1

In /etc/fstab I wrote:

/dev/sda1 /media/usbdisk ext 3 defaults, user 01

When I load up the drive I see a folder called lost+found with a lock on it. When I try to create a folder (called New Folder) I get the error message:

Access denied to /media/usbdisk/New Folder

Is there something I'm doing wrong that is preventing the drive from having write access by my normal user?

Any help would be greatly apprieciated so that I could finally begin to use this drive with Linux. Last night, at first I didn't fdisk and the boot loader complained. Now everything is dandy except that I can't write to it.

I'm going to simultaneously log in as root and see if root has write access since that will help us to be able to diagnose the problem. I'll be back in 5 minutes to let you know, but in the meanwhile, if anyone knows I'll be ever so happy.
 
Old 02-05-2005, 11:48 AM   #10
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Original Poster
Rep: Reputation: 31
Yup. The reasons I did that test was in case I did something wrong (although it was highly unlikely because on top of beucoup's instructions I later found the exact same instructions in a book I had bought on Fedora (and had forgotten to check) so I knew the commands were correct). But still I wanted to check if it was writeable - ie was it still NTFS or was it ext3. But it's apparently ext3 because I was able to create a folder as root.

So my new problem is this - how do I fix whatever I did wrong in fstab so that my other users have read/write access to my external drive? Is that particular mountpoint only for root or something? Whatever the problem is, I'll be more than happy to fix it.

Thanks for being so helpful,
 
Old 02-05-2005, 03:33 PM   #11
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
AFTER mounting the disk, confirm that the permissions for your mountpoint - /mnt/usbdisk - allows access for the desired users.

ls -ld /mnt/usbdisk

You may simply want to have your default user own the disk:

chown username /mnt/usbdisk
chmod 755 /mnt/usbdisk

Or you may want to create a groups of users who can access it. Some distros come with a "users"group that all normal users belong to:

chown root /mnt/usbdisk
chgrp users /mnt/usbdisk
chmod 775 /mnt/usbdisk

If you'd like other users to not even be able to read the disk, use permissions like 700 (for user) or 770 (for group) instead.
 
Old 02-05-2005, 05:29 PM   #12
DJOtaku
Member
 
Registered: Oct 2004
Location: USA
Distribution: Fedora 20; Arch; Kubuntu; Debian
Posts: 710

Original Poster
Rep: Reputation: 31
Thanks! All I had to do was add myself to "users" (which already existed on Fedora, but I guess everyone isn't put there by default) and after doing your commands I just had to reboot and it works now!

Additionally, if anyone else wants to know, I added the "rw" after defaults,user after some of the examples I found online. I don't know if that matters or not.

Thanks!
 
Old 02-05-2005, 09:18 PM   #13
beaucoup
Member
 
Registered: Jun 2003
Location: Florence, SC
Distribution: Gentoo i386
Posts: 180

Rep: Reputation: 30
rw is typically an implied option, but redundancy is harmless.
 
  


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
mount usb external harddrive, probably HFS format kr!s Linux - Hardware 2 02-02-2005 12:36 AM
formatting harddrive with necessary linux partitions mustang335 Slackware 5 05-27-2004 10:11 PM
Installing Linux on an external harddrive and booting from any computer scr02bcg Linux - Hardware 8 03-29-2004 09:11 PM
format an external scsi drive on linux Doyle Linux - Hardware 1 11-19-2003 02:02 PM
Installing linux to and USB external Harddrive??? loser04 Linux - Hardware 1 08-18-2003 02:36 PM


All times are GMT -5. The time now is 10:37 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration