PDA

View Full Version : Repairing hard-drive partition with knoppix



egancs
11-17-2003, 09:25 PM
(Background -- read on if you like)
Resulting from trying to re-partition a win 98 hard-drive, with PowerQuest -- to install a copy of Red Hat, the proccess screwed up and i was left with 'no' hard-drive -- lovely, NOT. PQ could offer no reasonable explaination, so it seemed i was stuck with trying to sort it myself --luckily it wasn't a pc that i desperatly needed to work; hense why risking a potentially hazardus linux install -- I didn't even get that far tho. Then i discovered Knoppix...

I had been trying to run a linux OS, but i've now got the impression that i might be able to fix my hard drive too! When i ran Knoppix from disk it was sweet; it picked up all my hardware, and even the TWO hard-disk partitions (previously one before the mishap) -- very nice. However i still like the idea of running a win 98 system, so would like to distroy the new partition so the hd is just a single FAT32 as it was before, i.e so i can install win98, then Knoppix afterwards.

prob --v

I'm familiar with the DOS shell but not with BASH. I've tried looking at the KDE, but it's all a bit foriegn at the mo. Could someone advise me how i can reformat or destroy this new partition (It is a linux file format, which is why i am thinking my win system doesn't 'see' it and won't boot, i.e it is before the main partition on the disk; i'll check how to install Knoppix later). Simple would be nice, thanks.

rickenbacherus
11-18-2003, 12:35 AM
hense why risking a potentially hazardus linux install

Sounds like PQ is the hazaardous material in this situation. :)


I had been trying to run a linux OS, but i've now got the impression that i might be able to fix my hard drive too! When i ran Knoppix from disk it was sweet; it picked up all my hardware, and even the TWO hard-disk partitions (previously one before the mishap) -- very nice. However i still like the idea of running a win 98 system, so would like to distroy the new partition so the hd is just a single FAT32 as it was before, i.e so i can install win98, then Knoppix afterwards.

prob --v

I'm familiar with the DOS shell but not with BASH. I've tried looking at the KDE, but it's all a bit foriegn at the mo. Could someone advise me how i can reformat or destroy this new partition (It is a linux file format, which is why i am thinking my win system doesn't 'see' it and won't boot, i.e it is before the main partition on the disk; i'll check how to install Knoppix later). Simple would be nice, thanks.

I would do this:

dd if=/dev/zero of=/dev/hd? (replace the ? with your drive letter- hda I presume)

That will write zeroes to the entire hard drive. You don't have to do that but it makes my life alot easier if I'm using a drive that has had different file systems on it. Then I would probably make a partition for win98 w/ DOS fdisk, install wimpdoze, boot Knoppix, run cfdisk (or qtparted if you like a GUI), make some Linux partitions and install. Oh and leave that PQ nonsense alone already! :)

Dave_Bechtel
11-18-2003, 01:15 AM
--Dear God man, you're telling the man to flame his entire hard drive when he could possibly be recovering his win98 partition!! Also, if you zero the entire /dev/hda you will have to do fdisk /mbr to fix it.

--Egancs, when you install Linux it has to be AFTER windows on the same HD. You should be able to mount your win98 partition read-only with Knoppix right now and back up anything you need to.

--This is how my rig looks from win98 fdisk:


Display Partition Information

Current fixed disk drive: 1

Partition Status Type Volume Label Mbytes System Usage
C: 1 PRI DOS MX-P901-C 1600 FAT32 13%
2 A Non-DOS 16 %
3 Non-DOS 8 %
4 EXT DOS 10985 87%

Total disk space is 12608 Mbytes (1 Mbyte = 1048576 bytes)


The Extended DOS Partition contains Logical DOS Drives.
Do you want to display the logical drive information (Y/N)......?[Y]
=======
Display Logical DOS Drive Information

Drv Volume Label Mbytes System Usage
D: MX-P901-D 9005 FAT32 12%
E: MX-P901-E 1200 FAT32 2%


--From Linux:
/dev/hda1 is Win98
- hda2 and 3 are boot partitions (Linux install /boot ((lilo)) and Knoppix live-cd boot image) - Note the active flag is on Lilo so I can dual-boot.
- hda4 is Extended the rest of the disk
-- hda5 is D:

--For some reason Win98 doesn't see the other Linux partitions, but then again it doesn't have to.



hense why risking a potentially hazardus linux install

Sounds like PQ is the hazaardous material in this situation. :)


I had been trying to run a linux OS, but i've now got the impression that i might be able to fix my hard drive too! When i ran Knoppix from disk it was sweet; it picked up all my hardware, and even the TWO hard-disk partitions (previously one before the mishap) -- very nice. However i still like the idea of running a win 98 system, so would like to distroy the new partition so the hd is just a single FAT32 as it was before, i.e so i can install win98, then Knoppix afterwards.

prob --v

I'm familiar with the DOS shell but not with BASH. I've tried looking at the KDE, but it's all a bit foriegn at the mo. Could someone advise me how i can reformat or destroy this new partition (It is a linux file format, which is why i am thinking my win system doesn't 'see' it and won't boot, i.e it is before the main partition on the disk; i'll check how to install Knoppix later). Simple would be nice, thanks.

I would do this:

dd if=/dev/zero of=/dev/hd? (replace the ? with your drive letter- hda I presume)

That will write zeroes to the entire hard drive. You don't have to do that but it makes my life alot easier if I'm using a drive that has had different file systems on it. Then I would probably make a partition for win98 w/ DOS fdisk, install wimpdoze, boot Knoppix, run cfdisk (or qtparted if you like a GUI), make some Linux partitions and install. Oh and leave that PQ nonsense alone already! :)

rickenbacherus
11-18-2003, 01:50 AM
--Dear God man, you're telling the man to flame his entire hard drive when he could possibly be recovering his win98 partition!! Also, if you zero the entire /dev/hda you will have to do fdisk /mbr to fix it.

Well if you read the post again...


so would like to distroy the new partition so the hd is just a single FAT32 as it was before, i.e so i can install win98, then Knoppix afterwards.

I gave him the means to do exactly that. :) Also- as he has said that he is proficient w/ DOS I did not feel it necessary to re-educate him.

egancs
11-18-2003, 08:49 PM
ok . when i've some time i'll check this over. Just to make it clear ;) i had to use PQ since FIPS didn't work (and i was too lazy to find a reputable partitian maker to run from an active partition in $$$win 98). i've used PQ succesfuly before, however it screwed up while preparing the hdd for the boot loader, so I'm a bit more warey of letting anything mess with the boot sectors (i.e the part of the hhd that is accessable during boot-up, and the required location for the loader -- to spare the details:).

I've heard of similar stories when imaging to a hard-disk also!

here's the real prob tho!...

i cannot access ANY of the hard drive with DOS -- they doesn't 'exist' under MS (ie. command.com). only knoppix has picked them up so far (even my PQ rescue disks were useless! be warned!!).

The first partition is a linux partiti0n (with boot sectors on it), the SECOND is the 'C:\' partition which was moved over. I need to reformat the first partition (vipe it :) to a MS compatible file system (FAT32 preferably), and even better, then merge the two partitions. Hense returning to a single; FAT32, MS frienly (...puke...) partition. i.e. DESTROY!! (...the partition -- MS has uses still:)

Since Knoppix can run from a CD-ROM, and i have a second CD drive, i don't even need a program that can change the partitions whilst running from an active one. I know NOTHING except 'ls' in BASH at the mo. I just thought linux might have a simple equivellent to (DOS) 'format'/'fdsk', or a good free/GNU disk management tool which i could use.

danke, mucho gracias

Dave_Bechtel
11-19-2003, 01:18 AM
--Here's something to try...

From win98 bootdisk:
' fdisk/mbr '

--Then boot ' knoppix 2 ' and at the root prompt: ' activate /dev/hda 2 && reboot '. See if Win98 comes up. If it doesn't, you have nothing to lose, so do this from knoppix:

' fdisk /dev/hda '
' d ' == Del partition
' 2 ' == 2nd
' d ' == Del remaining partition; (1) is assumed
' v ' == Verify
' w ' == Write and exit

--Then reboot to Win98 bootdisk, and fdisk + install from there.

--Once you have it running, BACK IT UP... Then try reinstalling knoppix; or just run the "poor man's install" and you won't have to worry about repartitioning.

--If you reinstall knoppix, leave win98 at the start of the disk and make the 2300Meg linux partition in an Extended (i.e. root will be hda5) and don't forget to make a swap partition.

--At the end of my post there should be a "www" icon; click on it and you'll go to my linuxtips page. I've been told it's a good intro to the command line.


ok . when i've some time i'll check this over. Just to make it clear ;) i had to use PQ since FIPS didn't work (and i was too lazy to find a reputable partitian maker to run from an active partition in $$$win 98). i've used PQ succesfuly before, however it screwed up while preparing the hdd for the boot loader, so I'm a bit more warey of letting anything mess with the boot sectors (i.e the part of the hhd that is accessable during boot-up, and the required location for the loader -- to spare the details:).

I've heard of similar stories when imaging to a hard-disk also!

here's the real prob tho!...

i cannot access ANY of the hard drive with DOS -- they doesn't 'exist' under MS (ie. command.com). only knoppix has picked them up so far (even my PQ rescue disks were useless! be warned!!).

The first partition is a linux partiti0n (with boot sectors on it), the SECOND is the 'C:\' partition which was moved over. I need to reformat the first partition (vipe it :) to a MS compatible file system (FAT32 preferably), and even better, then merge the two partitions. Hense returning to a single; FAT32, MS frienly (...puke...) partition. i.e. DESTROY!! (...the partition -- MS has uses still:)

Since Knoppix can run from a CD-ROM, and i have a second CD drive, i don't even need a program that can change the partitions whilst running from an active one. I know NOTHING except 'ls' in BASH at the mo. I just thought linux might have a simple equivellent to (DOS) 'format'/'fdsk', or a good free/GNU disk management tool which i could use.

danke, mucho gracias