Author Topic: borked HD? try gentoo: HALP KERNEL PANIC D:  (Read 11593 times)

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
borked HD? try gentoo: HALP KERNEL PANIC D:
« on: April 26, 2011, 12:34:39 PM »
So, I won't go into details, but I smacked my laptop a bit, and now my hard drive is fucked. And by fucked I mean I caused a head crash, and damaged a portion of the drive platter :/ I'm currently running gentoo off of a flash drive because windows won't boot. I'm thinking of trying to partition off my drive to avoid the broken sectors but to do that I need to be able to reliably find which sectors are bad... Any idea how I can do that from here?

I've already tried transplanting my old hard drive in, but it won't fit, and the drive in here doesn't use the usual power connector (it just has the other connector, with none of the power pins at all).

Anyway, I don't know what tools I should be looking for to try to deal with this, I'm gonna do some googling, but I'm pretty lost here.
« Last Edit: May 02, 2011, 01:08:25 PM by Bobbias »
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #1 on: April 27, 2011, 02:47:31 PM »
The actual damage caused by a head crash is going to depend on the encoding of the hard drive.  There really isn't a good way to find out for sure outside of running an intense test like DFT (Drive Fitness Test), and even then there's no guarantee that the affected sections of the drive will actually appear as being sequential to the system itself.

One thing that you could try doing is grabbing a tool like ddrescue and trying to build an image file with that.  Make sure to specify a larger block size by default, otherwise it's going to go quite slowly.

There is also a very helpful article on data recovery on the Ubuntu wiki that I've found to be invaluable: https://help.ubuntu.com/community/DataRecovery.  That should at least allow you to recover some of your data.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #2 on: April 27, 2011, 03:50:52 PM »
Well the thing is, I have run DFT, and I have run SpinRite. It took over 3 days to go through the drive, there's a huge section that SpinRite has said it can't even find the sectors in.

I don't care as much about recovering data, what I'm trying to do is make it o that I can at least run windows (or even gentoo) on the drive in the undamaged sections until we can order a replacement.

The other thing is that I want to find a replacement drive. I tried transplanting my old drive from my old laptop, but it didn't fit because of the case screws being located on the sides of the case. The drive in this laptop has little metal flanges that lock it in place. It also doesn't use the power connectors for some reason (though a drive with the connectors will likely fit).

I'd like to order a new drive to throw in here but I have no idea how to find one that will actually fit.
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #3 on: April 27, 2011, 07:21:49 PM »
All SATA and PATA notebook hard drives within at least the last decade are standardized.  Some manufacturers include slot connectors and other such things to adapt it to a non-standard connector (this is most common on PATA drives, since the pins can be easily bent if you push it in the wrong way), but all drives will work.

Drives also have screws on the bottom and sides, and some drive containers use both.  All three of the Dells here use a tray with screws on the side, for instance.  To replace the hard drive, you'd unscrew the drive, remove it, remove the PATA adapter (the two SATA laptops don't use an adapter), mount the new drive to the tray, and slide it in.

If you can get decent pictures of the hard drive and bracket for both drives I can probably give you a better idea of what you'll have to do.  I've replaced lots of laptop hard drives and have seen just about every kind of mounting system from within the last decade.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #4 on: April 27, 2011, 09:48:31 PM »
Well I managed to get my old hard drive to fit after removing the 2 screws on the side (and realizing that it didn't use the pin connectors either). It fits now, but the case on the hard drive that is supposed to be in this laptop has a tab with a hole in it to lock it in place with a screw, while the one I have in here right now doesn't. The biggest issue is that the hard drive from my old laptop (the one in here now) is running a windows vista install, and isn't activated for this laptop, and has no drivers, so it can't even connect to my network. I could likely get some drivers and make them work if I really wanted to, I guess.

I've got my brother downloading an ISO of Win7 ultimate because I can install home premium from that anyway. Of course he doesn't seem to realize that downloading that ISO takes presidence over him playing his games. So for now I'm using my stripped down gentoo-on-a-flash-drive for internet access with links.... The internet sucks in text though :S

So, If I just buy any random drive, I should be able to make it fit in here? If that's the case, then I'll get one ordered ASAP.

EDIT: I noticed that there were holes in the top of the old drive, and removed the mounting bracket from the new one and sure enough, it fits.

Of course, this is really just a hold off until I can order a new drive, because this one is kinda small, and I can get a 640GB drive for like, $70 + shipping.
« Last Edit: April 27, 2011, 11:57:59 PM by Bobbias »
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #5 on: April 28, 2011, 01:31:38 AM »
Yep, you can buy any random drive.  If the laptop is older (read: PATA) you might be bumping against 120GB limitations, since those were very real for mobile chipsets in systems from 2004-2005, but if you're using SATA you should be able to throw any hard drive in there without a problem.

Also, you might have to do a little bit of tweaking with that Windows 7 ISO.  There's a file called ei.cfg (I think it's in I386) that stores the edition of the disc.  If you delete that (or use a tool that plucks it from the ISO for you) you'll be able to choose any edition during the installation process.  I think they might have done that for branding purposes, but it is a barrier that you have to keep in mind.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #6 on: April 28, 2011, 12:53:36 PM »
Really? I'm surprised, since I used a Vista Ultimate CD (official) to install vista tp upgrade it to Win7 at a friend's place (since he didnt have an actual Win7 full install disk) and It let me select which edition I wanted to install. I figured itd be the same with Win7.

And this is a fairly new laptop, it's the one I mentioned getting when my old one's fan died a couple months ago, so it's SATA. It came with a 320 GB drive. I'm gonna try and convince my parents to buy a 640 GB drive, because they're actually not that expensive.
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #7 on: April 28, 2011, 02:34:23 PM »
I think it might have something to do with the type of disc that it is.  OEM discs are edition "locked" for obvious reasons (though, again, it's easy to rectify that).  I have a feeling that retail discs are pretty open, though TechNet discs (which are classified as retail copies) don't allow cross-edition installation.

It's kind of weird.  I haven't really figured out the pattern just yet.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #8 on: April 28, 2011, 05:03:50 PM »
Been trying to install gentoo in the mean time. Reminds me of why I hated myself during the entire tie I was working on that last time.

I've got grub installed, and I managed to boot it up once and got into the login screen (and got stuck because I didnt know the root password). I went back into the flash drive, chrooted in, and used passwd, rebooted, and now it scrolls a bunch of text for a short period, and then the screen goes black and nothing happens :/
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #9 on: April 28, 2011, 06:12:30 PM »
The hard drive could just be getting worse.  I'm pretty sure that head crashes can lead to the platters becoming demagnitized.  Additionally, some hard drive controllers freeze when there is physical damage on the drive, so the drive could be effectively shutting itself off.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #10 on: April 28, 2011, 06:16:57 PM »
This is on the small hard drive from my old laptop, which is in perfect condition as far as I can tell.

EDIT: well after a kernel rebuild it seems to work... Odd.
« Last Edit: April 28, 2011, 06:28:47 PM by Bobbias »
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #11 on: April 28, 2011, 10:49:06 PM »
Ah, gotcha.

If that's the case, it sounds like it might have been trying to call an invalid framebuffer device or something.  Doing the kernel rebuild probably killed the bad module that it was loading.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #12 on: April 28, 2011, 11:12:59 PM »
Ok, so how the fuck do I set up wireless? I'm pretty much completely lost on what to do to set up my wireless stuff. Ive emerged wireless-tools and I'v built the module I need for my card into the kernel. I noticed a weird interface called sit0 show up when I did a iwconfig, but none of the interfaces were listed as having wireless extensions...

For reference, I have a broadcom BCM43225 card for wireless....
This is going in my sig. :)

BANNED FOR BAD PUNS X_x

Spectere

  • \m/ (-_-) \m/
  • Administrator
  • Hero Member
  • *****
  • Posts: 5716
  • printf("%s\n", "Hi!");
    • View Profile
    • spectere.net
Re: So my harddrive is fucked...
« Reply #13 on: April 29, 2011, 01:29:17 AM »
Wireless in Linux is, and will probably always be, bullshit.

If you're using anything better than WEP, you'll need to emerge wpa-supplicant and fudge around with the wpa-supplicant.conf file for it.  Thankfully, after that Gentoo takes care of most of the grunt work for you after you get that far.  I think all you have to do is throw a line in your /etc/conf.d/net file to enable wpa-supplicant.  You should be able to find more info about that in the wireless guide.
"This is a machine for making cows."

Bobbias

  • #1 Poster
  • Hero Member
  • *****
  • Posts: 7210
  • 404 Avatar not found.
    • View Profile
    • Magnetic Architect
Re: So my harddrive is fucked...
« Reply #14 on: April 29, 2011, 09:09:57 AM »
I'm gonna be connecting to an unsecured connection, because honestly, someone who wants to break in to a wireless connection can, and I doubt my wireless travels THAT far outside the house.... The router is in the basement.

Anyway, I have wireless-tools emerged, and I added a line to the /etc/conf.d/net file. I'd like to learn more about how all these things work together to actually become useful though, If I understood the underlieing linux structure here I'd probably have no trouble making things work :/
This is going in my sig. :)

BANNED FOR BAD PUNS X_x