Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Hardware
User Name
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?


  Search this Thread
Old 09-18-2006, 03:05 PM   #1
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.

Old 09-18-2006, 03:06 PM   #2
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
i guess you just want to run "fdisk -l" to list all hard drives the system knows about.
Old 09-18-2006, 03:34 PM   #3
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.

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

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.
root> which 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.
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.
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.
/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:
/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 11:39 PM.


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

All times are GMT -5. The time now is 12:59 PM.

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