LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Reply
  Search this Thread
Old 11-21-2010, 09:36 PM   #1
pulkittomar
LQ Newbie
 
Registered: Nov 2010
Posts: 5

Rep: Reputation: 0
Lost partition on ubuntu and vista dual boot on vista reinstall, Testdisk no succes


Hi,

I have a Dell laptop with Ubuntu and Vista on it. Recently, I reinstalled Vista and lost a partition. I tried using Testdisk and GPart but no success.

After using Testdisk I have two problems:
1: two unwelcomed partitions D: and E: show in Windows,
2: Still the sda4 ntfs partition(the one lost) shows as unformatted space on Ubuntu and vista


I have 5 partitions
sda1: Dell utitility
sda2: WindowsVista(boot)
sda4: Another ntfs windows partition [Data]/** mounted on Ubuntu used as file storage*/
sda3: Linux partition -
sda5: Linux swap - Extended

Recently I reinstalled Vista and as a result my sda4 partition showed as unformatted partition/ntfs error in both windows vista and ubuntu

In Testdisk, on running deeper search, Testdisk wouldn't allow me to flag the swap partition as extended. As such my first try:-
/** Erroneous Partition map*/
Flags Partition
P sda1
* sda2
P sda3
L sda4
L sda5
resulted in partitions sda4+sda5 showing as extended with all the names garbled, as in sda4 became sda6 and so on. I could boot ubuntu after reinstalling grub2 but Vista would boot.

I tried testdisk again with following flags
Flags Partition
P sda1
* sda2
L sda3
P sda4
L sda5

I installed grub2 again and now I can boot into both windows and Ubuntu. Also, my partitions in Disk utility looks nearly the same with linux and swap being extended/Logical.

However, now my vista is showing me two new drives in My Computer
D:\ \** O bytes drive, on clicking I am prompted to format it*\
E:\ \** 80 MB drive with some files. Most probably Dell utility Files. This shouldn't have happened since I remember changing the type for Dell Utility partition to "de" (Fat16 or so) in Test disk*\

And sda4 still shows as unformatted space.

I would really appreciate any advice on this issue. Thanks!

Last edited by pulkittomar; 11-21-2010 at 09:37 PM.
 
Old 11-22-2010, 06:23 AM   #2
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
You can have 4 primary partitions. One (and only one) of them can be an extended partition. You must have an extended partition if you want to have more than 4 partitions, which are called logical partitions. If you have a partition number equal or greater than 5, it is a logical partition. You have /devsda5 but no extended partition (from what you write). Please post the output of
Quote:
fdisk -l
 
Old 11-22-2010, 10:42 AM   #3
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Make a copy...

I would recommend that you use Clonezilla or the command "dd" to clone the HDD to another medium before you try anything else. You can then try several variants of possible partition tables without changing and loosing your existing, starting information.

What did you get for results from the initial quick search TestDisk scan, before you did a deep scan?

Posting the results of "fdisk -l", as requested, would help.
 
Old 11-22-2010, 11:22 AM   #4
pulkittomar
LQ Newbie
 
Registered: Nov 2010
Posts: 5

Original Poster
Rep: Reputation: 0
@JZL240I-U and @thorkelljarl Thank you for the reply!
@JZL240I-U: The partitions I gave is what I selected in Testdisk. Testdisk doesn't allow a partition to be flagged as Extended by the user. Instead it automatically assigns all the partitions flagged "Logical" as Extended drives, as per my experience. Thanks for noticing.This what fdisk -l current gives

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd0000000

Device Boot Start End Blocks Id System
/dev/sda1 1 9 72261 6 FAT16
/dev/sda2 * 10 6384 51206776 7 HPFS/NTFS
/dev/sda3 6385 17082 85931685 f W95 Ext'd (LBA)
/dev/sda4 17083 38914 175357952 7 HPFS/NTFS
/dev/sda5 6385 16109 78116028 83 Linux
/dev/sda6 16110 17082 7815580 82 Linux swap / Solaris


@thorkelljarl: I will use clonezilla/dd from now on. I had to run Testdisk a number of times. I don't remember what Testdisk gave the first time I ran it, but I think most probably one of the partitions which was lost, was not listed.

All the runs except the first gave three partitions
1: Dell Utility Partition
2: A Fat32 Partition whose files could not be listed. Size around 32GB
3: An NTFS Partition.
 
Old 11-23-2010, 03:00 AM   #5
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
Well, the output of "fdisk" is what you truly have at the moment on your hard disk. Please note that this is not what you posted in the OP. Which means that you can access it this way from the linux side, if necessary by mounting by hand (as opposed to from /etc/fstab in case this, or rather the file system got corrupted). I'd thus strongly suggest that you save your data.

If the layout as given by fdisk is not what you originally had, here are some tools:

http://project.terminus.sk/dare/
http://www.thefreecountry.com/utilit...recovery.shtml
http://developer.berlios.de/projects/dvdisaster
http://www.xs4all.nl/~carlo17/howto/undelete_ext3.html
ftp://bmrc.berkeley.edu/pub/linux/re...ble-0.3.tar.gz
http://www.stud.uni-hannover.de/user/76201/gpart/
http://packages.debian.org/lenny/myrescue
http://www.nilfs.org/en/
http://freshmeat.net/projects/recoveryispossible/
http://www.sysresccd.org/
http://www.cgsecurity.org/wiki/TestDisk_Download

I still don't quite understand your goal. Is it recovering data? The old system structure? What keeps you from a clean install? Please explain...
 
Old 11-23-2010, 11:24 AM   #6
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
What now...

JZL240I-U asks the right question, what do you want to do? Your partition table shows all the signs of having been patched together. Your first post says that you lost a partition, but what did you loose that you need, did you loose important files that haven't been recovered ?

If you haven't lost the most important, but can read your data files, it might be easier to copy them to an external HDD either with Windows or with a linux live-cd, and re-install Windows. Depending on what you have to install from, you might be able to partition Windows from the beginning for installation on one partition, leaving unallocated space for linux. You now have two Windows partitions, however you arrived there. Dell may have set up Windows that way.

If you have Windows on a restoration partition, and it re-installs Windows on two partitions, you can use that, and begin again by shrinking Windows for a dual boot, first by using the Windows partitioning tool to shrink the first Windows partition, then moving the border of the second Windows partition down to fill the space. Then shrink the second partition for an extended partition for linux.

Instead, the results of "fdisk -l" seems to show that you have shrunken the Windows installation partition and created an extended partition for linux, leaving alone the other, larger Windows data partition. It might be better to have one large partition for all of Windows and more space for linux. Can you read the second Windows partition, either with Windos, linux, or a linux live-cd?

Before you start anything, find out what the files Dell has installed are for and how important they are. Restoration files are good to have, and some manufacturers have set up Windows with its own boot partition without which Windows won't boot. If you re-install, you may loose something you want, but may also rid yourself of some junk and free up a partition.

You need one out of four primary partitions for an extended partition on which you can make logical partitions for linux.

Just for clarity, can you post your results of "fdisk -l" again, marking the output, then using the "Go Advanced" posting function and pasting it as "code"(the hash icon at the top)? As an example here is one from a 4 GB USB stick.

The "*" is a boot flag, there is only one for a HDD, and yours is on the first Windows partition. It tells Windows what to boot.

Code:
Disk /dev/sdb: 4007 MB, 4007657472 bytes
124 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 7688 * 512 = 3936256 bytes
Disk identifier: 0x00056de1

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1018     3913161    c  W95 FAT32 (LBA)
I could be hectoringly didactic and ask where are those back-up files that you are supposed to have always at hand and up-dated, especially when you are venturing a task with such dire an outcome as a botched partitioning.

Last edited by thorkelljarl; 11-23-2010 at 01:34 PM.
 
Old 11-23-2010, 02:03 PM   #7
pulkittomar
LQ Newbie
 
Registered: Nov 2010
Posts: 5

Original Poster
Rep: Reputation: 0
@JZL240I-U, @thorkelljarl Thanks for such an elaborate reply. I really appreciate it.

Question: What I the current status of my laptop?
Answer: I am able to boot from both Windows and Ubuntu. But, the Data partition still shows as unformatted space in both Ubuntu and Windows. I cannot access the files.

Question: What do I want?
Answer: I want the data from Data partition. The partition has files(academic work) I gathered over an year or so. Resources on a lot of courses, mainly lecture videos, slides and anything related to the subject on the internet that interested me. The data is not critically important, but it would be a waste of effort if I lose it. I do have a backup which I took about 4-5 months ago. Most of the critical data I have, I keep it on Dropbox which saves it on internet.

Question: What I don't want?
Answer: To reinstall Windows or Linux. The problem occurred when I reinstalled Windows which, as expected, after 1 year of careless use had become suicidal(hanged every now and then). I use the Data partition as a second windows partition so that reinstall doesn't affect Data partition. I also mount that partition on Ubuntu to use it the same way. Thus, isolating Data partition from installs/re-installs of operating system. So my laptop is working just fine, except I do not have access to the Data partition. Also there are two unwanted partitions showing up which I can ignore for a while.

Use windows based or other recovery software: The issues with recovery software is that you never know if they recovered the whole file correctly. Most times the video files won't run at all. This may not be the case since nothing else has been written on the partition and the data may be perfectly recoverable. But a better solution I think would be to get the partition back. Guys I really appreciate all the help so far.

Last edited by pulkittomar; 11-23-2010 at 03:24 PM.
 
Old 11-23-2010, 03:09 PM   #8
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Want that data...

Did You clone the HDD? After you have a copy of the what you are to work on, you can try TestDisk again, or try PhotoRec, its companion program that is for recovering files. You did read the wiki? I can't give you detailed information; you know best what you've already done, what the HDD was before you started.

Additionally, the fact is that I have opened both programs to take a look, but not had to use either one myself, I just know they can work. Skill, or practice, or luck has saved me from the need. I learned to avoid some mistakes by practice partitioning an old HDD until I understood what I was doing and what was about to happen.

As long as you can restore the HDD to its previous state with the cloned copy, you can experiment a little more radically.

A version of the second NTFS partition, the one with the data, shows up on "fdisk-l", but its listing on the partition table may be wrong. Are you sure no linux live-cd will see that partition? Do you remember what, if anything, you shuffled around prior to what you now have listed in "fdisk -l" ? Using what you remember, try any variants that TestDisk throws up, then restore the HDD from the clone and try again. Then try PhotoRec, then some of the other recovery programs suggested.

You have a chance, but I don't know how good a one. It depends on how many different possible versions of the partitions there are to try, that is if TestDisk reaches back far enough to catch the right partition table.

You can thank me for the help, but it is for the effort. Whether it is help or not depends on something coming out of the effort.

Patience and Good Luck.

Last edited by thorkelljarl; 11-23-2010 at 03:23 PM.
 
Old 11-23-2010, 03:19 PM   #9
pulkittomar
LQ Newbie
 
Registered: Nov 2010
Posts: 5

Original Poster
Rep: Reputation: 0
I will do as suggested by you and @JZL240I-U. I have done recovery a number of times both on windows and linux. However, I will first give a try to get the whole partition back, and later if nothing works I will do the recovery. I will be using Clonezilla from now on, as Laziness is the root cause of all harddisk troubles.

Quote:
Originally Posted by thorkelljarl View Post
Want that data...

Did You clone the HDD? After you have a copy of the what you are to work on, you can try TestDisk again, or try PhotoRec, its companion program that is for recovering files. I can't give you detailed information since you know best what you have already done, what the HDD was like before you started, and the fact is that I have opened the programs to look, but not had to use either one myself, I just know they can work. Skill, or practice, or luck has saved me from the need. I learned to avoid some mistakes by practice partitioning an old HDD until I understood what I was doing and what was about to happen.

As long as you can restore the HDD to its previous state with the cloned copy, you can experiment a little more radically.

A version of the second NTFS partition, the one with the data, shows up on "fdisk-l", but its listing on the partition table may be wrong. Are you sure no linux live-cd will see that partition? Do you remember what, if anything, you shuffled around prior to what you now have listed in "fdisk -l" ? Using what you remember, try any variants that TestDisk throws up, then restore the HDD from the clone and try again. Then try PhotoRec, then some of the other recovery programs suggested.

You have a chance, but I don't know how good a one. It depends on how many different possible versions of the partitions there are to try, that is if TestDisk reaches back far enough to catch the right one.

Patience and Good Luck.
 
Old 11-24-2010, 02:03 AM   #10
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
I haven't had the need to use PhotoRec either, but I read lots of praise for its capabilities. Some of the links I posted earlier are clearly not what you need but thorkelljarl's suggestion to work on a clone is sound. Try those programs sequentially and lets hope one will succeed.

Here is one more:

http://www.partimage.org/
 
  


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
How can I remove vista from a ubuntu / vista dual boot! TheOneSYM Linux - Newbie 10 04-01-2010 01:21 PM
How to remove vista from dual boot ubuntu jaunty and vista skyskiers33 Linux - Newbie 1 11-07-2009 05:26 PM
dual boot vista and ubuntu, lost after changes to vista monkeybritt Ubuntu 5 12-04-2008 02:16 PM
fedora/vista dual boot - partimage: restored vista - vista won't let me log on redmoon zero Linux - General 1 12-31-2007 07:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 10:09 PM.

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