LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


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

Rep: Reputation: 15
How do I fix these partitions?


Okay so I went to scale the partitions on this computer with gparted on a live CD one day. I left it overnight and rebooted the computer after my changing of the resolution borked my display. Somehow this messed things up. See here:

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

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

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9729 78148161 5 Extended
/dev/sda2 9400 9729 2650693+ 82 Linux swap / Solaris
/dev/sda5 1 2432 19534945+ 83 Linux
/dev/sda6 2433 6752 34700368+ 83 Linux
/dev/sda7 6753 9399 21261996 e W95 FAT16 (LBA)


sda6 = root of ubuntu, sda7 = home directory, sda7 = the new partition I had made for a to-be windows install (not sure why its fat16...).

Anyways, ubuntu boots fine as is, but the boot flag is on sda1. How can I fix my partitions so gparted will work again? (gparted wont show partitions if they are screwed up like this)
 
Old 01-01-2010, 04:52 PM   #2
Mr-Bisquit
Member
 
Registered: Feb 2009
Distribution: FreeBSD, OpenBSD, NetBSD, Debian, Fedora
Posts: 770
Blog Entries: 52

Rep: Reputation: 68
Mount externally with a rescue CD or create a rescue CD in Ubuntu with the tools needed.
Use the shell to run ext2/3 programs and fat/ntfs progs.
After that, gparted should work.
 
Old 01-01-2010, 04:58 PM   #3
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
I believe you can change the flag with fdisk or cfdisk. parted might also work for you.
 
Old 01-01-2010, 05:13 PM   #4
hawk__0
Member
 
Registered: Nov 2008
Posts: 105

Original Poster
Rep: Reputation: 15
The flags will make it show in gparted again? I don't know how else to fix this. The fat16 partition was deleted a little while ago. Is the problem that the ordering is wrong in the list? What programs would I use to fix this Mr bisquit?
 
Old 01-01-2010, 06:53 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Use testdisk to recover the partitions it can find. I'm surprised gparted did that - I've seen Partition Magic do similar.
Windows won't install to a disk like that. You have an extended spanning the entire disk (not a problem of itself), but you have a (nominally) primary partition (sda2) embedded in the extended.
Any attempt at resolving this would be guess-work.
 
Old 01-01-2010, 07:28 PM   #6
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
parted can reorder the partition table entries. Look at man parted for details.
 
Old 01-01-2010, 07:32 PM   #7
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
you could try out the Greatest Debian rescue CD?
it has all the recovery tools basically
its got lots of things...
http://www.linuxquestions.org/questi...art-1--779053/

about a week ago I booted up and it said one of my data partitions(80GB) was "unallocated"
oh s^&%

I used testdisk and it found the partition and fixed it
dont format anything whatever you do
 
Old 01-02-2010, 12:06 PM   #8
hawk__0
Member
 
Registered: Nov 2008
Posts: 105

Original Poster
Rep: Reputation: 15
Thanks guys, should I delete that extended one taking up the whole disk? I used testdisk but that confused me because it got rid of that extended one taking up the whole disk.
 
Old 01-02-2010, 12:50 PM   #9
hawk__0
Member
 
Registered: Nov 2008
Posts: 105

Original Poster
Rep: Reputation: 15
Okay big problem. I ran testdisk, it found my swap and 1 ext3 FS. After I proceeded, it showed swap, an ext3, and an extended ext3 (I have my home folder on a different partition than the root OS). After seeing all 3 partitions there (swap, root, home), I proceeded. After rebooting it showed 1 ext3 FS, and the swap.

I am unable to mount it with a live CD because of the superblock. I am running e2fsck on it right now and have weights holding down the "Y" key because its all messed up and its been doing this for 10 minutes or so...


Am I screwed? Did I lose my home folder?
 
Old 01-02-2010, 07:12 PM   #10
hawk__0
Member
 
Registered: Nov 2008
Posts: 105

Original Poster
Rep: Reputation: 15
bummppp
 
Old 01-03-2010, 03:04 AM   #11
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Quote:
Originally Posted by hawk__0 View Post
Am I screwed? Did I lose my home folder?
Quite likely.
fsck is designed to get the filesystem back into a consistent state. With little (no) regard to what you as the user might construe that to be. Especially if you park a weight on the <Enter> key.
File truncation is the most common - but you will (usually) have no indication of which files have been "fixed".
If I have a f/s that need "fixing" to that extent, I restore it - in full.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed up my partitions not sure how to fix this Shadowmeph Linux - General 1 09-21-2008 01:08 PM
How do I fix a deleted partition table with NTFS and ext3 partitions? Draxx Linux - Newbie 6 05-22-2008 11:42 AM
windows killed my partitions! no linux partitions found on this computer. The MJ Linux - Software 10 01-05-2007 08:31 AM
FIX---Fedora install hangs---To fix this---- jmckinzie Fedora - Installation 0 12-20-2005 12:08 AM
all attempts to fix the problem failed... can someone help me fix partition space? foreverdita Linux - Enterprise 2 05-11-2005 09:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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