LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 06-02-2011, 04:01 PM   #1
lazerking9
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu
Posts: 24

Rep: Reputation: 12
partition trouble gParted


Okay, here's my situation- im running an HP laptop, dualbooting win7/ubuntu 11.04, or rtaher, i WOULD be...

I am trying to manually partition my HDD so that i have
-Windows partitions (the SYSTEM and the main "C:\" drive)
-partition for my personal files, accessable in ubuntu AND windows (NTFS)
-ubuntu itself (11.04 studio).
I have the windows and the personal partition working fine- i even started moving over my music, documents, etc. I opened up gparted from a live CD to make the ubuntu partitions (swap and ext4, i believe). Before i can do anything, gParted gives me a huge list warning about my Windows partition, all of which look like this:

Quote:
ntfsresize v 2.0.0 (libntfs 10:0:0)
Device: /dev/sda2 **(my main "C:\" drive in windows)
Checking filesystem consistency...
accounting clusters...
Cluster accounting failed at 1144554 (0x1176ea): extra cluster
in $Bitmap
cluster accounting failed at 1180814 (0x12048e): extra cluster
in$Bitmap
Cluster accounting failed at 1180815 (0x12048f): extra cluster
in $Bitmap

...
on and on the list goes... i can see 12 such messages, and then its cut off by the bottom of my screen. I ran a full chkdsk in windows at startup, and it hasn't found any problems...

on top of that, it won't let me shrink windows partition so I can move the free space to where I need it... are these connected?

okay, so A)what's happening with these waning messgaes in gParted
B)how do I fix them (non-destructively, if possible)
c)how do I make gParted shrink out the empty space from Windows?

~~~~alec

PS: here's my current disc info:
Code:
ubuntu@ubuntu:~$ sudo fdisk -l -u

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x0008cb12

   Device boot      Start         End      Blocks  Id  System
/dev/sda1   *        2048      206847      102400   7  HPFS/NTFS
Partition1 does not end on cylinder boundary.
/dev/sda2          206848   528718511   264255832   7  HPFS/NTFS
/dev/sda3       528719872   625139711    48209920   7  HPFS/NTFS

ubuntu@ubuntu:~$
SDA1 is the widows system partition, sda2 is windows itself, "C:\", sda3 is my "personal" partition, "D:\".
 
Old 06-02-2011, 04:08 PM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
I don't know about those error-messages, but I would recommend to shrink the Windows partition with Windows' partition manager, since Vista it is perfectly capable of doing that.
 
Old 06-02-2011, 05:54 PM   #3
lazerking9
LQ Newbie
 
Registered: May 2011
Distribution: Ubuntu
Posts: 24

Original Poster
Rep: Reputation: 12
Partition Manager isn't letting me shrink sda2 / C: partition either- I have almost 80gb free! Is there something I'm doing wrong (or not doing at all?)
 
Old 06-02-2011, 08:40 PM   #4
Karl Godt
Member
 
Registered: Mar 2010
Location: Kiel , Germany
Distribution: once:SuSE6.2,Debian3.1, aurox9.2+3,Mandrake?,DSL? then:W7st,WVHB, #!8.10.02,PUPPY4.3.1 now:Macpup
Posts: 308

Rep: Reputation: 45
There is a bunch of ntfs* commands for the console , try nt[TABTAB] for more info and since ubuntu comes with manpages :
Code:
man ntfsresize
Gparted (GUI) might be a little overcautiously . Some commands like umount return an Errorcode of 1 , even if they are successful . And if Gparted is programmed like loop 12 times and then exit it exits .
for example :
Code:
mkdir -p /mnt/sda3
mount /dev/sda3 /mnt/sda3
Err=$?
echo $Err
umount -l /dev/sda3
UErr=$?
echo $UErr
Code:
modprobe -h || Err=$? && echo $Err
###might be a good example , I guess this h: bug inside modprobe.c still exists on ubuntu

Nevertheless use an older Gparted , wait for a newer one , use or not use the "Round to cylinders" checkbox of the GUI or do it manually .

I am only using ext-fs
but as an example , you can create a ramdisk like
Code:
mkfs.ext2 -v -b 1024 -i 1024 /dev/ram8
in RAM an play a little with that .
 
Old 06-02-2011, 08:43 PM   #5
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,120

Rep: Reputation: 817Reputation: 817Reputation: 817Reputation: 817Reputation: 817Reputation: 817Reputation: 817
Your fdisk output above shows a minimal amount of space between sda2 and sda3 as well as at the end of sda3. Where are you seeing that you have 80GB of free space? Have you made a change since you posted your fdisk info? Are you using GParted or the windows Partition manager? It would help if you listed the specific steps you take and results.
 
Old 06-03-2011, 02:12 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
The OP stated clearly that he can't resize his Windows partition, neither with GParted nor with the Windows partition manager, although he has 80GB of free space on that partition.
 
Old 06-03-2011, 10:09 AM   #7
Karl Godt
Member
 
Registered: Mar 2010
Location: Kiel , Germany
Distribution: once:SuSE6.2,Debian3.1, aurox9.2+3,Mandrake?,DSL? then:W7st,WVHB, #!8.10.02,PUPPY4.3.1 now:Macpup
Posts: 308

Rep: Reputation: 45
This is the first functional shellscript to play with the commands :
Code:
#!/bin/ash
for i in `mount | grep 'ram0' | cut -f 3 -d ' ' |sort -r` ; do
echo $i
umount -l $i
sleep 3s
rmdir $i
done
mkdir -p /mnt/ram0
mkfs.ext2 /dev/ram0
mount -t ext2 /dev/ram0 /mnt/ram0
dd if=/dev/zero of=/mnt/ram0/part1 bs=1048576 count=3
mkswap /mnt/ram0/part1
swapon /mnt/ram0/part1
cat /proc/swaps
ls -ls /mnt/ram0
free
df
dd if=/dev/zero of=/mnt/ram0/part2 bs=1048576 count=4
mkfs.ext2 /mnt/ram0/part2
mkdir -p /mnt/EXT2
mount -t ext2 -o loop /mnt/ram0/part2 /mnt/EXT2
df
dd if=/dev/zero of=/mnt/ram0/part3 bs=1048576 count=5
mkfs.ntfs -F -H 100 -S 5 -s 256 -p 0 /mnt/ram0/part3
mkdir -p /mnt/NTFS
mount -o loop -t ntfs /mnt/ram0/part3 /mnt/NTFS
df
umount -t ntfs /mnt/NTFS
ntfsresize -s 3M -f -v /mnt/ram0/part3
And you can use
Code:
ntfscluster -if /mnt/WINDOWSPARTITION
to gain the needed variables like SECTORS/HEADS ....

For fsck'ing I have fsck.msdos and fsck.vat available but it might be a fsck.ntfs available on ubuntu .
 
  


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
Invalid partition table for swap partition that I moved with Gparted keith9e Linux - Hardware 16 02-10-2010 01:21 PM
Gparted: Joining 2 partition ext3 within one partition (data saved) Davno Linux - Software 1 12-11-2009 05:24 PM
Trouble installing gParted 0.3.1 from source. truthfatal Linux - Software 5 04-07-2008 04:33 PM
Gparted for a new partition mcbenus Linux - Software 10 09-09-2007 09:37 PM
trouble mounting multiple partitions in Gparted shadowsnipes Linux - General 2 07-01-2006 01:37 AM


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