LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 09-18-2006, 02:05 PM   #1
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Rep: Reputation: 30
How to scan ide devices


So how to scan for IDE devices. My google searches only brought up a bunch of post on how to get your cd burner up but no commands to actually scan the ide devices.

The reason I ask is, i installed a hd but i am unable to recognize it with hdb1/hdc1/hdd1. Any help with this would be appreciated.

G
 
Old 09-18-2006, 02:06 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,384

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
i guess you just want to run "fdisk -l" to list all hard drives the system knows about.
 
Old 09-18-2006, 02:34 PM   #3
gonus
Member
 
Registered: Apr 2002
Location: Huntsville, Alabama
Distribution: Ubuntu 9.04
Posts: 445

Original Poster
Rep: Reputation: 30
I moved it to another IDE cable and ran that and I see it listed as HDB. happen to know any way to lsit the file system. I thought it was ext3 but no joy when I use that in my fstab. error is invalid media type. Appreciate the quick response.

G
 
Old 09-19-2006, 10:34 PM   #4
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
If I understand you correctly you are saying that you installed a brand new hard drive and issuing the fdisk -l command shows the drive as /dev/hdb.

If that is the case then you have to create a partition table and then create a file system in the partition(s), just like in Windows.

If you have cfdisk that is easier to use than using fdisk to create a partition table. So first check to see if you have the cfdisk utility.
Code:
root> which cfdisk
/sbin/cfdisk
If you enter the "which cfdisk" command and you don't see any listing then you don't have it. If you do have it then enter the cfdisk /dev/hdb command. If you don't have cfdisk then just enter the fdisk /dev/hdb command.

Next create a partition. Make it type 83. Write the partition table back onto the disk. Exit the cfdisk or fdisk utility.

Next you have to create a file system. This is the same as when you format a partition in Windows. In Linux we use the mkfs command. There are a lot of different types of file systems. You can look them up. Let's say that you want to use the tried and true ext2 file system. This is what you would do to create an ext2 file system on /dev/hdb1.
Code:
root> mkfs -t ext2 -cv /dev/hdb1
This command will take a long time to finish because it is checking the partition for bad blocks as it creates the file system.

Once this finishes you can mount the file system. Let's say that you want to mount this file system at /mnt/hdb1. First you have to create the directory where you want to mount it. Then you mount the file system. Note that you only have to create the directory/mount point once.
Code:
root> mkdir /mnt/hdb1
root> mount /dev/hdb1 /mnt/hdb1
That's all there is to it. Now you can enter the following line in your /etc/fstab file to mount the file system automatically when you restart Linux.
Code:
/dev/hdb1   /mnt/hdb1   ext2   defaults   0  0
There are a lot of things that you can do in addition to what I have said here. You might want to prevent people from running programs that are on this partition. You can do this using the noexec option. This would go next to the word defaults in the fstab entry as in:
Code:
/dev/hdb1   /mnt/hdb1   ext2   defaults,noexec   0  0
You can look up all of the mount options by looking at the man page for the mount command and the man page for the fstab file.

Last edited by stress_junkie; 09-19-2006 at 10:39 PM.
 
  


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
Can I have more than 4 IDE devices in my PC? Joe Soap Linux - Hardware 7 02-26-2005 08:52 AM
More than 4 IDE Devices? FastFeet Linux - Hardware 2 01-27-2005 01:39 PM
More then 4 IDE-Devices -- What? How? JZL240I-U Linux - Hardware 6 01-06-2005 07:20 AM
how2 make the kernel scan both PCI IDE and Mboard IDE channels? carboncopy Slackware 1 07-23-2003 03:26 PM
How to scan for new devices ? adyga Linux - Newbie 3 06-20-2003 10:32 PM


All times are GMT -5. The time now is 08:01 AM.

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