Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Linux Software => Linux Installation Support => Topic started by: fuzzylogic25 on June 03, 2009, 07:59:06 AM

Title: Installed Ubuntu, ran GParted and have an issue now?
Post by: fuzzylogic25 on June 03, 2009, 07:59:06 AM
Hi,

I just installed Ubuntu, and I already had windows XP in a separate partition. This is my first time installing Linux.

I have a 500GB drive, 20GB is a primary NTFS partition for win xp. I set linux to use the remaining space at installation time. Once installed, I checked the properties of the parition linux is using which is called "Filesystem" through File -> Properties and it said the following:

Ubuntu filesystem properties
---------------------------------------------------------------
Hard disk space used: totalling 3.2GB (some files unreadable)
Freespace: 409.5GB
---------------------------------------------------------------

Then i ran Gparted, because I actually only wanted 30GB for the parition, and remaining space to be used as data partition which will be NTFS. Gparted stated following information when i ran it:

What GParted saw before making any changes
---------------------------------------------------------------
/dev/sda1 : ntfs Size:19.53G; Used: 11.11G; Unused: 8.42G; boot flag
/dev/sda2 : extended Size: 446.23GB
/dev/sda5 ext3 Size: 440.47gb; Used: 8.97; Unused: 431.51
/dev/sda6 linux-swap Size: 5.75gb
---------------------------------------------------------------

Then what I wanted to do was set /dev/sda5 down to 30GB, and move the /dev/sda6 (linux-swap) to just after the /dev/sda5. That way, the remaining space which is going to be data partition in NTFS can be put at the end of disk.

So this is what I set the conditions to be:

Changes I wanted to make: (resize ext3 partition down and move linux-swap from end of disk to just after ext3 partition)
---------------------------------------------------------------
/dev/sda1 : ntfs Size:19.53G; Used: 11.11G; Unused: 8.42G; boot flag
/dev/sda2 : extended Size: 446.23GB
/dev/sda5 ext3 Size: 29.29GB; Used: 8.97GB; Unused: 20.33GB
/dev/sda6 linux-swap Size: 5.75gb
new partition #1 411.18
---------------------------------------------------------------

After I ran this process, i got the following information form GParted:

GParted view on disk partitions after I made changes
---------------------------------------------------------------
/dev/sda1 : ntfs Size:19.53G; Used: 11.11G; Unused: 8.42G; boot flag
/dev/sda2 : extended Size: 446.23GB
/dev/sda5 ext3 Size: 29.29GB; Used: 2.49GB; Unused: 26.8GB
/dev/sda6 linux-swap Size: 5.75gb
new partition #1 411.18
---------------------------------------------------------------

And when I when I booted up Ubuntu to check the properties of the FILESYSTEM disk like it did initially I got:

---------------------------------------------------------------
Hard disk space used: totalling 2.6GB (some files unreadable)
Freespace: 25.3GB
---------------------------------------------------------------

My question is, after I did a resize, why has the space used according to Ubuntu changed from 3.2GB down to 2.6GB? Have I lost some data that was there from the installation process?

And according to GParted, why does it say the used space was 8.97GB for that drive but now saying 2.48GB? Have I lost that much data?
Title: Re: Installed Ubuntu, ran GParted and have an issue now?
Post by: moss on June 04, 2009, 12:58:30 PM
Hi

Gparted moves data securely. First of all it checks the file system for errors and corrects them if possible. I can only guess that it has corrected certain errors in the journal or inodes (or whatever is the term I'm looking for here)  which were noting the space used incorrectly. That said I'm not an expert though I have been using linux for over 10 years. If Ubuntu boots OK then you should be fine. Do you know what the installed size should be? Did you install from a live CD or installation disks?

However, XP is ignorant and if you now use it create your large ntfs data partition I'm not sure that it won't stray onto the swap partition. Windows generally can be sloppy as to how it divides the disk up. A better scheme might have been to create the data partition as a primary one next to the XP system partition and then install Ubuntu on the remaining free space.

Good Luck

Title: Re: Installed Ubuntu, ran GParted and have an issue now?
Post by: fuzzylogic25 on June 04, 2009, 02:16:12 PM
i was considering on doing that first (create a data partition first then do the linux partitions) but that means my linux partitions are at the end of the disk and transfer/access times are much slower at that end. so tahts why i put it just after windows.

They are all fresh installs too, so i dont see why there are all these inconsistencies. what does it mean when it says (some files unreadable)?

Also, i noticed AFTER the resizing, the file count while in ubuntu was less. maybe 20 or so files less i cant remember.
Title: Re: Installed Ubuntu, ran GParted and have an issue now?
Post by: moss on June 05, 2009, 12:08:53 PM
OK, I understand because I'm just the same myself. "This computer is my stuff and I have the right to use my stuff exactly as I want to!"

Then I'd like to suggest this, if you think you still have difficulties. Get an Ubuntu live-cd and boot it from the cd. Use gparted to make 4 primary partitions: your original XP, the Ubuntu partition, a swap partition and then the data partition last. Allow gparted to do all the file system formattting as it is very good these days. The warnings are still given about losing data since although it is now rare it is technically still possible. Besides it is always good practice to back up before such proceedures as it is a lot more hassle when the data needs to be recovered.

The "unreadable" files and the missing files are likely to be the same thing. Something got untidy on the disk and has now been cleaned up.
Title: Re: Installed Ubuntu, ran GParted and have an issue now?
Post by: moss on June 06, 2009, 09:54:09 AM
Forgot to say one important thing. There is an occasion on which gparted stands to wipe out everything on a partition.

Suppose your large data partition at the end of the disk becomes to full and you decide to remove the two  intermediate linux partitions and expand DATA into the free space before DATA. In this case you will very likely lose everything  -although it ought to be recoverable with testdisk. This does not if the partion is extended after DATA.

So the moral is always back up before big jobs and be on the safe side.

Regards