LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux can't see my WD hard drive (https://www.linuxquestions.org/questions/linux-newbie-8/linux-cant-see-my-wd-hard-drive-141105/)

vaxvr 02-01-2004 03:12 PM

Linux can't see my WD hard drive
 
I can't seem to find an answer anywhere for this specific problem i've run into.

I have Linux (MD 9.1) dual booting with WinXP on /dev/hda which is fine, there's 7 partitions total on that drive, 2 NTFS and 5 Ext2 for linux. It's a 60GB IBM drive.

A while ago I added a 2nd hard drive (WD 1200JB - 120GB), which is formatted with 1 100GB NTFS partition. The problem is, linux has never seen(it has never shown up in linux) this drive before, i've just never needed to fix it until now.

So my setup is the 60GB IBM is the IDE primary master drive(/dev/hda).
The 120GB WD is the IDE secondary master drive, which should be /dev/hdc, but linux has no /dev/hdc listed at all.
I also have a Plextor burner as IDE secondary slave which shows up and works fine in linux as /dev/hdd as it should.


So it has now become important to see the WD on /dev/hdc because i just installed FreeBSD to a 10GB slice on it, and i want to use lilo to boot it, but lilo can't because linux doesn't see /dev/hdc at all, hence can't boot the necassary partition to fire up FreeBSD.

Any suggestions or help anyone? I release the drive should just be showing up as /dev/hdc but is there anyway i can manually add the drive in or have linux scan the IDE bus's for new drives?

any help would be appreciated. thanks in advance.

Mara 02-01-2004 03:34 PM

How do you try to access the drive? Is it mentioned in kernel boot logs (dmesg command to list them).

vaxvr 02-01-2004 03:41 PM

Actually in dmesg the WD is found right after the hda as hdc, here's the line:

hda: IC35L060AVER07-0, ATA DISK drive
hda: DMA disabled
blk: queue c03cb420, I/O limit 4095Mb (mask 0xffffffff)
hdc: WDC WD1200JB-00CRA1, ATA DISK drive
hdd: PLEXTOR CD-R PX-W2410A, ATAPI CD/DVD-ROM drive
hdc: DMA disabled
blk: queue c03cb86c, I/O limit 4095Mb (mask 0xffffffff)
hdd: DMA disabled
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 120103200 sectors (61493 MB) w/1916KiB Cache, CHS=7476/255/63, UDMA(100)
Partition check:
/dev/ide/host0/bus0/target0/lun0: p1 p2 p3 < p5 p6 p7 >


So it appears hdc shows up here just like hda but then there's no reference to it in the /dev dir. It seems to be missing the blk: for hdc though?

I should probably get DMA enabled on thos HD's too.

Electro 02-01-2004 03:42 PM

Go into the BIOS and activate the Secondary Master channel. If its already activated, type "dmesg | grep -i WD". If you see it listed all you have to do is log in as su or root, make a directory in /mnt, and mount it. When mounting NTFS partitions, use the read-only option. This is because LINUX can not write to NTFS safely. If you want to use the WD for storage, format it as FAT32. However, Windows XP limits formatting FAT32 partitions to 32 GB, so you have to use Win98 or WinME to format your hard drive.


What does cat /proc/cmdline say. I think you have noprobe for hdc.

Did you set the hard drive as master.

vectordrake 02-01-2004 03:47 PM

Quote:

Originally posted by Mara
How do you try to access the drive? Is it mentioned in kernel boot logs (dmesg command to list them).
If so, add the drive with these two steps:

1) make a mount point to represent the drive (say, hdb1)
2) edit your /etc/fstab and add a line to point to the new mount point:
mount point-->/dev/hdb1
device -------->/dev/hdb1 (if its the first partition you need)
set permissions like the other drives/mounts

save. exit. mount. should be there.

vectordrake 02-01-2004 03:48 PM

I type too slowly.lol

vaxvr 02-01-2004 03:54 PM

Quote:

Originally posted by Electro
What does cat /proc/cmdline say. I think you have noprobe for hdc.

Did you set the hard drive as master.

Yep hard drive is set as master.

cat /proc/cmdline says:
BOOT_IMAGE=linux ro root=305 quiet devfs=mount hdc=ide-scsi acpi=off

I don't necessarily care about seeing that NTFS partition, i would just like hdc to be parsed in the /dev dir. Like there should be a /dev/hdc, /dev/hdc1 and /dev/hdc2 (or how ever many partions linux would see in a BSD slice).

Because my ultimate goal is to get lilo to boot FreeBSD for me, but since linux can't see hdc i can't point lilo in it's direction.

Does this make sense? Am i going in the right direction?

Mara 02-01-2004 04:00 PM

You probably need to remove "hdc=ide-scsi" from from lilo.conf. I think your disk doesn't need it. It's in "append=" line somewhere. Then run lilo and try it.

vectordrake 02-01-2004 04:00 PM

fdisk /dev/hdb

what do you get?

vectordrake 02-01-2004 04:01 PM

Quote:

Originally posted by Mara
You probably need to remove "hdc=ide-scsi" from from lilo.conf. I think your disk doesn't need it. It's in "append=" line somewhere. Then run lilo and try it.
Good point. I didn't see that. That's for making Linux read your cd burner as a SCSI device, making it possible to burn things. It ain't a burner.

vaxvr 02-01-2004 04:25 PM

Actually i see why that might've happened, the CD burner used to be hdc before i installed the new WD hd as the secondary master and bumped the burner to secondary slave(/dev/hdd).

So in lilo.conf i changed the append= line to hdd=ide-scsi (since hdd is the burner now).

Then i restarted and nothing seemed to change, /dev/hdc didn't appear.

and cat /proc/cmdline still says:
BOOT_IMAGE=linux ro root=305 quiet devfs=mount hdc=ide-scsi acpi=off


For troubleshootings sake here's my whole lilo.conf:
[root@localhost dev]# cat /etc/lilo.conf
boot=/dev/hda
map=/boot/map
vga=normal
default="windows"
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label="linux"
root=/dev/hda5
initrd=/boot/initrd.img
append="quiet devfs=mount hdd=ide-scsi acpi=off"
vga=788
read-only
image=/boot/vmlinuz
label="linux-nonfb"
root=/dev/hda5
initrd=/boot/initrd.img
append="devfs=mount hdd=ide-scsi acpi=off"
read-only
image=/boot/vmlinuz
label="failsafe"
root=/dev/hda5
initrd=/boot/initrd.img
append="failsafe devfs=nomount hdd=ide-scsi acpi=off"
read-only
other=/dev/hda1
label="windows"
table=/dev/hda
other=/dev/hda2
label="windows2"
table=/dev/hda
other=/dev/fd0
label="floppy"
unsafe
other=/dev/hdc
label="FreeBSD"
table=/dev/hdc
loader=/boot/chain.b

michaelk 02-01-2004 05:50 PM

You need to rewrite lilo for configuration changes to become effective.
/sbin/lilo

vaxvr 02-01-2004 09:37 PM

Thanks for all the excellent help everyone. Ran lilo again after changing everything to hdd=ide-scsi in lilo.conf.

Rebooted and /dev/hdc and /dev/hdc1-7 appeared.

Now I can boot Windows, Linux and FreeBSD.

Great help, much appreciated!

vectordrake 02-01-2004 09:51 PM

Remember if you add the partition (or slice in *BSD terms) to your /etc/fstab you can access it from Linux as well (same the other way around as well). I had a friend who did that and actually was successful at writing to his database from either OS. Cool! Enjoy the triple boot! Have you left room for BeOS? :D

qneill 08-01-2004 09:30 PM

Quote:

Originally posted by michaelk
You need to rewrite lilo for configuration changes to become effective.
/sbin/lilo

I had the same problem, and this thread lead me to the solution, so thanks :cool: .

I happily changed my lilo config, ran /sbin/lilo, and rebooted... and got a kernel panic :eek: (no initd available -- and trying to boot from the wrong partition).

After some head-smacking, I remembered my RedHat 9 system was setup to boot from grub instead of lilo.

I ended up booting from CD, using Ctl-Alt-F2 to get to a shell prompt, mounting root, and re-running the grub setup:

# mkdir /tmp/mnt
# mount /dev/hda1 /tmp/mnt
# vi /tmp/mnt/boot/grub/
(changed hdc=ide-scsi to hdd=ide-scsi)
# /tmp/mnt/sbin/grub
root (hd0,1)
setup (hd0)


Of course you need to salt and pepper as needed for your system.

I ended up reading the http://www.gnu.org/software/grub/manual/grub.html before I got it right.


All times are GMT -5. The time now is 02:52 AM.