PDA

View Full Version : [ubuntu] 11.04 Install doesn't see current partitions



Ameet
May 11th, 2011, 01:36 AM
I have Ubuntu 10.04 (32bit) alongside Windows Vista currently. I tried to install Ubuntu 11.04 (64bit) from a bootable USB stick and found out that none of the current partitions are visible.

My PC is a Dell Inspiron 1525 with dual core Pentiums. Here are my partitions. I am reporting all this back from my current, stable Ubuntu 10.04 platform:


~$ sudo fdisk -l
Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x00000080

Device Boot Start End Blocks Id System
/dev/sda1 * 30076 30402 2619392 c W95 FAT32 (LBA)
/dev/sda2 6 1280 10240000 7 HPFS/NTFS
/dev/sda3 * 1280 8667 59332776 7 HPFS/NTFS
/dev/sda4 16157 30402 114424275+ f W95 Ext'd (LBA)
/dev/sda5 30076 30402 2619392 dd Unknown
/dev/sda6 16157 18587 19526976 83 Linux
/dev/sda7 18588 21019 19535008+ 83 Linux
/dev/sda8 21020 23451 19535008+ 83 Linux
/dev/sda9 29954 30075 979933+ 82 Linux swap / Solaris
/dev/sda10 23452 26001 20482843+ 83 Linux

Partition table entries are not in disk order
On the above partitions,
sda1 is labeled "MEDIADIRECT" and has some windows OS folders (I don't get why - it's not the Vista OS)
sda2 is called a "RECOVERY" partition by Windows (dunno about it either, I"ve left it alone)
sda3 is Windows Vista
sda4 is the last primary partition, and it's divided into several logical partitions:
sda5 seems to be a copy of sda1, same size also labeled MEDIADIRECT
sda6 is an old (unused) version of Ubuntu, which I'd like to use to install 11.04
sda7 is mounted as /home
sda8 is mounted as /usr/archive
sda9 is the Linux swap partition
sda10 is the current (10.04) mount of /

I know something's wrong here because cfdisk gives an error on opening, "FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder". :confused:

I also know something's wrong because gparted does not show any partitions. Here's the screenshot:
191788

Can someone help me figure out what's wrong here, before I accidentally hose my Windows and current Ubuntu partition?

Quackers
May 11th, 2011, 01:48 AM
You seem to have a number of anomalies in your partition table.
Firstly you appear to have 2 boot flags. One on sda1 and one on sda3. I've never been able to do that - and I've tried. I'm not sure that's possible!
Secondly your sda5 appears to be a Dell Data Safe partition (maybe), which I believe is normally on a primary partition whereas yours is on a logical partition.
Thirdly, and most importantly, your extended partition (sda4) and your sda5 partition extend beyond the boundaries of your hard drive!
They both end at cylinder 30402, whereas your hard drive only has 30401 cylinders. This is an important error.
The extended partition can be fixed easily, but sda5 is not so simple.
In fact, I'm not sure what to do about that.
I will ask another forum member to take a look. He wrote a program which can fix partition problems and I would like to hear his views before I offer any advice.
Sadly, I don't know whether he's online at the moment.
Please hang on for a while.

Ameet
May 11th, 2011, 02:05 AM
OK thanks Quackers. Meanwhile I'm providing output from gdisk (which I just installed to get another look at things). It has more detailed sector counts and you'll see something interesting about sda1 and sda5:


~$ sudo gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.5.1

Partition table scan:
MBR: MBR only
BSD: not present
APM: not present
GPT: not present


************************************************** *************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATON IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
************************************************** *************

Exact type match not found for type code DD00; assigning type code for
'Linux/Windows data'
Disk /dev/sda: 488397168 sectors, 232.9 GiB
Disk identifier (GUID): 1F63EDA2-D975-0727-5CB4-0A22A70C4501
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 488397134
Total free space is 183893225 sectors (87.7 GiB)

Number Start (sector) End (sector) Size Code Name
1 483155968 488394751 2.5 GiB 0700 Linux/Windows data
2 81920 20561919 9.8 GiB 0700 Linux/Windows data
3 20561920 139227471 56.6 GiB 0700 Linux/Windows data
5 483155968 488394751 2.5 GiB 0700 Linux/Windows data
6 259546203 298600154 18.6 GiB 0700 Linux/Windows data
7 298600218 337670234 18.6 GiB 0700 Linux/Windows data
8 337670298 376740314 18.6 GiB 0700 Linux/Windows data
9 481195008 483154874 957.0 MiB 8200 Linux swap
10 376740378 417706064 19.5 GiB 0700 Linux/Windows data
~$


sda5 which (as you say, is the Dell data safe partition) is IDENTICAL to sda1 - the logical sda5 partition is entirely overlaid onto the physical sda1 partition (instead of residing within the range of the physical sda4 that it's supposed to be in). That seems weird to me.

It's like (by analogy) a "duplicate" file that turns out to be a hard link to the the original.

Also, by gdisk's more detailed sector count, I don't think sda1 / sda5 exceeds the range of the hard disk.

Quackers
May 11th, 2011, 02:11 AM
That's amazing :-)
I'm not sure how Dell data safe works exactly (other than to mess with grub at sector 32) but that does not look right.
The start/end blocks of sda5 do not extend beyond the disk, as you say.
But now there's another small problem :-)


************************************************** *************
Found invalid GPT and valid MBR; converting MBR to GPT format.
THIS OPERATON IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if
you don't want to convert your MBR partitions to GPT format!
************************************************** *************
This needs to be fixed. The program I spoke of earlier will do that.
Lets see if he shows up - it's worth waiting for his wise words :-)

EDIT Do you use Dell data safe?

Ameet
May 11th, 2011, 02:20 AM
"EDIT Do you use Dell data safe?"

- No, I don't. I try not to go over to the Windows side very much, and it basically has (software) cobwebs all over it :-). But I don't want to delete it because it has iTunes and I still haven't figured out a decent substitute on the Ubuntu side for our iPod touch :-(.

It hasn't occured to me to do anything with that partition or to remove it - I don't know if anything in Windows links to it or if the Windows boot up would break without it, and I really haven't wanted to understand Windows enough to try to figure that out :-).

Quackers
May 11th, 2011, 02:23 AM
I know it's a deletable program from within Windows. But I don't know whether deleteing its partition at this stage will cause more problems tha it would solve. Better to wait for more competent advice :-)

srs5694
May 11th, 2011, 05:08 AM
I'm the author of gdisk, and Quackers asked me to take a look at this thread.

First, using fdisk's default cylinder-precise output to determine partition overlaps and extension beyond the disk is unreliable, at least unless the apparent error is greater than 1 cylinder (that is, 2 or more). Also, although I'm not all that familiar with cfdisk, the cfdisk warning noted in the first post is clearly bogus. The reason for all of this is that partitions are defined in terms of sectors, which are much more precise than cylinders. Using cylinder values is like trying to build a table using whole-number units of miles. Old disk utilities used cylinder units for reasons that made sense in the 1980s, but there has been a change recently (beginning with Windows Vista, and Linux tools have only picked it up in the past year or two) to switch the default start points of partitions from cylinder alignment to alignment on 1 MiB boundaries (which is necessary for good performance on some 21st century hardware).

You can get sector precision out of fdisk by using the -u option, as in "sudo fdisk -lu" rather than "sudo fdisk -l". When using fdisk, I recommend using -u as a matter of course. (Very recent versions use -u by default -- finally!)

The "small problem" that Quackers pointed out about gdisk's warning that it was converting MBR to GPT isn't a problem at all, at least not when gdisk is used just to view the partition table. That would be a problem if you were to enter gdisk, use it to manipulate the partitions, and save the changes; in that case, you'd be converting MBR to GPT, which would render Windows unbootable. For just viewing the partitions, though, it's not an issue. Of course, as just noted, you can get sector precision out of fdisk, too, and it's probably better to use fdisk in this case; there'll be no chance of accidentally converting MBR to GPT, you'll see the extended partition, and you'll see the original MBR type codes rather than the codes gdisk converts them to in GPT terms.

The identification of both /dev/sda1 and /dev/sda3 as active/bootable is unconventional at best, but it's certainly possible. Linux's fdisk enables you to create such a configuration. The main purpose of this flag is to let the DOS/Windows boot loader know which partition to boot, though, so setting the flag on more than one partition is ambiguous. Overall, I'd say it's best to correct this problem, but it's not what I'd call a major one unless you're having boot problems. One solution to your main problem will obviate this minor problem....

Thus, in the final analysis, you've got just one significant problem with the disk (unless I've overlooked something): /dev/sda1 and /dev/sda5 identify the exact same partition. This is almost certainly the cause of GParted's being unable to "see" any partition on the disk; it's known to flake out in this way whenever it sees anomalies on a disk, including overlapping partitions. I'm unfamiliar with Dell's Data Safe tool, so if the sda1/5 partition is supposed to be a Dell Data Safe partition, I have no idea whether you'd want to keep its /dev/sda1 or /dev/sda5 identity. I recommend you research this issue in more detail before proceeding, just so you don't end up breaking Windows.

Before attempting a repair, I strongly recommend you back up your current (broken) partitions:



sudo sfdisk -d /dev/sda > parts.txt


Then copy parts.txt to a USB flash drive, floppy disk, CD-R disc, or some other removable medium. If you attempt a repair and it makes matters worse, you'll be able to work with the backup file to recover the partitions.

If you decide to keep /dev/sda5, you should be able to use Linux fdisk to delete /dev/sda1:



Type "sudo fdisk -u /dev/sda".
In fdisk type "d" to delete a partition. When prompted, type "1" to specify partition 1.
Type "p" to view your partition table and verify that the partitions are all correct. If they aren't, type "q" to quit and start over again.
Type "w" to save your changes.



If you decide to keep /dev/sda1, though, you've got the problem that your extended partition (/dev/sda4) overlaps /dev/sda1, and this is illegal. There are various solutions to this problem, the simplest of which is probably to use my FixParts (http://www.rodsbooks.com/fixparts/) program. Read the documentation on its main page to learn how to use it. In theory, it should automatically discard either /dev/sda1 or /dev/sda4, but I'm not sure which one it will discard in practice (I never tested it on a disk with the exact problem you've got). The choice is largely irrelevant, though; if necessary, you can just toggle the primary/logical status of the partition it keeps, and perhaps change the type code, to get the configuration you want.

The biggest danger in mucking with this will be in losing some functionality in Windows. If Dell's Data Safe or some other tool looks for a partition as primary vs. logical, or using a particular type code, and if you guess wrong, that will no longer work. From a Linux perspective, you just want to make the partition table legal, and so either solution will work fine, with one caveat: If you use FixParts, it will re-order the logical partitions. This could render Linux unbootable if you refer to partitions by their device names (/dev/sda6, etc.) in /etc/fstab or in your GRUB configuration (/boot/grub/grub.cfg). If you use UUID values in these files, as recent versions of Ubuntu do, there should be no disruption.

Good luck!

Quackers
May 11th, 2011, 05:28 AM
Thanks again srs5694. Always a full and precise response.
Have fun Ameet :-)

Ameet
May 11th, 2011, 01:59 PM
Hi, SRS5694,

I'm still trying to digest all the great tips you've laid out. On one point - I'm not able to install FixParts. I get a dependency error when unpackaging the .deb file:

191836

Can you tell me what to do about that?

Ameet
May 11th, 2011, 02:31 PM
Apparently, the screwed up partition(s) (sda1/sda5) belong to Dell MediaDirect, which is a media-player OS that one is supposed to be able to boot into instead of the pre-installed Vista. I've never used it (maybe once or twice when I first got the machine?), and forgot it was there.

Here's a couple of threads talking about Dell and their MediaDirect partition:
http://ubuntuforums.org/showthread.php?t=628229
http://ubuntuforums.org/showthread.php?t=525789
Here's an external link to background on the hidden Mediadirect partitions. This has something to do with HPA or "Host Protected Area" which is starting to get beyond my technical knowledge:
http://www.goodells.net/dellrestore/mediadirect.shtml
(http://www.goodells.net/dellrestore/mediadirect.shtml)
It is known to screw around with non-NTFS partitions willy-nilly, and I wonder if it's responsible for the strange overlap between the primary and logical partition. I'd like to just delete the partition, but the above thread implies that one might cause further damage if, down the road, the special button on the Dell that starts MediaDirect is accidentally pressed to boot up: in that case, it could take the first non-NTFS partition (which could be my Linux / or /home :-( and appropriate it for itself).

This is apparently written at a low-level in Bios or Rom or some-such. Here's selected quotes from the goodells.net site:

As installed by Dell, MediaDirect is placed in a FAT32 partition at the end of the disk and the area is then closed off as a HPA. ...
When the MediaDirect button is pressed, the extra LBA-3 code instructs the disk controller to expose the HPA, it temporarily swaps the MD partition descriptor into slot #4 of the real partition table, sets that partition active, and proceeds to boot the now active partition. When the computer is powered off or rebooted, the HPA and partition table return to their normal states. ...
For HPA-based MediaDirect systems, the first sector of the two-part boot record is the same as the regular Dell MBR that is used for booting the DSR partition. That means that although Dsrfix was not specifically designed for MediaDirect, it may help in repairing the MD boot capability. Note that Dsrfix repairs LBA-0 only and does not repair LBA-3. If the MD partition won't boot because the MBR (LBA-0) was overwritten, Dsrfix can restore the ability to boot MediaDirect if LBA-3 is still intact. If the MD partition won't boot because LBA-3 was overwritten, Dsrfix won't fix LBA-3 (but it won't harm anything, either).


I'm including this here in case it is helpful for other Dell users encountering this problem. It is all definitely above my "advanced noob" status and I don't exactly know how to make use of this info myself. SRS5694? Quackers?

Quackers
May 11th, 2011, 03:26 PM
If you double-click on the Fixparts .deb file is that what opens up? Have you downloaded the correct version for your system? Mine is fixparts_0.7.1-1_amd64.deb
but I'm using 64 bit.
libpopt0 is installed in my system. Open synaptic and enter libpopt0 in the search box then install that first (though I didn't need to do that) and then see if Fixparts will install.

Ameet
May 11th, 2011, 03:30 PM
OK, I drew out a simple map of my partitions (based on the output of fdisk), and that makes clearer what the problem is, I think:


._________________________________________________ _____________.
part | | 1 |
part | 2 | 3 | 4 (logical)...................................>|
part | | 6 | 7 | 8 | 10 |unused| 9 | 5 |


Mediadirect is in sda1 (as shipped by Dell). It is placed at the end of the hard drive, and generally hidden it. At some point during one of my installations/repartitions, it must have been made visible.
Sda2 is the Dell Recovery partition (dunno about it, also just shipped by Dell).
Sda3 is Windows Vista.

For the logical partitions, sda6 is an old, currently unused version of Ubuntu (8.04?). That's what I want to appropriate for installing 11.04.
Sda7 is /home
Sda8 is /usr/archive
Sda10 is my current Ubuntu 10.04 install (/)
Sda9 is the Linux swap partition.

Somehow, the Extended partition Sda4 (which holds all the logical partitions) got stretched out to encompass the Mediadirect partition. I must have seen unused space on the hard drive when sda1 was still invisible and decided to push sda4 out as far as possible. And somehow that's when sda5 got mapped onto the same location as sda1.

So, I don't think I should monkey around with deleting sda1, which is a primary partition and is used by Mediadirect.

I think I should delete sda5, then *resize* sda4 backwards so it no longer overlaps with sda1. The final result should look like this:


._________________________________________________ _____________.
part | 2 | 3 | 4 (logical)............................>| 1 |
part | | 6 | 7 | 8 | 10 |unused| 9 |


Question: can I do this non-destructively regarding the logical partitions sda7, 8, and 10 (where my docs and current OS reside)???

Quackers
May 11th, 2011, 03:37 PM
First you should backup what you need, just in case. Second, can you recover your system without using the recovery partition (in case that goes bad)? If not, you should make the recovery dvd's. Somewhere there will be a utility that does that.
I agree with leaving sda1 alone. What I might try is to uninstall media direct and also Dell data safe if it's in there. Then you can look at your partitions again and see what's what.
Fixparts will fix sda4 in a moment. Did you get it installed?

Ameet
May 11th, 2011, 04:04 PM
First you should backup what you need, just in case. Second, can you recover your system without using the recovery partition (in case that goes bad)? If not, you should make the recovery dvd's. Somewhere there will be a utility that does that.
I agree with leaving sda1 alone. What I might try is to uninstall media direct and also Dell data safe if it's in there. Then you can look at your partitions again and see what's what.
Fixparts will fix sda4 in a moment. Did you get it installed?

It didn't come with a reinstallation DVD - I think that's what the recovery partition is for (seems odd to me - it wouldn't help if the HD crashed completely as that partition would be hosed too...) I have a DVD player but it can't burn DVDs so I can't make my own unfortunately. I may have to get an external HD and do an image backup of the Windows & Ubuntu partitions onto it.

I can't seem to install Fixparts. It's looking for libpopt0 version > 1.16. My current version is 1.15-1. Synaptic package manager doesn't offer a newer version of it. Is there a way to "force" it to look in the repositories for a newer version?

Quackers
May 11th, 2011, 04:10 PM
Maybe you didn't see post #11
If necessary install libpopt0 first with synaptic and try again.

Ameet
May 11th, 2011, 04:19 PM
Maybe you didn't see post #11
If necessary install libpopt0 first with synaptic and try again.

Quackers - I did look at #11. Libpopt0 is already installed, it is version 1.15-1, and Synaptic tells me that is the most recent version. But the Fixparts .deb has a dependency requirement that it be version 1.16 or greater. How do I get a more recent version of it than the one Synaptic thinks is the most recent? I've already asked Synaptic to reload from the repositories. Could it be 1.16 only comes with Ubuntu 10.11 (which I skipped over)?

Quackers
May 11th, 2011, 04:24 PM
Hmm I have version 1.16.1 installed - not sure why you have an older version. What version live cd are you using? It looks old from the screenshot.
Are you using 32 bit or 64 bit and what is the name of the fixparts file you downloaded please?

Added booting into 10.04 would be better.

Ameet
May 11th, 2011, 04:49 PM
Hmm I have version 1.16.1 installed - not sure why you have an older version. What version live cd are you using? It looks old from the screenshot.
Are you using 32 bit or 64 bit and what is the name of the fixparts file you downloaded please?

Added booting into 10.04 would be better.
I'm not doing this from a liveCD. I'm working off my current Ubuntu OS (10.04). It's 32bit. The Fixparts version I've obtained is gdisk_0.7.1-1_i386.deb.

Maybe I should do this off a liveCD (in my case, the 11.04 install USB stick, 64bit). I just realized that I can't make any edits to the partitions on my drive as long as I'm running an OS residing on the same drive. :P I knew that. LOL.

With that in mind, I'll reboot off my USB stick, install gdisk onto that, and I bet there won't be any problems.

Thanks for asking the right questions to jog my thinking!

Quackers
May 11th, 2011, 05:03 PM
Have another look at the fixparts site. My version is fixparts_0.7.1-1_amd64.deb not gdisk. I'm using 64 bit, so if you are using 32 bit it should end with i386.deb but it should be called fixparts.
You want the 6th one down on the page below.
You first need to click on gptfdisk, then on 0.7.1, then on fixparts-binaries to get to the right page.

Hmm the picture is uploading but not displaying!

srs5694
May 11th, 2011, 06:40 PM
Your problem with installing FixParts is that you're not trying to install FixParts; you're trying to install gdisk! You have three options for installing FixParts:



Install the FixParts .deb package for your architecture from SourceForge. (http://sourceforge.net/projects/gptfdisk/files/gptfdisk/0.7.1/fixparts-binaries/) In theory, this should work fine for a wide variety of Ubuntu distributions, but I've only tested it on a couple (I don't recall which ones, offhand). Note that there's a Windows version available here, so you can install and use it from Windows, if you have problems with the Linux packages.
Install the gptfdisk package for your specific Ubuntu version from the OBS repositories, as described in the "Downloading GPT fdisk from OBS" section of this page. (http://nessus.rodsbooks.com/gdisk/download.html)
Download the GPT fdisk source code and build everything (or at least FixParts) from source. This will be harder than either of the preceding options, so you should try it only if neither of them works for you.



The reason for these different options has to do with the fact that FixParts is an offshoot of another program of mine (GPT fdisk) and the fact that the latest version of GPT fdisk relies on libraries that vary a lot from one distribution to another. The FixParts program specifically, though, does not have these dependencies, and it's intended to solve very different partitioning problems. Thus, I prefer to split them into two packages -- gdisk and fixparts. Unfortunately, I haven't figured out how to split them up when using OBS (which is a tool for developers to enable building software for a wide variety of distributions) to build Debian packages, so the Ubuntu and Debian packages from OBS merge GPT fdisk and FixParts into a single package. I've still got a separate FixParts package on the SourceForge page, though.

As to MediaDirect, I'm not familiar with it, so I don't fully understand its requirements, and I can't offer specific suggestions of how best to handle it. My suspicion is that keeping the primary parition incarnation of your "siamese twin" partition is the best course of action, but I'm not positive of that.

Ameet
May 18th, 2011, 02:28 AM
OK, as I feared, something got hosed on my hard drive. Here's what I did:

1) I backed up the MBR onto an external drive.
2) I backed up each important partition (RECOVERY, VISTA, /home, Ubuntu 10.04, MEDIADIRECT) as an image file onto the external drive. I used dd & split (because of a 4Gig file-size limitation on the external drive) to back these up.
3) Then, I ran FixPart. It automatically noted that sda1 and sda5 were overlapping, and it omitted sda1. I then tried to "omit" sda5 - this was probably a mistake: I was hoping to delete that partition, and reinstate the primary partition sda1.
Instead, "both" partitions (remember, they both point to the same region of the drive by mistake) got deleted.

4) At this point, I used parted to try to recreate that region as a primary partition only. I fed it the start and end sectors of the sda5/sda1 partition, which I had copied down earlier, and used partition-type "FAT32".

5) Now I could prove that Grub was broken, irrevocably. I could not boot off the hard drive anymore.

6) I inserted my 11.04 Install USB-stick, and tried to install 11.04 from that, into an unallocated region of the hard drive. I have NOT been able to. I get an input/output error early on in the file copy process. My Install stick has the 64-bit version of Ubuntu. Up till now I've only used 32-bit OS's, even though I have Intel dual-core 64 bit processors.

7) I downloaded and burned a 32-bit version of the 11.04 OS onto a CD, and tried to install from that. Same input/output error as in #6.

Here is the state of my HD at this time.


$ sudo fdisk -l /dev/sda

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 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: 0x00000080

Device Boot Start End Blocks Id System
/dev/sda1 8667 30075 171962846+ f W95 Ext'd (LBA)
/dev/sda2 6 1280 10240000 7 HPFS/NTFS
/dev/sda3 * 1280 8667 59332776 7 HPFS/NTFS
/dev/sda4 30076 30402 2619392 c W95 FAT32 (LBA)
/dev/sda5 16157 18587 19526976 83 Linux
/dev/sda6 18588 21019 19535008+ 83 Linux
/dev/sda7 21020 23451 19535008+ 83 Linux
/dev/sda8 23452 26001 20482843+ 83 Linux
/dev/sda9 29954 30075 979933+ 82 Linux swap / Solaris
/dev/sda10 8667 15897 58071040 83 Linux
/dev/sda11 15897 16156 2085888 82 Linux swap / Solaris

Partition table entries are not in disk order
Here they are in disk order (arranged by me):


Device Boot Start End Blocks Id System
/dev/sda2 6 1280 10240000 7 HPFS/NTFS
/dev/sda3 * 1280 8667 59332776 7 HPFS/NTFS
/dev/sda1 8667 30075 171962846+ f W95 Ext'd (LBA)
/dev/sda10 8667 15897 58071040 83 Linux
/dev/sda11 15897 16156 2085888 82 Linux swap / Solaris
/dev/sda5 16157 18587 19526976 83 Linux
/dev/sda6 18588 21019 19535008+ 83 Linux
/dev/sda7 21020 23451 19535008+ 83 Linux
/dev/sda8 23452 26001 20482843+ 83 Linux
/dev/sda9 29954 30075 979933+ 82 Linux swap / Solaris
/dev/sda4 30076 30402 2619392 c W95 FAT32 (LBA)

$ sudo sfdisk -d /dev/sda
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.
# partition table of /dev/sda
unit: sectors

/dev/sda2 : start= 81920, size= 20480000, Id= 7
/dev/sda3 : start= 20561920, size=118665552, Id= 7, bootable
/dev/sda1 : start=139229182, size=343925693, Id= f
/dev/sda10: start=139229184, size=116142080, Id=83
/dev/sda11: start=255373312, size= 4171776, Id=82
/dev/sda5 : start=259546203, size= 39053952, Id=83
/dev/sda6 : start=298600218, size= 39070017, Id=83
/dev/sda7 : start=337670298, size= 39070017, Id=83
/dev/sda8 : start=376740378, size= 40965687, Id=83
/dev/sda9 : start=481195008, size= 1959867, Id=82
/dev/sda4 : start=483155968, size= 5238784, Id= c
The primary partitions are in blue; the logical partitions are in black, and tabbed in one space.
sda2 and 3 are the RECOVERY and VISTA partitions
sda1 is the extension partition that holds 5-11
sda10 and 11 are newly created partitions in an unallocated space, made by the Ubuntu installer - but this is where it failed.
sda 5, 6, 7, and 8 are my old sda 6 (unused), 7 (/home), 8 (/usr/archive), and 10 (Ubuntu 10.04)
sda9 is the old swap
sda4 is my attempt at recreating Dell's MEDIADIRECT partition using parted.

I don't mind if everything in sda1 gets hosed - I am reinstalling Ubuntu, and I have my /home and old install backed up to external drive anyway.

I *would* like to get the Vista OS to be operational again if possible. It's all there, but the MBR is messed up.

I did try to copy the first 466 bytes of the backed up MBR back onto the drive (after backing up the "broken" image of it) - that did not trigger grub to start, and then gparted could not read the state of the drive at all. So I returned it to it's most recent state and I can at least look at the partitions and mount them while running from my USB install stick.


$ sudo dd bs=466 count=1 if=/media/extHD/MBR.img of=/dev/sdaNow I truly am at the limit of my expertise as I don't understand the internals of MBR, grub and bootloaders. Can anyone help me out to patch this up and get Vista bootable again at least? And why am I getting input/output errors while trying to install 11.04? :confused:

Thanks!!

Ameet
May 18th, 2011, 08:12 PM
OK. I was able to fix the MBR by using "grub" from the live-USB stick. Then I was able to reboot and use my grub menu to go into Vista and/or into my 10.04 install of Ubuntu. So, I'm back to my previous level of functionality at least.

I still can't install 11.04. I get this error, same as before.

192562

I get this when trying to install the 64 bit version (from the USB stick) - or - the 32 bit version (from a downloaded live CD).

Any ideas??