LinuxQuestions.org
Help answer threads with 0 replies.
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 09-07-2007, 12:16 PM   #1
himy
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
how to format the hard disks(removable & fixed) ?


what are the commands to format the hard disks and flash drives in fedora 7, with desired file system? and how can i transfer my hard-disks into linux, that were earlier under windows-xp?
 
Old 09-07-2007, 12:23 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
man parted
man fdisk

Quote:
how can i transfer my hard-disks into linux, that were earlier under windows-xp?
Not sure about this question: do you want to turn old fat/ntfs drives into ext3/whatever? Or do you want to be able to access stuff on the XP drive using linux?
 
Old 09-07-2007, 12:33 PM   #3
himy
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Simon Bridge View Post
man parted
man fdisk

Not sure about this question: do you want to turn old fat/ntfs drives into ext3/whatever? Or do you want to be able to access stuff on the XP drive using linux?
i want to make old drives work in linux permanently without mounting them all the time. Is formatting them with ext3/whatever.. is the only way?
 
Old 09-07-2007, 12:50 PM   #4
fltltpankaj
LQ Newbie
 
Registered: Aug 2007
Posts: 1

Rep: Reputation: 0
there are two ways of doing it.

Firstly, By making an entry in /etc/fstab file in Linux. This will result in auto mounting of old drives containing windows data, without your intervention. In this case you can work on these drives from linux without any hassles.

Secondly, as you said you can format the drives as ext2 or ext3 and mount in filesysytem.
 
Old 09-07-2007, 12:51 PM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
i want to make old drives work in linux permanently without mounting them all the time
It is not possible to access any drive without mounting it, I suspect you are confused. What do you mean by "work"?

I am guessing you want the OS to mount the drive for you when you boot instead of having to type in the mount command or use the user mount tool.

gedit /etc/fstab

This is the file-system table...
add your drive to the bottom. It's pretty easy to follow by comparing with partitions that automount. You need to read the manpage for fstab for details.
 
Old 09-07-2007, 03:18 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
And, to answer you original question, use the mke2fs command to create a file system on a physical partition. (Despite the e2 in the command name, it can also be used to created ext3 file systems. See man mke2fs for instructions.)

If you'd like to keep your disks in NTFS (and preserve the data on them), do a yum install ntfs-3g and make entries in your /etc/fstab like this:
Code:
# Added by hand . . .
/dev/sda1               /hd/c                   ntfs-3g rw,uid=root,gid=disk 0 0
/dev/sda2               /hd/d                   vfat    uid=root,gid=disk 0 0
#
# SMB file system (Handled by automount: See /etc/auto.master and /etc/auto.cifs)
#
# USB Drive
/dev/USB_Fedora/Base    /usb                    ext3   defaults,noauto  0 0
LABEL=/boot2            /usb/boot               ext3   defaults,noauto  0 0
LABEL=/shared           /usb/shared             ext3   defaults,noauto  0 0
The entries in bold are for a NTFS partition and a FAT partition. Both mount the disk with "root" as the owner and anyone in the "disk" group with r/w access to the partitions.

The entries at the end show how I mount my USB drive partitions. Note that my USB drive contains a logical volume with a Fedora Core 6 installation on it. The "noauto" option tell Fedora 7 to "file and ignore" the definitions untill I attach the drive and run the following script:
Code:
$ cat Scripts/MountUsb
#! /bin/bash
dev="/dev/sda"
if [ x"$1" = "x" ];
then
  dev="/dev/sda"
else
  dev=$1
fi
# Mount ${dev} if it exists
if [ -b ${dev} ]; then
    sudo /sbin/vgchange -a y USB_Fedora
    sudo mount /usb
    sudo mount /usb/boot
    sudo mount /usb/shared
else
    echo Drive ${dev} was not found.
fi
 
Old 09-07-2007, 08:31 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
PTrenholme: a quite complete reply there... I suspect the parts about ntfs-3g are the bits actually wanted. I have some observations:

I see you do not use drive labels in fstab, I understand f7 s OK with this but fedora is moving towards increased HW abstraction.

For the fstab entries to work, don't the directories /hd /hd/c and /hd/d need to exist?

Arn,t these directory names susceptible to confusion with hdc and hdd?

Aren't user mounted partitions better in /mnt or /media? In your case, /mnt/sda1 and /mnt/sda2 are more usual. Some people prefer mounting under /media, and maybe a more descriptive name like /media/winC and /media/winD ... it is usually frowned-upon to create directories off root just for this sort of thing.

The udev system in f7 is supposed to automount USB partitions. But I see the fedora-usb installation is on an LVM volume ("logical volume is too easy to confuse with logical partition)... an annoying habit fedora has these days. Not really needed for a single physical volume and it would probably mess up the normal automount.

Sometimes, answering the original question faithfully and completely can just lead to more confusion and "WTF" style reactions from newcomers. I mean, if you'd just come from windows and saw that usb-mount script, you'd go "WTF: I just plug them in in windows, what a useless OS!"

OTOH: my, "read the manual", response with "I don't understand the question" could be said to leave something to be desired.

So I'd be interested in what OP has to say.
 
Old 09-08-2007, 05:27 PM   #8
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by Simon Bridge View Post
PTrenholme: a quite complete reply there... I suspect the parts about ntfs-3g are the bits actually wanted. I have some observations:

I see you do not use drive labels in fstab, I understand f7 s OK with this but fedora is moving towards increased HW abstraction.
Well, I've got some drives with duplicated labels on some partitions, so the /LABEL= directive gets confused.

Quote:
For the fstab entries to work, don't the directories /hd /hd/c and /hd/d need to exist?
Yes.

Quote:
Aren't these directory names susceptible to confusion with hdc and hdd?
Not on Fedora 7: All fedora drives are sda, etc.

Quote:
Aren't user mounted partitions better in /mnt or /media? In your case, /mnt/sda1 and /mnt/sda2 are more usual. Some people prefer mounting under /media, and maybe a more descriptive name like /media/winC and /media/winD ... it is usually frowned-upon to create directories off root just for this sort of thing.
Perhaps, but, hey, Linux is about freedom, eh?

Quote:
The udev system in f7 is supposed to automount USB partitions. But I see the fedora-usb installation is on an LVM volume ("logical volume" is too easy to confuse with logical partition)... an annoying habit fedora has these days. Not really needed for a single physical volume and it would probably mess up the normal automount.
"Automount" just ignores the LVM partitions. And my /usb tree is set to mimic the root tree I have when I boot from the USB drive.

Quote:
Sometimes, answering the original question faithfully and completely can just lead to more confusion and "WTF" style reactions from newcomers. I mean, if you'd just come from windows and saw that usb-mount script, you'd go "WTF: I just plug them in in windows, what a useless OS!"

OTOH: my, "read the manual", response with "I don't understand the question" could be said to leave something to be desired.

So I'd be interested in what OP has to say.
Yes, me too.

And I agree that "too much" can be confusing, but I felt that the OP could benefit from an actual example. Perhaps -- well, probably -- I should not have included anything about the USB drive, although the OP asked about removable media as well as fixed disks.
 
Old 09-08-2007, 05:47 PM   #9
cojo
Member
 
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
Not on Fedora 7: All fedora drives are sda, etc.

This is not true. Fedora see all SATA, USB, SCSI drives as sd*. It still see IDE drive as hd*.
 
Old 09-08-2007, 06:45 PM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
Well, I've got some drives with duplicated labels on some partitions, so the /LABEL= directive gets confused.
... wow... I guess that can happen if you have a drive which hosted a previous install. Developers seem to expect you to relabel the drive or explicitly set a different label on the new drive or have all drives installed at the distro install or something. I, personally, don't see the point of so much abstraction (on a home desktop) - it just seems to be the "in" thing. No doubt I just earned a lecture...

[hd/c confuse with hdc etc]
Quote:
Not on Fedora 7: All fedora drives are sda, etc.
Yeah I know that, you know that... have you never had anyone new who'd read an old howto? Never mind, it's a niggle anyway.

[partitions better in /mnt or /media?]
Quote:
Perhaps, but, hey, Linux is about freedom, eh?
Perhaps, but should an individual "custom method" be presented to a novice?

[LVM volume ... would probably mess up the normal automount.]
Quote:
"Automount" just ignores the LVM partitions. And my /usb tree is set to mimic the root tree I have when I boot from the USB drive.
As suspected. And mimicing like that makes the setup clearer for you when you are not booting from usb. It's a good idea.

Quote:
And I agree that "too much" can be confusing, but I felt that the OP could benefit from an actual example. Perhaps -- well, probably -- I should not have included anything about the USB drive, although the OP asked about removable media as well as fixed disks.
"Removable media" could be a floppy, a pendrive, a CD-ROM ... hopefully OP hasn't been put off by our little discussion and will clear that up for us

You have provided a nice solution with that USB, and the ensuing discussion should have provided enough references so people looking for that solution have a chance of finding it.

Most of my questions were really concerned with "what to tell newbies"... it could be that OP read your post and just "got it" but found my approach mystifying: which knocks me right off my high horse. So they are not very heavy criticisms.

Anyway, it gives us something to do while we're waiting for OP to reply

Quote:
Originally Posted by cojo
Fedora see all SATA, USB, SCSI drives as sd*. It still see IDE drive as hd*.
Really, it's not supposed to?

fedora 7 release notes
Quote:
n this release, all hard disk partitions follow a /dev/sd* naming convention due to a new libata driver interface in the kernel.
cojo: are you really still using RH8??!

Last edited by Simon Bridge; 09-08-2007 at 06:49 PM.
 
Old 09-08-2007, 06:54 PM   #11
cojo
Member
 
Registered: Feb 2003
Location: St. Louis
Distribution: RedHat 8
Posts: 262

Rep: Reputation: 31
Simon Bridge,

Yes and No. I do have one system I managed is running RH8. But, all my system are either Red Hat 2.1 to 5 or Fedora 1 to 6. Also, I'm just too lazy to update my profile.....LOL
 
Old 09-09-2007, 06:23 PM   #12
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,186

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
Quote:
Originally Posted by cojo View Post
Not on Fedora 7: All fedora drives are sda, etc.

This is not true. Fedora see all SATA, USB, SCSI drives as sd*. It still see IDE drive as hd*.
Well, perhaps on yous system. I don't have any hard drives that aren't IDE, and they all register as sd* when I do a fdisk -l. Here's an example from this laptop:
Code:
$ /sbin/fdisk -l
 
 Disk /dev/sda: 80.0 GB, 80026361856 bytes 255 heads, 63 sectors/track, 9729 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes 
    Device Boot      Start         End      Blocks   Id  System 
/dev/sda1   *         894        5730    38853202+   7  HPFS/NTFS 
/dev/sda2               1         893     7172991    b  W95 FAT32 
/dev/sda3            5731        5743      104422+  83  Linux 
/dev/sda4            5744        9729    32017545    5  Extended 
/dev/sda5            5744        9729    32017513+  8e  Linux LVM
 
  


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
Removable hard-drive racks & caddies Robhogg General 6 09-11-2006 07:11 AM
On the fly mount points for removable storage disks kite Slackware 1 10-09-2005 07:19 AM
Hard Disks & RAID-1 DeathsFriend Fedora 2 03-25-2004 07:26 AM
Mounting hard disks & partitions dbong Linux - Hardware 3 01-16-2004 12:16 PM
Big Hard disks & P2B motherboard? luigi Linux - Hardware 7 05-08-2003 04:11 AM


All times are GMT -5. The time now is 12:01 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