PDA

View Full Version : Repair partition with Knoppix?



Howitzer17
06-18-2005, 08:32 PM
I am using Knoppix to try to recover my data on my PC that has Windows 98SE installed (but will not boot into Windows). I have been able to boot completely into Knoppix numerous times using the CD, and I have been able to recover almost all of the data I want (copied it to another drive).

I have a bit more data to recover, but now the machine seems to "hang" while booting (though sometimes it boots normally in Knoppix.)... what would cause it to hang? It appears that the present drive has a bad partition (which I plan to fdisk when I get all of the data I need). Can knoppix repair the main hard drive partition?

when it is running the following boot/hardware detection command, it hangs (freezes):

"Scanning for Harddisk partitions and creating /etc/fstab..."

any ideas what I can do?

Howie

UnderScore
06-18-2005, 09:05 PM
boot knoppix with the cheatcode:
knoppix nofstab

It will not generate a fstab. This means that knoppix will not automatically mount the C: drive/hda1 partition when you click the icon on the desktop. This means that you will have to manually mount it.

I boot with Knoppix 3.9 with the cheat code:
knoppix nofstab
I open a konsole command window. I make sure that hda1 folder in /mnt exists:
ls /mnt
If it does not, I make it:
sudo mkdir /mnt/hda1
I mount the hda1 (C: drive)
sudo mount -t vfat -o ro,users /dev/hda1 /mnt/hda1

I assume that hdb1 is your D: drive. I make sure that hdb1 folder in /mnt exists:
ls /mnt
If it does not, I make it:
sudo mkdir /mnt/hdb1
I mount the hdb1 (D: drive)
sudo mount -t vfat -o users /dev/hdb1 /mnt/hdb1

Next I open up the GUI file manager.
sudo konqueror
Once that comes up, in the location bar, I type:
/mnt/hda1/
Now I see the hda1 (C: drive) contents & I navigate to the data I want to save. Then hit the keys CTRL-T to open a new tabbed window. Then in that location bar type:
/mnt/hdb1/
Now I see the D: drive & just like in windows explorer, select the file & folders you want to copy, CTRL-C or right-click & copy them. Use the mouse & move over to the other tab, then CTRL-V or right-click paste to initiate the transfer.

Howitzer17
06-18-2005, 11:43 PM
I followed your instructions, up to when I type in the command "sudo mount -t vfat -o ro,users /dev/hda1 /mnt/hda1", I get the following:

"mount: wrong fs type, bad option, bad superblock on /dev/hda1,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)"

????

Howie

jjmac
06-19-2005, 10:50 AM
>>
"mount: wrong fs type, bad option, bad superblock on /dev/hda1,
>>

Underscore ... it just means it isn't a vfat fs.


>>
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)"
>>

What kind of disk is it, ide, if so then i wouldn't think so. You haven't revealed the kind of disk your using ....



You need to use the fs type that is being used by your Windows 98SE. As i'm not familiar with that windows i can't say much more there. Is it a "ntfs" file-system. If so use that as the parameter for the "-t" switch.

If it is a "ntfs" fs, don't try writing to it as write support isn't good in Linux for a ntfs fs. Its' fault though.



jm

Harry Kuhman
06-19-2005, 01:11 PM
>>
"mount: wrong fs type, bad option, bad superblock on /dev/hda1,
>>

Underscore ... it just means it isn't a vfat fs.

Actually, I saw a bad superblock message a week ago and asked about it also (http://www.knoppix.net/forum/viewtopic.php?p=86126) (no response). On my case it was an NTFS partition, but I have never received that message in the past opening NTFS partitions. The disk had become corrupted and Knoppix couldn't open it to read from it. XP was much worse, it just kept flashing something on the screen too fast to read and then rebooting the entire computer (cycle repeats). In my case it certainly didn't just mean it isn't a vfat.

I ended up having to use other tools to repair the partition, although Knoppix was a help in that it allowed me to at least back up my other partition on that computer.

Howitzer17
06-19-2005, 04:20 PM
it's a IDE drive... I believe it is also vfat... isn't ntfs for Windows XP?

gnukish
06-19-2005, 09:40 PM
Try burning knoppix image to another cd. Then use it and delete a portion of the hdd which isnt too important, like delete games partition(which can be installed later in windows98 with the game cds). Create a ext2/3 partition and a swap that is double ur ram plus 100mb.

Now type

knx2hd

This should install knoppix to ur hd. Your problem of running it from cd can be solved.
You arent gonna mess up with the default config of knoppix until u reset the permissions of hd to read/write mode.

UnderScore
06-20-2005, 12:05 AM
Try burning knoppix image to another cd. Then use it and delete a portion of the hdd which isnt too important, like delete games partition(which can be installed later in windows98 with the game cds). Create a ext2/3 partition and a swap that is double ur ram plus 100mb.

Now type

knx2hd

This should install knoppix to ur hd. Your problem of running it from cd can be solved.
You arent gonna mess up with the default config of knoppix until u reset the permissions of hd to read/write mode.I have no idea what you think is going on in this thread but it appears you are confused. Perhaps I am wrong, but the user "Howitzer17" is trying to recover data from a Windows 98 machine. Your suggestion that he installs knoppix to the HD is not right.

gnukish
06-20-2005, 06:18 AM
I did not suggest him to install linux to the entire space available. He can make a hd install in a small partition and then recover the rest thereby not losing time (running from the cd will be slower than hd) and also backing up the needed data.

@Underscore: Perhaps my last post wasnt clear. Correct this time and tell me if Iam wrong and how.

Regards

Harry Kuhman
06-20-2005, 06:33 AM
I did not suggest him to install linux to the entire space available. He can make a hd install in a small partition and then recover the rest thereby not losing time (running from the cd will be slower than hd) and also backing up the needed data.

@Underscore: Perhaps my last post wasnt clear. Correct this time and tell me if Iam wrong and how.

Regards
But he didn't even want to install to hard disk, and Knoppix far from a good choice if a Linux HD install is desired. As to the speed, there is only a CD speed hit in Knoppix in loading software. But you can boot knoppix and have all the tools you need to transfer files already running when the boot finishes. File transfers will be just as fast at that point as if Knoppix was "installed" and will have the added benefit of actually working without fooling with things like "why did my network suddenly stop working after I installed Knoppix to hard disk?" So any claims of speed differences are really meaningless, and it would take far longer to install and troubleshoot a hard disk install than to just boot Knoppix from CD once or twice. We generally don't try to teach people bad habits, particularly when they don't even indicate that they want to learn the bad habits. This poor guy is or was having Win98 problems, the last thing he needs at this point is to be repartitioning his disk to make space of some dubious "install" of Knoppix to his hard disk.

UnderScore
06-20-2005, 07:20 AM
Think about it. He has a hard drive with valuable data that either has a partially corrupted filesystem or the underlying physical disk itself is slowly dying. The absolute last thing to do to a dying hard drive is to write data to it & then expect to read that data off of it, which is really what you are suggesting. The important steps are to attempt to repair the filesystem and copy the data off.

Windows, Linux, Unix, Mainframe, Mac OS, it doesn't matter. The loading of OS is only as slow as the media on which the binaries are on. The operational speed of an OS is dependent on the system's I/O subsystems: CPU, Disk, Network. If a OS is on tape, then loading the binaries into the system's RAM is going to take longer than if the OS is on a CD. Knoppix is on CD and the loading of the binaries into the system's RAM will take longer than if they were on HD. If a OS is loaded from CD, or tape, or from HD and the binaries are loaded into RAM, then the speed of disk to disk file copies or disk to network file copies will not be impacted. And even if it were impacted, the speed difference in the end would probably be both small & irrelavant since the whole point of copying files is to recover them, not to get the quickest data throughput.

To howitzer,
If Knoppix (Linux) is unable to mount the drive then you may need a third party tool like Norton Utilities Disk Doctor to diagnose the disk & see if revovery is possible. Please see if someone you know has it.

jjmac
06-20-2005, 01:13 PM
Harry Kuhman
>>

jjmac wrote:
>>>>>>
"mount: wrong fs type, bad option, bad superblock on /dev/hda1,
>>>>>>

Underscore ... it just means it isn't a vfat fs.
>>>>

Actually, I saw a bad superblock message a week ago and asked about it also (no response). On my case it was an NTFS partition, but I have never received that message in the past opening NTFS partitions. The disk had become corrupted and Knoppix couldn't open it to read from it. XP was much worse, it just kept flashing something on the screen too fast to read and then rebooting the entire computer (cycle repeats). In my case it certainly didn't just mean it isn't a vfat.

I ended up having to use other tools to repair the partition, although Knoppix was a help in that it allowed me to at least back up my other partition on that computer.
>>

Yes, that sounds bad. I would think that the message isn't exclusive to attempting to use the "mount" command with the wrong fs associated with the "-t" switch.


>>
In my case it certainly didn't just mean it isn't a vfat.
>>

No, it would certainly seem so ...

But, the combined message is quite common to mount, when a mount is attemped when the wrong fs is given to the "-t" switch.

Though i doubt that the super block message would be exclusive to that case. An even more worrying if it was the only message.

If it is the correct fs though, then one can expect that something more sinister is going on.


By the tone of the original post it sounded like some partition corruption to me rather than the disk mechanics. No noises or other signs were reported. But then a bad disk will, at times, start with small errors which tend to grow. So it definitly needs to be kept in mind.

Especially strange sounds, like clicks or whines.


>>
Think about it. He has a hard drive with valuable data that either has a partially corrupted filesystem or the underlying physical disk itself is slowly dying. The absolute last thing to do to a dying hard drive is to write data to it & then expect to read that data off of it, which is really what you are suggesting. The important steps are to attempt to repair the filesystem and copy the data off.
>>

Yes ..... very much so. Writing to a suspected bad disk is not a good idea...

What do the logs have to say about it. Are there any "intr_dma" errors recorded in syslog or kern.log (interupt errors). Is the drive making sounds ????

I suppose a Win98 would be a "vfat" system, but i'm not sure there.

Would it be dangerous to use "dd" in this case.

I suppose any attemp to read/write could just be making things slowly worse, so your diagnostic tool suggestion is probably the better course.

One bad disk i had a while back (my own fault), as long as i was only doing short read/writes to it ... all was Ok. But on a longish cross copy using "tar" ... then it started to fail with "interrupt" errors "seek ready", "seek complete", "fail with exit code" etc, type of thing.


Harry Kuhman
>>
I ended up having to use other tools to repair the partition, although Knoppix was a help in that it allowed me to at least back up my other partition on that computer.
>>

What tools did you use, do you think they would be of help to the OP ?

Did you manage to trace the cause. ?


jm



jm

Harry Kuhman
06-20-2005, 06:10 PM
What tools did you use, do you think they would be of help to the OP ?

Did you manage to trace the cause. ?
I'm not quite sure who "the OP" is. I ended up using several non-free comercial tools. I expect if Howitzer17 has them he will have used them by now. In my case the problem seems to hve been a spot in the beginning of the notebook drive that had gone "soft", not corrupted data, but data that was hard to read. The sector or sectors have now been recovered and rewritten and the system now seems fine. I have no reason to believe this is the same thing that has happened to Howitzer17.

jjmac
06-21-2005, 01:14 PM
Yes, i was meaning Howitzer17 ...

>>
soft
>>

.... Howitzer17 hadn't mentioned anythin really, concerning associated things. As in your case, your screen started to do strnge things.

By associated things, aside from your own .. i was thinking of sounds, like clicks or whines... a lack of power can cause a drive to go strange as well ... so it is hard to say .

Your case does sound curious though. It would have been silent too, i would expect. With only the screen and reboots giving the hint that something serious was going on.

The progressive nature of drive fails is also worrysome. With just ordinary attempts to retrieve data.


>>
The sector or sectors have now been recovered and rewritten and the system now seems fine.
>>

so, you didn't lose the drive :), good.


jm

rwcitek
06-22-2005, 08:57 AM
@Underscore: Perhaps my last post wasnt clear. Correct this time and tell me if Iam wrong and how. Your post was very clear, just inappropriate for this situation. The drive has a bad block, at best, or is just about to crash, at worst. Therefore, installing Knoppix to the HD is a Bad Idea(TM).

IMHO, the best approach would be to either to mount the drive and copy the data off, which is what Underscore recomended. Or use dd_rescue to image the drive (type 'dd_rescue --help' or use google for more info).

Regards,
- Robert
http://www.cwelug.org/