LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-02-2006, 10:33 PM   #1
dejavu_01
Member
 
Registered: May 2004
Location: Bangkok, Thailand
Distribution: Simply Mepis 8.0 32bit
Posts: 89

Rep: Reputation: 15
How to rescue a ruined superblock harddisk?


hello

Firstly, I'll give a sequence that lead to desaster

1. Installed X distro which came with grub
2. Changed my mind that I want slack, in order to do so I then try to remove grub. Unfortunatly due to my carelessness, I issued a wrong command dd if=/dev/zero of=/dev/hda bs=512 which subsequencly wipe out ,what I beleave to be ,the primary partition or the boot sector (I'm not sure). But that is alright since I'm going to install Slack anyway.
3. Managed to installed slackware10.2 from CD from start to finish, with error free. Before the installation, I delete and recreate all the needed partitions with fdisk. That went by ok as well.
4. On first reboot, now here's the problem, my comp can't find the harddisk.
5. Booting from Slack CD1 bypassing a command to boot from harddisk result in a kernel spit out half a page of error messages related to disk error and freezed.

I hope the damage is not permanent, if there's a recovery procedury, I would be so glad to know. Thanks
 
Old 05-02-2006, 10:46 PM   #2
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
You could troubleshoot this problem for awhile, but in my opinion I would take the fast approach: fdisk and re-install
You have nothing to loose, since you already "flattened" the root partition. On the other hand if you have data in your home directory you may want to boot with a "live CD" get your data and then start all over.

Hope this helps.
 
Old 05-02-2006, 11:15 PM   #3
dejavu_01
Member
 
Registered: May 2004
Location: Bangkok, Thailand
Distribution: Simply Mepis 8.0 32bit
Posts: 89

Original Poster
Rep: Reputation: 15
But before I installed Slack, I've fdisked to delete everything and recreating all the new partitions already. Or is it possible I missed something?
 
Old 05-02-2006, 11:22 PM   #4
ralvez
Member
 
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
Well ... to me you have a problem with the boot loader. But unless you are familiar with Slack and linux it is faster to re-install.
If you feel courageous you can troubleshoot and re-install the boot loader.
BTW, I assume that when you say
Quote:
can't find the harddisk
you mean that the system cannot find the boot sector and therefore it fails to boot. Or you mean that your computer complaints that there is not HDD ?
 
Old 05-02-2006, 11:55 PM   #5
dejavu_01
Member
 
Registered: May 2004
Location: Bangkok, Thailand
Distribution: Simply Mepis 8.0 32bit
Posts: 89

Original Poster
Rep: Reputation: 15
it complains that there is no bootable CDrom in the drive - this, I suspect that the system had skipped the attempt from booting from hdd to looked for CDrom booting instead, as specified by the booting sequence in the BIOS. Therefore I beleave the system can't "see" the harddisk.
 
Old 05-03-2006, 12:08 AM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,286

Rep: Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165Reputation: 4165
Get an up-to-date liveCD - Knoppix should do.
Redo the fdisk from there to ensure it writes the partition table and disk signature bytes correctly. Used to be a problem, but I used a Knoppix 3.9 CD to succesfully rebuilt a disk I deliberately trashed like you did (as a test a couple of months ago).
 
Old 05-03-2006, 12:19 AM   #7
drumz
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Slackware
Posts: 922

Rep: Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710Reputation: 710
Just an idea: maybe you installed lilo to the root partition. In your case it needs to be installed to the MBR. In lilo.conf you should have
Code:
boot = /dev/hda
or whatever your harddisk is. You can fix this by booting off your slackware CD, and then passing some parameters to lilo when you run it (forgot what they are).
 
Old 05-03-2006, 09:34 PM   #8
dejavu_01
Member
 
Registered: May 2004
Location: Bangkok, Thailand
Distribution: Simply Mepis 8.0 32bit
Posts: 89

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by drumz
Just an idea: maybe you installed lilo to the root partition. In your case it needs to be installed to the MBR. In lilo.conf you should have
Code:
boot = /dev/hda
or whatever your harddisk is. You can fix this by booting off your slackware CD, and then passing some parameters to lilo when you run it (forgot what they are).
Yeah, you're right, it was the misconfigured LILO. I booted up with Slack CD1, chrooted into the drive to make the change. No need for reinstall. Despite having experience with GNU/linux for some time, I tend to freak out with simple problem like this, that I can't help posting. Now it is cured.
 
  


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
Need to (re)install GRUB: fedora c4 rescue cd (and GRUB) unable to see the harddisk whencat Fedora 4 03-05-2006 03:01 PM
Fedora Ruined My PC!!!!!!!!!!!! wasabi Fedora 72 01-18-2006 03:44 PM
Need help please Firestarter might have ruined my mbr 1702fp Linux - Security 7 09-13-2005 08:07 PM
Urgent!! How to rescue harddisk jerrytw Linux - General 8 01-06-2005 04:10 PM
Low Harddisk space. Can I just transfer the entire Linux to a bigger harddisk? davidas Linux - Newbie 12 04-13-2004 03:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:33 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration