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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-30-2009, 11:20 PM
|
#1
|
Member
Registered: Apr 2009
Posts: 222
Rep:
|
External USB HD, two partitions with gparted, df shows incorrect partition sizes
OS: Debian Squeeze.
I've formatted an IO Data 500G external USB HD with gparted as follows:
partition 1: 10G FAT32
partition 2: 490G ext3
I reboot and mount the partitions (/media/usbwin, /media/usblin, respectively).
fdisk -l gives (the output relevant to the USB drive):
Code:
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x8b997317
Device Boot Start End Blocks Id System
/dev/sdb1 1 1275 10241406 b W95 FAT32
/dev/sdb2 1276 60801 478142595 83 Linux
but df -h gives:
Code:
/dev/sdb1 466G 16K 466G 1% /media/usbwin
/dev/sdb2 449G 199M 426G 1% /media/usblin
where did the 466G and 449G come from? is there something wrong with gparted, du or both?.
Cheers,
Mike.
Last edited by mike11; 12-01-2009 at 12:22 AM.
Reason: code
|
|
|
11-30-2009, 11:59 PM
|
#2
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
try du -h and see what that gives you. Or better yet try df -h df is disk free and will give you all your drives.
Last edited by exvor; 12-01-2009 at 12:00 AM.
Reason: added info
|
|
|
12-01-2009, 12:19 AM
|
#3
|
Member
Registered: Apr 2009
Posts: 222
Original Poster
Rep:
|
tnx 4 replying exvor. the above output is for df -h (see the output is with K and G).
|
|
|
12-01-2009, 06:51 PM
|
#4
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
Ahh yes I see it now. I should stop replying to 0 post threads when blurry eyed at work.
|
|
|
12-06-2009, 04:52 AM
|
#5
|
Member
Registered: Apr 2009
Posts: 222
Original Poster
Rep:
|
Seems gparted didn't do a good job.
I've solved this by: a) using fdisk to rewrite the partition table and then b) using mkfs.vfat and mkfs.ext3 to format the windows and linux partitions, respectively (of course this erases everything on the drive, which in my case was fine since the drive was still empty). Everything works fine now and df reports the correct partition sizes.
http://tldp.org/HOWTO/Partition/fdisk_partitioning.html
http://www.linuxquestions.org/questi...-drive-474470/
|
|
|
12-06-2009, 02:50 PM
|
#6
|
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537
Rep:
|
Thanks for including the links that will definitely help out other members that have this problem. You could have probably used cfdisk to do the partitioning too. It is like fdisk but has a ncurses menu instead of being totally command line. Cfdisk is my personal choice in partitioning disks even if it does aggravate me sometimes.
|
|
|
All times are GMT -5. The time now is 01:59 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|