LinuxQuestions.org
Visit Jeremy's Blog.
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 10-30-2007, 02:23 AM   #1
Executor21
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Partition problems: half of my hard drive turned useless


My computer has a 160 GB hard drive, which was split halfway between Win XP and Linux.

Recently, I've started to run out of space on the Windows partition. However, I couldn't just resize it (or maybe I didn't know how), since my Linux partition was split in 3 virtual partitions (/, swap, and /home), and the part of the disk contiguous to the Windows partition was the / section and not the /home secton, which I wanted to shrink and give to Windows.

So I came up with this plan:
Delete the Linux partitions
Give the whole drive to the Windows partition
Reinstall Linux, giving it less space this time

I used GParted utility on the Ubuntu 7.04 install DVD. The partitions were deleted, and merged into the Windows partition. However, according to GParted, all the new space of the Windows partition was now used--there was no new free space. The strangest thing was that the installer itself reported the correct amount of free space.

I searched, and the space bug in GParted is known. It was suggested that rebooting Windows might help, so I tried. But when I removed the Linux partition, I started getting errors with GRUB. So I had to reinstall the Windows MBR from my recovery disk to even get into Windows.

And now... there's no change in my system. Windows still sees only the part of the hard drive it had before, so I didn't get any new space. Essentially, my computer turned from a dual-boot 160 GB drive to a Windows-only 80 GB drive.

Is there a way to recover that space without reinstalling Windows? Either from Windows or using live CDs?
 
Old 10-30-2007, 02:35 AM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 5, Linux Lite
Posts: 4,312

Rep: Reputation: 208Reputation: 208Reputation: 208
There are plenty of freeware partition managers for winblows. Just google freeware partition manager.
 
Old 10-30-2007, 02:48 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,833

Rep: Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820Reputation: 1820
Any decent (Linux) liveCD should do - open a terminal and post the output from "/sbin/fdisk -l"
 
Old 10-30-2007, 03:10 AM   #4
emeut
LQ Newbie
 
Registered: Jul 2007
Posts: 15

Rep: Reputation: 0
Partition problem:half of my hard drive turned useless

Hi

You could try to use your window Xp to solve the issue.
Go to control panel
then administrative tools
computer management


You should get a window showing your differents drives and partitions.
If for some reason gqarted did not worked properly you should be able to delete the linux partion and format it in fat32.

from there your windows should see your new partition.

hope this is useful to you

emeut
 
Old 10-30-2007, 08:58 AM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
This is not what you requested, but I would not use a 160GB drive that way. I would recommend smaller partitions (~10-15GB each) for the operating systems, maybe 60-80GB for shared data, and the rest blank (unpartitioned) for future changes.
I now use ext3 for all shared data. Windows accesses it using the ext2fsd driver.

Be sure to backup (and maybe de-fragment) before attempting to resize a Windows partition.

Nomenclature: I don't think there's any such thing as "virtual partitions" inside other partitions. The fdisk suggestion will tell us what you have.
 
Old 10-30-2007, 11:57 AM   #6
Executor21
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
OK, thank you for your replies.

{BBI}Nexus{BBI}: I do have a partition manager. The problem is what it says about my disk (see below).

pixellany: thanks, but before I try anything, I want to have my whole drive available to me.

emeut: I did. What I got was even more confusing than I had from third-party partition managers.

Here is a screenshot. The computer management actually contradicts itself in the two parts. If I had done it correctly, it would show a 145 GB NTFS partition, with 47.7 GB used and the rest free.

Here's the output of /sbin/fdisk -l:

Code:
Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           6       48163+  de  Dell Utility
/dev/sda2   *           7       18982   152424720    7  HPFS/NTFS
/dev/sda3           18983       19452     3775275   db  CP/M / CTOS / ...
 
Old 10-30-2007, 12:37 PM   #7
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
It would appear to me a defective application with an old version of Gparted.

The partition has been enlarged and the boundary changed but XP has not been told of the new size.

The resizing should have been done using the current version of Gparted or Parted Magic.

I would try to back up the dat and then use the latest partition tool to see if it can correct the mistake.
 
Old 10-30-2007, 02:01 PM   #8
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
check to see what is eating all your disk space on the windows side.. could be you have some huge temp files out there. I found over 50 GB, yes that was 50 GB of temp data, on my Boss's 80 GB hard drive, from his home computer, when he complained the drive was full..

scdiskinfo is a good windows utility to track down where the space on your windows box is being used..
 
Old 10-30-2007, 02:33 PM   #9
Executor21
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
I tried to resize the partition using QParted on my Knoppix live DVD. I forgot to unmount it first, so it didn't let me. When I unmounted it and launched QParted again, here's what I got:

Screenshot

This is what it's supposed to show: a 145 GB NTFS partition, with 47.7 GB used. However, when I launched Windows, nothing changed. It still shows up as a 63.4 GB partition, with 47.7 GB used.

QParted is the only partition manager that shows what's supposed to be there. Should I use it to resize the partition, and hope Windows recognizes the change this time?
 
Old 10-30-2007, 02:49 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I am lazy....

When I get into things like this, I simply re-install everything.

Just a guess: The partition table entries have data in the old CHS format AND the more modern and rational LBA. Is it possible that Windows reads one and Linux reads the other? If I were to try and hunt this one down, I would dump out the raw data and see if it is all internally consistent. But--as I said--I am lazy.

If you want to try, you can get the raw data thusly:

dd if=/dev/sda bs=1 count=64 skip=446|hexdump -C

To analyze it: http://ata-atapi.com/hiwtab.htm
 
Old 10-30-2007, 02:54 PM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
You can have a healthy filing system with filing index not using up the entire partition space.

It is quite dangerous to switch partitioning tools around.

As far as Linux is concerned the partition boundary as stated in the partition table is the full size. You can load another 100 distros and seek advice another partitioning tools that will not get changed. Your problem is the XP does not accept the change.

It could also be due to your XP is using a backup as it may regard the partition change unauthorized. Vista certain does that. You can do your change but a MS Windows with such feature switched on may keep restoring the previous known safe copy of itself.

Last edited by saikee; 10-30-2007 at 02:56 PM.
 
Old 10-30-2007, 03:35 PM   #12
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Mint, Arch, Debian7
Posts: 184

Rep: Reputation: 22
There are some great links in your answers.
In addition, you must backup your personal data first, as has already been suggested.

Windows always wants the first partition.

You have a small FAT partition before your main 145G partition, this may contain drivers or other information vital to your computer, so you may need to back this partition up as well.

Primary partitions valuble, if you ever consider installing FreeBSD or Solaris then you need a spare promary partition.

It it were me, I'd backup my software and flatten the lot, create a primary ntfs partition for windows and install linux in the extended partition, this way, you will have 2 primary partitions spare.

If you dont want to go down this route, then Acronis partition manager can also resize your windows ntfs partition.
HTH
 
Old 10-30-2007, 07:13 PM   #13
Executor21
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Original Poster
Rep: Reputation: 0
Well, I managed to fix this problem.

I used QTParted on Knoppix to re-size the NTFS partition, and rebooted windows. It ran the chkdsk utility, rebooted again, and showed the correct size. Basically, my computer is now the way it was when I bought it, with the entire disk devoted to Windows.

Now I'm going to try to reinstall Linux.
 
  


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
Mount problems for hard drive partition in ubuntu 6.06 krishghosh Ubuntu 3 03-29-2007 05:03 AM
"DMA on your hard drive was turned off" what is it? trainee Slackware 12 12-27-2005 05:17 PM
I let linux hijack half my hard drive... newbe mistake shotny Linux - Newbie 6 03-03-2005 05:35 AM
Hard drive problems on root partition atheist Linux - Hardware 8 05-27-2004 07:13 PM
sound problems after half-life installation on nt partition... pdmackenzie Linux - Hardware 1 01-26-2003 08:38 AM


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