# External hard drive freeze [SOLVED]

## InfinityX

Where to start, running a half day old install of gentoo on 2.4.22, after a stage 3 install with genkernel and hotplug. I'm new to gentoo and linux so please talk slowly  :Wink: 

Put simply whenever I plug in my mp3 player (iRiver iHP-100) which acts as a usb hard drive everything freezes and I'm forced to restart, having it plugged in during startup makes it freeze as well.

From what I understand from searching, I have to make a mount point and add an entry in fstab? How would I go about doing this?Last edited by InfinityX on Tue Feb 10, 2004 11:18 pm; edited 1 time in total

----------

## taskara

the mount point and fstab won't help you yet.. u need to get it to work without freezing first.

did you compile in all the correct modules into your kernel? (you may have used genkernel)

you need scsi support, scsi generic support, scsi disk support, and usb support, and usb mass storage support.

these need to be either statically compiled into your kernel, or they need to be as modules.

hotplug should auto detect and install the modules for you, but if not (for some reason) you can list them in /etc/modules.autoload/kernel2.x

----------

## InfinityX

Well I have usb devices working (keyboard etc) and I've seen usb support and usb mass storage support come up during boot but when it gets to the point where I think it would detect the drive it freezes.

I did use genkernel and have no idea if I scsi support, where do I go from here?

----------

## taskara

hmmmm

the device works under windows?

do you have any other usb storage devices like a usb memory stick, or 6 in 1 card reader that you can see if it also freezes?

wanna find out if it is the device or the system..

----------

## InfinityX

It's the only usb storage device I have unfortunately, though I do have it on good authority that the player can work on linux (there are third party linux equivalents of the database management software).

----------

## taskara

ok.. then the only other option I can think of is to re-build your kernel with a newer version.

do you know what version you are using atm?

we probably need to build a custom kernel and see how we go from there.

----------

## InfinityX

It's on 2.4.22 now using vanilla-sources. Am I right in thinking I make this build and save it as something else, add an extra entry in the grub.conf and be able to choose which one I want at startup?

----------

## taskara

cha ching

exactly

I'd run emerge rsync to get the latest portage

2.4.24 is the latest stable

if you are feeling daring you could even go 2.6.x :O

don't forget to mount /boot before you copy over the new bzImage

----------

## InfinityX

Okay it's synching now, what specifically do I need to add when configuring the kernel?

And that mount /boot thing went straight over my head  :Embarassed: 

----------

## taskara

hehe nps.

by default /boot is NOT mounted when you start your computer (so you don't delete your kernel etc..)

so you need to mount it b4 you can copy the new kernel over.

so here's what you need to do:

```
emerge rsync

rm /usr/src/linux

emerge vanilla-sources
```

now you could try using genkernel again to compile your new kernel - give this a go first, and if it fails again, then we'll build by hand.

```
ls -l /usr/src/linux
```

make sure that points to /usr/src/linux-2.4.24!

```
emerge genkernel
```

to get the latest version

```
mount /boot

genkernel
```

now you need to edit your grub.conf - it's basically the same as the first entry you did, but this time change the name of the kernel and initrd to reflect your new kernel, and call it something different in the title.

try booting and let me know how you go!

----------

## InfinityX

Thanks for all your help, it's getting late though so I'll have to postpone until tomorrow. I have a whole day off with which to get everything running  :Very Happy: 

----------

## taskara

ok, well it's midday here.. so hopefully we can meet up again later on.

let me know how you go with the new kernel.. just follow those steps i outlined there in "code".

----------

## InfinityX

Ok so here's what's happened, I've followed your instructions exactly (appart from genkernel, I had to use genkernel all to get it to do anything) and attempted a boot.

Part way through boot it stops, displaying Step 3 then Step 4, "determining the root" or something to that effect. Of course at that time during boot my usb keyboard isn't initialised so I can actually type anything into the prompt.

Here's my grub.conf:

```
default 0

timeout 5

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.4.22

root (hd0,0)

kernel (hd0,0)/kernel-2.4.22 root=/dev/hda3 vga=788

initrd (hd0,0)/initrd-2.4.22

title=Gentoo Linux 2.4.24

root (hd0,0)

kernel (hd0,0)/kernel-2.4.24 root=/dev/hda3 vga=788

initrd (hd0,0)/initrd-2.4.24

```

----------

## taskara

sounds like you don't have the driver installed for your ide controller..

what mainboard are you using? via? intel? nforce? sis? whatever it is, try making sure it's built into your kernel and try again..

----------

## InfinityX

Well I did genkernel so I can't choose what I want supported right? I have a Via board though, I'll do the make menuconfig thing and try again.

----------

## taskara

yeah.. this time just compile it manually.

or if you like I can create a kernel for you and you can download it.

what hardware do you have? mainboard? video card, cpu, ram etc..

----------

## InfinityX

Something weird is going on, it may just be the difference between 2.4.22 and 2.4.24 but almost everything is modularised! And if I try to set some of those to include it beeps, goes back to the terminal and then back into the kernel configuration and nothing's changed  :Confused: 

----------

## taskara

ok. let me build a kernel for you.

what's your hardware (see post above)

----------

## InfinityX

AMD Athlon Xp 2600+ 333Mhz FSB

512mb DDR RAM PC 2700

Giga-Byte 7VA Motherboard (USB2 support needed)

Radeon 9700Pro 128mb

Creative SoundBlaster Live! 5.1 Digital

USB Keyboard

Logitech MX500 (on PS/2 port)

Scientific Atlanta Webstar USB Modem

ATA 100 HD

I think that's everything.

----------

## taskara

 *InfinityX wrote:*   

> AMD Athlon Xp 2600+ 333Mhz FSB
> 
> 512mb DDR RAM PC 2700
> 
> Giga-Byte 7VA Motherboard (USB2 support needed)
> ...

 

k..

when you boot to the livecd, can you run lsmod and tell me the modules it has loaded?

ta

edit: also what network card are you using?

----------

## InfinityX

It's lucky I wrote them down before, I've been emerging openoffice for hours and don't want to stop now. The used ones were:

CDCEther

tulip

cloop

usbcore

----------

## taskara

hmmm ok..

you are using netgear network card then.. (tulip driver)

you don't know what your usb is, whether OHCI, EHCI or UHCI?

----------

## taskara

and what filesystem did you choose? reiser? xfs? ext3?

----------

## InfinityX

Info Center says I have UHCI-alt and a Via ehci_hcd, and the network card is some obscure brand and isn't being used (though I'm ordering a router in the coming weeks so my usb modem will go into that and I'll use the netcard for internet access).

Edit: using ext2 for boot, ext3 for root. Since this is a test install on an old hard drive I don't need support for any windows file systems etc

----------

## taskara

 *InfinityX wrote:*   

> Info Center says I have UHCI-alt and a Via ehci_hcd, and the network card is some obscure brand and isn't being used (though I'm ordering a router in the coming weeks so my usb modem will go into that and I'll use the netcard for internet access).
> 
> Edit: using ext2 for boot, ext3 for root. Since this is a test install on an old hard drive I don't need support for any windows file systems etc

 

k, thought that might be the case  :Smile: 

----------

## taskara

k.. building kernel now.

here's what you need to do:

```
mount /boot

cd /boot

wget http://www.smartclan.com/linux/bzImage

wget http://www.smartclan.com/linux/System.map

nano -w grub/grub.conf
```

and edit grub.conf to reflect the following:

```
default 0

timeout 5

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux 2.4.22

root (hd0,0)

kernel (hd0,0)/kernel-2.4.22 root=/dev/hda3 vga=788

initrd (hd0,0)/initrd-2.4.22

title=Gentoo Linux 2.4.24 test

root (hd0,0)

kernel (hd0,0)/bzImage root=/dev/hda3
```

save exit and reboot your system. boot to the new kernel withOUT the device plugged in first - to make sure your system boots to it fine.

then if all is well, reboot with the player plugged in.

let me know how you go!

good luck!  :Very Happy: 

P.S - I'll put the files up on the web as soon as they are done.

----------

## InfinityX

Ok everything's ready to go, now if this emerge ever finishes I'll be able to see if the new kernel works  :Confused: 

----------

## taskara

opps.. can you re-copy the files down..

sorry I forgot the files that were already there were from someone else who I built a kernel for lol.. it definately won't work on your machine!! lol

the new ones are there..

soz  :Confused: 

----------

## InfinityX

 :Laughing: , question though, when I downloaded System.map it renamed itself to System.map.1 so as not to overwrite the existing one, should I leave it or rename it?

----------

## taskara

yeah delete the old one and run 

```
cd /boot

mv System.map1 System.map
```

make sure you have the correct file: bzImage md5sum should be  *Quote:*   

> 79d1f186b47d5d990c107a398db29202

 

I'll wait to hear from you!

----------

## InfinityX

Ok here's what happened:

At boot there were loads of insmod failures, I'm fairly certain most were usb related (some were emu10k1 related but I fixed that in the old kernel). Once logged on everything bar sound and usb worked with the exception of my usb keyboard (but that would be core input support right?). My usb modem wasn't even found by ifconfig eth1.

For kicks I decided to see if it would freeze with the player plugged in, it didn't but that could just be because usb wasn't working.

 :Sad: 

----------

## taskara

what the hell?

you definately re-downloaded the bzImage, right?

I build in support for UHCI, EHCI usb drivers, as well as usb modems, ppp, usb keyboard and mouse and everything..

sounds like you're booting to the wrong kernel  :Confused:  ? :Question: ?

----------

## InfinityX

The md5sum was right, and my grub.conf is identical to the one you posted  :Confused: 

----------

## taskara

oh this doesn't make sense..

when you rebooted, you chose the new kernel, right?

----------

## InfinityX

I did honest. Could hotplug be interfering with it or something?

----------

## taskara

hmmm perhaps... but I doubt it.. I mean I compiled all the usb drivers in statically, but you say usb is not working.. how can that be? unless you actually have OHCI usb?

I'll re-compile the kernel with OHCI.

you are bound to get a few module errors... you didn't put an initrd in grub ddid you?

strange..

----------

## InfinityX

Nope, the grub.conf was practically copy and paste.

----------

## InfinityX

Hmm, I tried the 2.4.24 again and it worked! Not a clue why. Still loads of errors but my modems here and I can actually mount the mp3 player now (took me a while to figure out it was sda1).

Info center shows everything it did when using 2.4.22, this is so strange

----------

## taskara

lol something is loopy there!

I'll post the kernel config so u can import it and make any changes you like.

OH OH OH 

make sure /usr/src/linux is pointing to /usr/src/linux-2.4.24

here is the config:

www.smartclan.com/linux/infinityx.config

import it and maybe make any changes you see fit - go through it and see what I selected / left out, then save and -rebuild your kernel.

mount /boot and copy over the new bzImage

let me know how you go

----------

## InfinityX

Hmm, after further testing I can still make it freeze. It happens during a lot of hard drive activity on the player (like trying to copy 2.5Gb of music off it for example). It manages to copy about 120mb before everything freezes and the player winds down.

But I'll compile the new kernel as soon as I get back (Im leaving for college now).

----------

## taskara

 *InfinityX wrote:*   

> Hmm, after further testing I can still make it freeze. It happens during a lot of hard drive activity on the player (like trying to copy 2.5Gb of music off it for example). It manages to copy about 120mb before everything freezes and the player winds down.
> 
> But I'll compile the new kernel as soon as I get back (Im leaving for college now).

 

ok.. you m ay also wanna try a 2.6 kernel - I'd go with mm-sources. don't forget to emerge rsync  :Wink: 

----------

## InfinityX

Well my computer's down for a while due to a faulty motherboard fan which could have contributed to the freezes (it is the chip that controls the USB2 as well) so I'm getting a new fan today (hopefully) and I'll go from there.

----------

## taskara

 *InfinityX wrote:*   

> Well my computer's down for a while due to a faulty motherboard fan which could have contributed to the freezes (it is the chip that controls the USB2 as well) so I'm getting a new fan today (hopefully) and I'll go from there.

 

 :Sad:  ok.. well maybe try a 2.6 kernel when you're ready... and don't forget to load that config file I sent u the link for, so u can see what I included and what I left out..

----------

## InfinityX

Ok I'm back in business. I spent the last two days installing XP (eugh) and Gentoo on two separate hard drives and amazingly got Grub to boot both fine.

I used 2.4.24 with UHCI usb and SCSI support so hopefully everything will work off the bat. I'm in XP now doing some college work (I don't have KDE installed yet so I can't do it there). I'll emerge KDE tomorrow and test everything, then get back to you tomorrow to tell you how things went.

Thanks for all your help!

----------

## taskara

give kde the flick  :Wink:  use xfce4  :Smile: 

----------

## InfinityX

 *taskara wrote:*   

> give kde the flick  use xfce4 

 

Looks interesting, if a little Bluecurve. I may give it a spin.

----------

## taskara

 *InfinityX wrote:*   

>  *taskara wrote:*   give kde the flick  use xfce4  
> 
> Looks interesting, if a little Bluecurve. I may give it a spin.

 

check it out  :Smile: 

----------

## InfinityX

Tempting, is there a visible performance increase and can I run both that and KDE and switch between them?

----------

## taskara

 *InfinityX wrote:*   

> Tempting, is there a visible performance increase and can I run both that and KDE and switch between them?

 

yeah, it is much faster than kde, but does not have as much eye candy stuff. there is nothing on the desktop, just your big beautiful background, and yes of course you can have kde and xfce4 on the same machine - with linux you can have as many guis as you like!

I'd recommend compiling xfce4 first, get it up and running, then do kde after, cause kde takes like 40 hours to compile, and xfc4 around 40 minutes.

----------

## InfinityX

After trying to compile my own kernel I eventually gave up on trying to get my modem working and went back to genkernel, basically so I could get online quickly and try your .config. I went through it first and didn't notice anything missing and compiled it/set up grub etc.

Now all the boot errors are virtually non-existant but I can't get online. ifconfig -a just shows "lo", and dhcpcd doesn't work for either eth0 or eth1. Is there something I need to add in the kernel to get my modem working (it's a Scientific Atlanta Webstar Cable Modem, I don't know much more than that)?

I'm going to go and try my mp3 player now.

----------

## taskara

hmm.. I think all you should have to include is usb modem support, but I could be wrong.

did you leave it compiled into your kernel, change it to a module?

you might have to search quickly on the forum, I've never used a usb modem before.

what does dmesg reveal? does it detect your modem?

does /dev/modem exist? if so where does it point to?

glad the kernel boots properly now.. it should have before.. weird!

----------

## InfinityX

I should shake your hand, you've fixed the usb hard drive problem! I just copied 2.5Gb of music in 4 minutes 20 seconds with no problems whatsoever.

But back to the problem (should I start a new thread for this?) usb modem support was in the kernel and not a module. dmesg is a log right? So what in particular should I be looking for? I'll check if /dev/modem exists right now.

----------

## taskara

yeah prob start a new thread for the modem problem.

post dmesg if you like..

it should say "found usb device" and either "no driver" or "assignming modem driver etc"

now, with eth0, maybe I selected the wrong network card driver for you?

you can run 

```
lspci |grep net
```

like this:

```
bash-2.05b# lspci |grep net

02:01.0 Ethernet controller: Intel Corp. 82547GI Gigabit Ethernet Controller
```

----------

## InfinityX

Thanks for all your help man, it's really appreciated  :Very Happy: 

----------

## taskara

yeah nps.. hopefully you are on your way to a fully working system!  :Very Happy: 

good luck

----------

