LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-12-2010, 12:50 PM   #1
Randymanme
Member
 
Registered: Jul 2009
Location: Columbus, OH, USA
Distribution: Ubuntu 12.04; Knoppix 7
Posts: 134

Rep: Reputation: 16
Want Isadora back


I did have windoze xp professional on sda1, windoze data on sda2; sda 3 (I think) was as extended partition that included sda4-sda11, of the which sda6 was c. a 4.x GiB swap, there was another swap partition of less than 1 GiB. Sda5 (c. 23 GiB) held Linux Mint 9 Isadora ME and sda 11 held Ulltimate Edition 2.6. The other partitions had been shrunk to make more space for sda5 and sda11, which at various times held various operating systems. About 24 hours ago, I booted a PCLinuxOS Gnome 2010 live CD and deleted Ultimate Edition with Gparted with intentions of installing PCLinuxOS Gnome 2010 on sda11. But when I proceeded to install PCLinuxOS Gnome 2010, the wizard informed me that the hard drive was so corrupted that it could read it.

The wizard offered to wipe the entire disk and start afresh. I'd rather it not.

Let me clarify that I don't know what I'm doing. It took me many hours to figure out how to get a testdisk /list to give up data on System Rescue CD. Please assume that I know nothing. I would, however, like to restore things to how they were before (minus Ulltimate editon -- but things how they were with Ultimate Edition would be better than how they are now). I need some directions. Any and all help will be much appreciated.

I was thinking that perhaps if I tried to install some distro, that it's installer would recognize the operating systems already written to disk and let me install to free space (i.e. sda 11), but all (Linux Mint 8 and 9, Ubuntu 10.04, Super OS 9.11 PCLinuxOS Gnome 2010) say that there are no operating systems on the disk. However the disk utility packages on all of them (live CDs) do identify the presence of windoze as a bootable operating system, and all recognize the presence of sda2 as a windoze partition.

I presently have no working operating system. Since Isadora is my primary operating system, I'm posting here.

root@sysresccd /root % testdisk /list
TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
Please wait...
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63, sector size=512
Disk /dev/sr0 - 258 MB / 246 MiB - CHS 126011 1 1 (RO), sector size=2048

Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63
Partition Start End Size in sectors
Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
1 * HPFS - NTFS 0 1 1 6527 14 63 104857137 [Windoze]
Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
2 P HPFS - NTFS 6527 15 1 22901 65 36 263051496 [Data]
3 E extended 22943 2 1 30400 254 63 119812644
4 P Linux 22908 0 1 22942 254 63 562275

test_logical:
Partition sector doesn't have the endmark 0xAA55
Disk /dev/sr0 - 258 MB / 246 MiB - CHS 126011 1 1 (RO)
Partition Start End Size in sectors

Partition sector doesn't have the endmark 0xAA55
root@sysresccd /root %

I'm presently using a Helena live cd.

mint@mint ~ $ sudo fdisk -l
Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)

Disk /dev/sda: 250.1 GB, 250059350016 bytes
240 heads, 63 sectors/track, 32301 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Disk identifier: 0xffffffff

Device Boot Start End Blocks Id System
/dev/sda1 * 1 6935 52428568+ 7 HPFS/NTFS
/dev/sda2 6936 24333 131525748 7 HPFS/NTFS
/dev/sda3 24377 32302 59906322 5 Extended
/dev/sda4 24340 24377 281137+ 83 Linux

Partition table entries are not in disk order
mint@mint ~ $

What's this "Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)?" Is this fdisk offering to fix something? If so, what? What do I type to make the w(rite) selection?

Would that be "fdisk /dev/sda w" ?

Last edited by Randymanme; 07-12-2010 at 12:59 PM. Reason: another question
 
Old 07-12-2010, 01:17 PM   #2
Randymanme
Member
 
Registered: Jul 2009
Location: Columbus, OH, USA
Distribution: Ubuntu 12.04; Knoppix 7
Posts: 134

Original Poster
Rep: Reputation: 16
mint@mint ~ $ fdisk /dev/sda

Unable to open /dev/sda
mint@mint ~ $ fdisk /dev/sda5

Unable to open /dev/sda5
mint@mint ~ $
 
Old 07-12-2010, 02:29 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by Randymanme View Post
What's this "Warning: invalid flag 0x0000 of partition table 5 will be corrected by w(rite)?" Is this fdisk offering to fix something? If so, what? What do I type to make the w(rite) selection?

Would that be "fdisk /dev/sda w" ?
You can run "fdisk /dev/sda" and press "w". I do not see any way of supplying a command directly from the command line.

Last edited by David1357; 07-12-2010 at 02:32 PM.
 
Old 07-13-2010, 08:58 PM   #4
littlejoe5
Member
 
Registered: Aug 2006
Location: Arizona
Distribution: ubuntu dirivatives mostly Mate
Posts: 260

Rep: Reputation: 19
First you need to sort of find out where you are. If you can post, you must be on a computer that will let you download something. Try to get your hands on a cd copy of "puppy" or "gparted", or "Knoppix". Any of those should get you booted from the cd on your own machine, so that you can run gparted. First just examine the output of gparted. If gparted finds the partitons that you think it should, look a little closer and see if they hve information in them. In most distros you can tell, because within the each partition a portion is colored (usualy yellow). Also in the printed description under the graphical are two columns representing the size of the partiton, and the size that remains free.

You mentioned that you deleted the information in sda11 to install another operating system. How does sda11 look on gparted? Is it even listed? Or is it deleted? If it is deleted or empty, you can format it with gparted. For linux installs I prefer to format to ext3.

If you can get that far, you should be able to shut it down and install what ever distro you prefer on sda11, and (like you thought) that distro will find and identify the others, and write to the mbr so that you should be able to boot in most of them.

I should say that some of the messages that you are getting might indicate that your hard disk has some serious problems coming on. It might be wise if you get into your system again to back up all your data.
 
Old 07-14-2010, 02:36 PM   #5
Randymanme
Member
 
Registered: Jul 2009
Location: Columbus, OH, USA
Distribution: Ubuntu 12.04; Knoppix 7
Posts: 134

Original Poster
Rep: Reputation: 16
some progress

Presently, and ever since this mishap, my desire has been to recover and restore the windoze and Linux Mint partitions. And from what I've gathered about Testdisk and Photo Rec, that goal is within my reach – I just have to learn how to effectively use Testdisk. At this point, I haven't gone to Photo Rec.

Just for the record, Testdisk isn't installed on Isadora or Lucid live CDs, but I found it on Systemrescue CD and on PCLinuxOS KDE 2010 live CD. I found the latter easier to use.

Finally, I found out how to run Testdisk (somewhat), but it kept saying that the number of heads was incorrect. Using the geometry menu, I tried 255, 240, 128, 64,32, and 16. None worked. 255, 128, 64,32, and 16 all suggested 240. 240 suggested 255. Frustrated over having spent hours and hours searching the forums and googling only to end up at this impasse. I highlighted the w(rite) option for what Testdisk did find with the incorrect geometry.

As a result of that incorrect (w)rite and still using the PCLinuxOS KDE live CD, I opened Gparted and, viola!; Gparted no longer showed 250 GiBs of unallocated space. Now, it showed the windoze partition, the windoze data partition and 61 GiBs of unallocated space. I was disappointed over seeing nothing Linux other than some 7 GiB piece of some old partitiion, but was encouraged by some progress.

Next, I went to the disk utility and, now, it allowed me to format the 61 GiBs of unallocated space as ext4, and one extended partition (sda4 – 50.08 GiB) with two logical partitions (sda5 and 6 – 23.37 GiB and 22.76 GiB, respectively) and a swap (sda7 – 3.95 GiB). On sda6, I've installed Isadora so that I can have a base to work from while still learning about how to use Testdisk (Firefox Sync and Siphon Sync come in handy here).

Do I have to recover the windoze and Linux partitions simultaneously, or can I do windoze and then go back and do Linux? Could the CHS numbers for windoze be different than they might be for Linux?

From what I gather thus far, Testdisk and/or Photo Rec are fully capable of recovering and restoring my lost partitions even though I've done some reformatting. Which brings up a question: where is the “paranoid” selection on the Options Menu of Testdisk 6.11-1?


TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
*








Expert mode : No
Cylinder boundary : Yes
Allow partial last cylinder : Yes
Dump : No
[ Ok ]








************************** Done with changing options



According to a post in

* Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips How to: Recover data with testdisk!

The testdisk log tells me what the correct CHS is; but it's kind of complicated for me. Could one of my colleagues take at look and advice me? It's ten (OOo) pages long, so I'll just post a couple of pages here – hopefully they contain the needed info. As always, any and all help is deeply appreciated. Thank you.

Wed Jul 14 04:18:01 2010
Command line: TestDisk

TestDisk 6.11, Data Recovery Utility, April 2009
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org
OS: Linux, kernel 2.6.32-21-generic (#32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010)
Compiler: GCC 4.4 - Jun 23 2009 17:11:34
ext2fs lib: 1.41.11, ntfs lib: 10:0:0, reiserfs lib: none, ewf lib: none
/dev/sda: LBA, LBA48, DCO support
/dev/sda: size 488397168 sectors
/dev/sda: user_max 488397168 sectors
/dev/sda: dco 488397168 sectors
Warning: can't get size for Disk /dev/mapper/control - 0 B - CHS 1 1 1, sector size=512
Hard disk list
Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63, sector size=512 - ATA ST3250820AS

Partition table type (auto): Intel
/dev/sda: Device Configuration Overlay (DCO) present.
Disk /dev/sda - 250 GB / 232 GiB - ATA ST3250820AS
Partition table type: Intel

Analyse Disk /dev/sda - 250 GB / 232 GiB - CHS 30401 255 63
Geometry from i386 MBR: head=255 sector=63
NTFS at 0/1/1
heads/cylinder 240 (NTFS) != 255 (HD)
NTFS at 6527/15/1
heads/cylinder 240 (NTFS) != 255 (HD)
get_geometry_from_list_part_aux head=255 nbr=11
get_geometry_from_list_part_aux head=8 nbr=3
get_geometry_from_list_part_aux head=16 nbr=3
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=3
get_geometry_from_list_part_aux head=255 nbr=11
Current partition structure:
Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
1 * HPFS - NTFS 0 1 1 6527 14 63 104857137 [Windoze]
Warning: Incorrect number of heads/cylinder 240 (NTFS) != 255 (HD)
2 P HPFS - NTFS 6527 15 1 22901 65 29 263051489 [Data]
3 P Linux 22901 68 16 23862 220 38 15448064
4 E extended 23863 0 62 30400 254 63 105032909
5 L Linux 23863 1 1 26913 254 63 49014252
X extended 27430 0 1 30400 254 63 47729115
6 L Linux 27430 1 1 30400 254 63 47729052
X extended 26914 0 1 27429 254 63 8289540
7 L Linux Swap 26914 1 1 27429 254 63 8289477
Computes LBA from CHS for Disk /dev/sda - 250 GB / 232 GiB - CHS 30402 255 63
Allow partial last cylinder : Yes
search_vista_part: 1

search_part()
Disk /dev/sda - 250 GB / 232 GiB - CHS 30402 255 63
NTFS at 0/1/1
heads/cylinder 240 (NTFS) != 255 (HD)
filesystem size 104857137
sectors_per_cluster 8
mft_lcn 4369047
mftmirr_lcn 6841572
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 0 1 1 6527 14 63 104857137 [Windoze]
NTFS, 53 GB / 49 GiB
NTFS at 6527/15/1
heads/cylinder 240 (NTFS) != 255 (HD)
filesystem size 263051489
sectors_per_cluster 8
mft_lcn 786432
mftmirr_lcn 23970869
clusters_per_mft_record -10
clusters_per_index_record 1
HPFS - NTFS 6527 15 1 22901 65 29 263051489 [Data]
NTFS, 134 GB / 125 GiB

recover_EXT2: s_block_group_nr=0/58, s_mnt_count=8/23, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 1931008
recover_EXT2: part_size 15448064
Linux 22901 68 16 23862 220 38 15448064
EXT4 Large file Sparse superblock, 7909 MB / 7543 MiB

recover_EXT2: s_block_group_nr=0/186, s_mnt_count=2/33, s_blocks_per_group=32768, s_inodes_per_group=8192
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 6126781
recover_EXT2: part_size 49014248
Linux 23863 1 1 26913 254 59 49014248
EXT4 Large file Sparse superblock, 25 GB / 23 GiB
Linux Swap 26914 1 1 27429 254 42 8289456
SWAP2 version 1, 4244 MB / 4047 MiB

recover_EXT2: s_block_group_nr=0/182, s_mnt_count=9/23, s_blocks_per_group=32768, s_inodes_per_group=8160
recover_EXT2: s_blocksize=4096
recover_EXT2: s_blocks_count 5966131
recover_EXT2: part_size 47729048
Linux 27430 1 1 30400 254 59 47729048
EXT4 Large file Sparse superblock Recover, 24 GB / 22 GiB
get_geometry_from_list_part_aux head=255 nbr=7
get_geometry_from_list_part_aux head=8 nbr=3
get_geometry_from_list_part_aux head=16 nbr=3
get_geometry_from_list_part_aux head=32 nbr=1
get_geometry_from_list_part_aux head=64 nbr=1
get_geometry_from_list_part_aux head=128 nbr=1
get_geometry_from_list_part_aux head=240 nbr=3
get_geometry_from_list_part_aux head=255 nbr=7

Results
* HPFS - NTFS 0 1 1 6527 14 63 104857137 [Windoze]
NTFS, 53 GB / 49 GiB
P HPFS - NTFS 6527 15 1 22901 65 29 263051489 [Data]
NTFS, 134 GB / 125 GiB
P Linux 22901 68 16 23862 220 38 15448064
EXT4 Large file Sparse superblock, 7909 MB / 7543 MiB
L Linux 23863 1 1 26913 254 59 49014248
 
  


Reply



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
LXer: The Perfect Desktop - Linux Mint 9 (Isadora) LXer Syndicated Linux News 4 03-16-2011 05:33 AM
Minicom not working I connected linux machines back-to-back Prabhunath Linux - Networking 2 06-30-2010 04:39 AM
LXer: Linux Mint 9 (Isadora) Review LXer Syndicated Linux News 0 05-20-2010 12:00 AM
Isadora repository? Randymanme Linux Mint 1 05-11-2010 05:55 AM
Connecting 2 linux computer back to back with cross cable. michalng Linux - Networking 8 02-11-2009 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:00 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