LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2009, 03:01 PM   #1
hawk__0
Member
 
Registered: Nov 2008
Posts: 105

Rep: Reputation: 15
Help! Partition table is hosed :(


I don't know how to fix this.....

Code:
ubuntu@ubuntu:~$ sudo fdisk -l
omitting empty partition (5)

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9726    78124063+   5  Extended
/dev/sda2            9325        9726     3229033+  82  Linux swap / Solaris
/dev/sda5               1        5241    42098238   83  Linux
/dev/sda6            5242        9324    32796666    e  W95 FAT16 (LBA)
ubuntu@ubuntu:~$
I was trying to install windows 7 on a different partition, but since for some strange reason it wouldnt create the partition, I booted the windows XP disc and created it, but it said that I couldnt proceed with the install because it had to write to the highest partition or something (which is my ubuntu drive, so no.)

How can I fix this, and get windows 7 installed?

Thanks in advance!
 
Old 04-30-2009, 03:39 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,087

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
As far as I know-you can't
Windows must be installed first, then Linux.
 
Old 04-30-2009, 03:41 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,330

Rep: Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404
Windows usually won't boot from a logical partition (unless w7 is different?) Your setup is unusual to say the least. Your primary partitions are swap and sda1, an extended partition which you have marked active/bootable?? and you have Ubuntu on a logical partition within the extended (sda5). You could delete the swap partition (sda2) but that won't give you enough space to install windows 7.

I think your best option is to delete swap, copy whatever you have on the FAT16 sda6 partition to a CD/DVD or another drive so you can restore it later. You would then be able to create a primary partition large enough to hold windows 7. If you look at the Start/End numbers for your partition, you don't have anywhere to install windows without deleting something. You have only used two primary partitions so you could create two more but there is no where to put them, all your space is used.

If you manage to do something like this successfully, your partition numbers will change and your /boot/grub/menu.lst modified.
 
Old 04-30-2009, 10:25 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,940

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Windows (prior to 7 anyway) can certainly be installed after Linux with (usually) only minor MBR fixups needed -I haven't bothered looking at Win7 yet.

With overlapping partitions like that, it's hard to know what the starting arrangement was let alone how to "fix" it. Can you remember what the original setup was ?. With a standard Ubuntu install I would expect Ubuntu itself on a primary, with the swap as the first logical. Doesn't match the above.
Can you still boot Ubuntu ? Regardless, I'd be getting a backup done - from a liveCD in need.
 
Old 04-30-2009, 11:10 PM   #5
ozminh
Member
 
Registered: Aug 2007
Posts: 73

Rep: Reputation: 19
i install windows every month.

you can install linux first. then creat a bootdisk.
install windows. boot into linux with the bootdisk and install grub or lilo.

however, that's windows XP, not w7.
 
Old 04-30-2009, 11:10 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by hawk__0 View Post
I don't know how to fix this.....

Code:
ubuntu@ubuntu:~$ sudo fdisk -l
omitting empty partition (5)

Disk /dev/sda: 80.0 GB, 80000000000 bytes
255 heads, 63 sectors/track, 9726 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x41ab2316

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9726    78124063+   5  Extended
/dev/sda2            9325        9726     3229033+  82  Linux swap / Solaris
/dev/sda5               1        5241    42098238   83  Linux
/dev/sda6            5242        9324    32796666    e  W95 FAT16 (LBA)
ubuntu@ubuntu:~$
!
I'm just trying to figure out what you have here, assuming that this is a cut and paste and not a typo. The problem looks like sda1 is what's buggered, to me. I think it should be:
Code:
/dev/sda1   *         9325        9726    78124063+   5  Extended
That would give you:
Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *       9325        9726    78124063+   5  Extended
/dev/sda2            9325        9726     3229033+  82  Linux swap / Solaris
/dev/sda5               1        5241    42098238   83  Linux
/dev/sda6            5242        9324    32796666    e  W95 FAT16 (LBA)
And this looks like a coherent, if strange (to me), partition table. I wonder if Windows just "repaired" the starting sector of /dev/sda1 to make it begin with sector "1"? Maybe it got confused because /dev/sda1 is marked as bootable.

I second syg00's suggestion of doing a backup. If it were me, I would probably just use fdisk to repair it, but I'm not going to accept responsibility if you try it and bugger everything.
 
Old 04-30-2009, 11:44 PM   #7
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 7,330

Rep: Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404Reputation: 1404
Quote:
Windows usually won't boot from a logical partition (unless w7 is different?)
Just noticed that I left out part of what I intended to put it the above statement, namely that windows post W98 can be installed on a logical partition if another windows is installed on a primary, or at least the boot files.

I don't see how this can be fixed other than by saving data on sda6 deleting that partition and swap and creating new. I'd just save important data and start all over after reading a little about grub and partitioning.
 
Old 05-01-2009, 12:46 AM   #8
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 375

Rep: Reputation: 77
According to what is posted, the first partition is an extended partition containing two logical partitions, /dev/sda5 and /dev/sda6. According to calculations, the entire drive is allocated, one extended partition and one primary partition. The primary partition is at the back and is formatted swap.

In order to install Windows, with the current configuration you would need to eliminate /dev/sda6 and allocate the free space created into a primary partition for Windows.
Or...shrink /dev/sda6 by 300 or so megabytes, keeping it as a logical partition, and install Windows in this partition, the 300 megabytes of free space left after /dev/sda6 would need to be allocated to a new primary partition which you would use to contain the Windows boot files (which need to be in a primary partition).
 
Old 05-01-2009, 01:07 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,940

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Quote:
Originally Posted by Brains View Post
According to what is posted, the first partition is an extended partition containing two logical partitions, /dev/sda5 and /dev/sda6. According to calculations, the entire drive is allocated, one extended partition and one primary partition. The primary partition is at the back and is formatted swap.
Perhaps you should look again.
That "primary" swap partition is embedded in the extended. Hence the concerns.
 
Old 05-01-2009, 01:22 AM   #10
Brains
Member
 
Registered: Apr 2009
Distribution: Debian testing
Posts: 375

Rep: Reputation: 77
It sort of appears this way, but logical partitions start at /dev/sda5 or /dev/hda5. Anything before this is a primary/extended partition.
 
Old 05-01-2009, 10:57 AM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,318

Rep: Reputation: 126Reputation: 126
Quote:
Originally Posted by syg00 View Post
Perhaps you should look again.
That "primary" swap partition is embedded in the extended. Hence the concerns.
Ah, so sda1 should be eliminated completely, then? I knew something was bothering me about this.
 
Old 05-01-2009, 11:52 PM   #12
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,940

Rep: Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210Reputation: 2210
Probably not - logicals are a simple linked list; contained with an extended. It turns out the partition starting at cylinder 1 could be either primary or logical. What bothers me is that sda6 can be found at all - that implies it is linked from sda5. Hence the extended at sda1 might just be (or have been) valid.
I have some code that conveniently displays the partition table entries (including for logicals). It displays the actual data that links the logicals, rather than just the starting position. But it needs some extra -dev packages first on Ubuntu, so isn't a straight-forward install.

@hawk__0 go get the bootinfoscript from sf.net - run it from a liveCD if you have to, and post the RESULTS.txt file it generates. I just had a look at the script, and it does some sanity checks on (all) the partitions, and might be useful here.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"No partition table or unknown signature on partition table" 10.1 install madcow007 Slackware 4 02-09-2009 12:04 PM
Hosed my kernel - LUKS partition is not making it easier king111 Linux - General 1 11-23-2008 03:24 PM
openSolaris hosed the partition table. Why? Changing primary to secondary partition? JZL240I-U Solaris / OpenSolaris 9 10-16-2008 11:48 AM
Hosed partition table with fdisk. Any way to restore from memory? Vanyel Linux - Server 7 10-08-2008 04:06 PM
Slack 10: S-ATA = "No partition table or unknown signature on partition table"? dissolved soul Slackware - Installation 11 08-05-2004 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration