Jump to content











Photo
- - - - -

Recovering linux partition


  • Please log in to reply
10 replies to this topic

#1 Jaynab

Jaynab
  • Members
  • 4 posts
  •  
    India

Posted 27 August 2010 - 03:28 PM

I use two operating systems, one is linux(red hat) & another is windows XP in my computer.Due to some reasons I wanted to format my computer.But unfortunately DVD drive of my computer couldn't function properly.By using pendrive I format my computer but I couldn't able to recover the
partition used by linux operating system.Please tell me about the solutions so that I can recover the partition.

#2 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 27 August 2010 - 03:55 PM

You can try testdisk to search for "lost" partitions.
Which tool did you use to format your drive?

#3 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 27 August 2010 - 03:58 PM

We need some more details.

WHAT was booted from the pendrive?
WHICH exact programs/choices did you use to "format the computer"?

(there is NO such thing as "format a computer" you can format a "drive" or a "partition" or you may have "partitioned" or "fdisked" the whole "disk")

HOW was the disk partitioned BEFORE you did the whatever you did? (please post the more details you remember)

HOW did the computer boot before?
Example:
"generic" MBR->XP bootsector->NTLDR->XP
and
"generic" MBR->XP bootsector->NTLDR->grub4dos->Linux Red Hat

OR:

"grub" MBR->grub->XP bootsector->NTLDR->XP
and
"grub" MBR->grub->Linux Red Hat

etc.

The more data you remember and can post, the more likely it is that the Linux install can be recovered successfully :), but don't expect miracles, it also depends on the exact steps you took, it may well have been wiped with no way back. :)

:)
Wonko

#4 Jaynab

Jaynab
  • Members
  • 4 posts
  •  
    India

Posted 27 August 2010 - 06:24 PM

Which tool did you use to format your drive?

I use windows XP installer.

#5 Jaynab

Jaynab
  • Members
  • 4 posts
  •  
    India

Posted 27 August 2010 - 06:49 PM

WHAT was booted from the pendrive?
WHICH exact programs/choices did you use to "format the computer"?

By using pendrive I copy the entire XP installer into D drive.From there I install new windows XP.

HOW did the computer boot before?
Example:
"generic" MBR->XP bootsector->NTLDR->XP
and
"generic" MBR->XP bootsector->NTLDR->grub4dos->Linux Red Hat

OR:

"grub" MBR->grub->XP bootsector->NTLDR->XP
and
"grub" MBR->grub->Linux Red Hat

The computer boot before by using the 2nd method.
i.e.
"grub" MBR->grub->XP bootsector->NTLDR->XP
and
"grub" MBR->grub->Linux Red Hat

#6 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 27 August 2010 - 11:59 PM

Let us know a few points very CLEARLY

1) Did u format one or more partition or repartition the whole disk structure?
2) Assuming that right now ur computer is booting WinXP(as u r willing to recover Linux partition),login as Admin to ur system, take a snapshot of Control Panel -> Administartive Tools -> Computer Management -> Disk Management ,upload the snapshot in http://imageshack.us & insert the direct link here as an image so that one can see the current disk geometry & status of ur drives.
3) What's the capacity of ur HDD is?

#7 Jaynab

Jaynab
  • Members
  • 4 posts
  •  
    India

Posted 28 August 2010 - 01:25 AM

Let us know a few points very CLEARLY

1) Did u format one or more partition or repartition the whole disk structure?

I format only one partition ,it is system partition C.

2) Assuming that right now ur computer is booting WinXP(as u r willing to recover Linux partition),login as Admin to ur system, take a snapshot of Control Panel -> Administartive Tools -> Computer Management -> Disk Management ,upload the snapshot in http://imageshack.us & insert the direct link here as an image so that one can see the current disk geometry & status of ur drives.

http://img832.images...cpartition.jpg/

3) What's the capacity of ur HDD is?

My HDD capacity is 80GB.

#8 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 28 August 2010 - 01:45 AM

To my knowledge, there's no need to run testdisk or any other data recovery tool.

If u want to reclaim the partition space, delete, then merge the partitions between drive E:\ & I:\ using Norton/PowerQuest Partition Magic or the like. This will give u back around 10GB of disk space.

If ur intention is to restore the old Linux system, u can do any1 of these two:
(1) Chainload Grub4DOS ny NTLDR by adding an entry like:
C:\grldr = "Linux"
:)

assuming grldr is located in C:\ drive.

(2) Or u can install GRUB on (hd0) & boot linux from there. The kernel parametres may vary widely depending on the Linux distro u r using.

BTW, AFAICR the HDD naming convention used by Linux & what appears from the size of the volumes, (hd0,7) is ur actual Linux installation where the next is swap partition.

#9 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 August 2010 - 08:47 AM

The kernel parametres may vary widely depending on the Linux distro u r using.


But if the Linux partition has not been touched, the grub4dos grldr should be able to find the menu.lst on (hd0,7) allright. :)

:)
Wonko

#10 Holmes.Sherlock

Holmes.Sherlock

    Gold Member

  • Team Reboot
  • 1444 posts
  • Location:Santa Barbara, California
  •  
    United States

Posted 28 August 2010 - 05:09 PM

But if the Linux partition has not been touched, the grub4dos grldr should be able to find the menu.lst on (hd0,7) allright. ;)

:cheers:
Wonko


Ref: Grub4DOS manual

Update 3(2006-12-23): By default, GRUB.EXE will locate its
config file in the following order:

(DOS file) .\menu.lst, the MENU.LST in the current dir.

(DOS file) \menu.lst, the MENU.LST in the root dir of
the current drive.
(GRUB file) /menu.lst, the MENU.LST in the root dir of
the boot device.

The default boot device is still (hd0,0).


Are u correct in saying that grldr will find the menu.lst located in Linux partition or did u want to mean that it should chainload the actual GRUB residing there?

#11 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 28 August 2010 - 06:02 PM

Are u correct in saying that grldr will find the menu.lst located in Linux partition or did u want to mean that it should chainload the actual GRUB residing there?


If it is in one of the default paths, yes. ;)
What you posted is about grub.exe and not necessarily has to do with grldr behaviour. (up to you to actually find if it does or not ;))

If you check the embedded menu.lst in grldr:
http://www.boot-land...?...c=6775&st=5
you will find that it contains THREE paths where it searches menu.lst:
  • ROOT
  • ROOT/boot/grub/
  • ROOT/grub/

Since the "common" command is
find --set-root --ignore-floppies --ignore-cd <PATH>/menu.lst

grldr will:
  • skip over floppy devices (fd0) and (fd1) (if present)
  • skip over CD/DVD devices (cd) (if present)
  • Try (hd0,0)
  • Try (hd0,1)
  • ...
  • Try (hd0,n)
  • Try (hd1,0)
  • ...
  • Try (hdm,n)
For each of the three paths, until there is no more hard disk devices m mapped by BIOS and no more partitions n in them.

If for any reason the Linux GRUB menu.lst is not in one of the default paths, or it is named differently one can aways use command line and manually issue a
config-file <PATH>/<name_of_menu.lst>
directive...
Using [TAB] expansion, or ls it's not that difficult to find it, but presumably one knows where his menu.kst is, since it is not a new install, it is something OP used before...;)

;)
Wonko




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users