LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-20-2007, 03:49 AM   #1
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
df and fdisk are reporting different numbers


Code:
[root:~#] du -hxs /
6.8G    /
[root:~#] df -hxs /
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdd6              21G  6.6G   14G  33% /
[root:~#] fdisk -l | grep hdd6
   Device Boot      Start         End      Blocks   Id  System
/dev/hdd6           62444       93665    15735636   83  Linux
My calculations tell me that the Blocks number tells me /dev/hdd6 is 15GB in size, which is consistent with what I remember having partitioned it to be. GParted also reports hdd6 as being 15GB.

Interesting gparted and df are reporting the same free space.

GParted

I've also included what is reported by a SuperKaramba theme for the / partition. I just assume that is using the output of df and du.
 
Old 01-20-2007, 12:46 PM   #2
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Here is the full output of fdisk -l

Code:
Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        9963    80027766    7  HPFS/NTFS

Disk /dev/hdd: 81.9 GB, 81964302336 bytes
16 heads, 63 sectors/track, 158816 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1       31222    15735636    c  W95 FAT32 (LBA)
/dev/hdd2           31222      158816    64307565+   5  Extended
/dev/hdd5           31222       62444    15735636   83  Linux
/dev/hdd6           62444       93665    15735636   83  Linux
/dev/hdd7           93665       95753     1052226   82  Linux swap / Solaris
/dev/hdd8           95754      158816    31783718+  8e  Linux LVM

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       30401   244196001    5  Extended
/dev/sda5   *           1        2611    20972794+  83  Linux
/dev/sda6            2612        5222    20972826   83  Linux
/dev/sda7            5223        7180    15727603+  83  Linux
/dev/sda8            7181        9138    15727603+  83  Linux
/dev/sda9            9139       11096    15727603+  83  Linux
/dev/sda10          11097       13054    15727603+  83  Linux
/dev/sda11          13055       16971    31463271    7  HPFS/NTFS
/dev/sda12          16972       22192    41937651   8e  Linux LVM
/dev/sda13          22193       26108    31455238+  8e  Linux LVM
/dev/sda14          26109       30401    34483491   8e  Linux LVM
Here is something else I find interesting.

Here is my /boot/grub/menu.lst or at least the portion relevant to FC6

Code:
title Fedora Core (2.6.19-1.2895.fc6)
        root (hd2,4)
        kernel /boot/vmlinuz-2.6.19-1.2895.fc6 vga=795 ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.19-1.2895.fc6.img
Does root(hd2,4) reference /dev/hdd6? I would think not as if the root option in the kernel line is set to root=/dev/hdd6, then I get this error.

EDIT: root(hd2,4) can't be /dev/hdd6 if you look at my /boot/grub/device.map. And as you can see from the fdisk above , sda5 is 20GB in size - the size reported by df in the 1st post.

Code:
[root:~#] cat /boot/grub/device.map
# this device map was generated by anaconda
(hd0)     /dev/hda
(hd1)     /dev/hdd
(hd2)     /dev/sda

Yet my /etc/fstab shows this for the root partition

Code:
/dev/hdd6               /                       reiserfs defaults        1 1
And gparted sees sda5 as a root partition

Last edited by Jongi; 01-20-2007 at 12:50 PM.
 
Old 01-20-2007, 12:59 PM   #3
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
The install that is causing all these problems is FC6. When I installed it I did one of two things:

1. Installed it on /dev/hdd6, which was the partition FC5 was on, or

2. Installed it on /dev/sda5 saw that it installed fine and then formatted the partition /dev/hdd6.

I am pretty sure that 2 was the route I took. I tried to add the below to grub

Code:
title Fedora Core Test
        root (hd1,5)
        kernel /boot/vmlinuz-2.6.19-1.2895.fc6 vga=795 ro root=/dev/hdd6 rhgb quiet
        initrd /boot/initrd-2.6.19-1.2895.fc6.img
This returned an Error 15: File Not Found
 
Old 01-20-2007, 01:24 PM   #4
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
It would seem that my recollection of how I installed was correct, ie it was option 2 above. So I changed the reference in the fstab to /dev/sda5. Before I did this I boot into Kubuntu and ran:

mount -t reiserfs /dev/hdd6 /mnt/test
ls /mnt/test

mount -t reiserfs /dev/sda5 /mnt/test
ls /mnt/test

It was only with the second set of commands that ls returned anything. So I changed the FC6 fstab within Kubuntu and rebooted into FC6. Now the results show:

Code:
[root:~#] du -hxs /
6.9G    /
[root:~#] df -hxs /
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              21G  6.6G   14G  33% /
I'm surprised that the fstab allowed /dev/hdd6 to be mounted as root, yet an ls / was running of the /dev/sda5 partition.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 09:26 PM
manipulating 64 bit numbers using 32 bit numbers. rajesh_b Programming 3 09-15-2006 09:03 AM
sequence of numbers, how to extract which numbers are missing jonlake Programming 13 06-26-2006 03:28 AM
Reporting bugs in 10.1? RedDwarf Mandriva 1 02-01-2005 10:34 AM
Adding numbers, break on non-numbers... Cruger Programming 1 03-22-2004 09:18 AM

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

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