On Sat, 17 Apr 2004, Bill Barnes wrote:

> Just "rebuilt my PC" - actually relocated guts to new case and power supply.
> 
> Inadvertently re-attached PATA drive to Raid ide mobo connector. For some 
> reason, although WinXP ran (sort of) drive shat itself, corrupted Grub and 
> apparently changed linux partition type (from ext3 - type 83).
> 
> Can see partitions OK, all appear to be correct size etc, but when I run 
> Fedora CD it does not see the ext3 partition. Knoppix 3.3 does see the 
> partition but advises "could not determine filesystem type, and none was 
> specified".
> 
> Can I use Fips or FDisk to "correct" the partition type? or is there any other 
> way to access the partition?

DO NOT USE ANYTHING THAT RESIZES THE PARTITONS.

Actually... before you go on with the rest of this, check the drive in the 
old system and note what disk geometry it has according to the bios and 
also according to /proc/ide/hdX/geometry. When placed in the new system it 
should be the same geometry. I've had different BIOS & settings affect the 
way it's detected. It may be necessary to set manually - at least to get 
GRUB loaded. From there grub can hand the kernel suitable settings...(eg 
"hdc=1050,32,64" which is cyl,heads,sectors from kernel source  
Documentation/ide.txt)

The fdisk program can quite easily change the partition type without 
affecting the content of the partition. However, it seems likely that 
there may be other corruption. Take the approach of copying first then 
fiddling.

If you have another disk that's large enough use dd to copy one disk to 
the other partitions & all. This would be best done overnight.

If not, use dd to copy the suspect partition to a file on another working 
partition (any linux readable filesystem).

Once you've backed up the mess, you can try your luck with e2fsck and 
hopefully that'll repair the partition. If it can't find a superblock 
you'll need to specify another one - find out where they might be with 
mke2fs -n /dev/hdXN which will simulate a format and tell you where the 
superblocks will go.

Finally... assuming you get something semi-sensible out of the repaired
partition backup the files you can find (and want) to somewhere else and
perhaps rerun mke2fs to start with a clean filesystem.

 -- 
---<GRiP>---
Electronic Hobbyist, Former Arcadia BBS nut, Occasional nudist, 
Linux Guru, SLUG Secretary, AUUG and Linux Australia member, Sydney 
Flashmobber, BMX rider, Walker, Raver & rave music lover, Big kid that 
refuses to grow up. I'd make a good family pet, take me home today!
        Do people actually read these things?


-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to