Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Partitioning & mounting - please confirm/correct my understanding

Posted on 2003-03-28
Medium Priority
Last Modified: 2008-02-01
Hi folks.

I'm learning about partitioning and mounting today, as I ran out of space on my root mount.
I started out with the following partitions:

cfdisk showed:
#      hda1              Boot              Primary        Linux ext2                                        2500.49
#      hda2                                Primary        Linux swap                                         254.99
#      hda3                                Primary        Linux                                             2500.49
#                                          Logical        Free Space                                        1192.68

Mounts were:
#  root@julia:~# df
#  Filesystem           1k-blocks      Used Available Use% Mounted on
#  /dev/hda1              2365268   2178684     64492  98% /

Not knowing if hda3 was contains information, I decided to play it safe and test this by creating a new partition (cfdisk & reboot) at /dev/hda5 (why wasn't it assigned 4 ?), used mkfs to format (is that a correct term? "build a Linux file system" sounds weird) and then mounted it succesfully.

After this, it is my understanding that hda3 is partitioned (during installation I guess), yet never formatted (and mounted), as I get the following error when I try to mount it:
#  root@julia:~# mount /dev/hda3 /tmp/testmount/ -t autofs
#  mount: wrong fs type, bad option, bad superblock on /dev/hda3,
#         or too many mounted file systems

(before I used mkfs on hda5, I tried to mount it and got this error, which lead me to my assumption that the formating step was missing)

Is my assumption correct that this space is currently unused and that all I need to do is format and mount it?

Thanks for your patience,

Question by:Monchanger
  • 2
  • 2

Accepted Solution

arn0ld earned 300 total points
ID: 8228306
i prefer fdisk -l. For my hda, this dsisplays:
Disk /dev/hda: 16 heads, 63 sectors, 29762 cylinders
Units = cylinders of 1008 * 512 bytes
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1      4160   2096608+   e  Win95 FAT16 (LBA)
/dev/hda2          4161      8161   2016504    6  FAT16
/dev/hda3          8162     12162   2016504   83  Linux
/dev/hda4         12163     29762   8870400    5  Extended
/dev/hda5         12163     16163   2016472+  83  Linux
/dev/hda6         16164     20164   2016472+  83  Linux
/dev/hda7         20165     24165   2016472+  83  Linux
/dev/hda8         24166     28166   2016472+  83  Linux
/dev/hda9         28167     29762    804352+  82  Linux swap

hda4 is the extended partition. For compatiblity, intel-86 type bios
allows 4 partitions: 3 primary, 1 extended. extended (typically 4, but can be 1-4) contains 5,6 .....  An Id of 83/Linux simply indicates the contents of 1 certain byte in the partition.

man mkfs
man  mke2fs
man fs
man fstab
man fsck

You are probably right about fomatting (mke2fs)
  mount - should not see hda3.
 grep hda3 /etc/fstab - should not be there.
  fsck /dev/hda3 - should fail with similar message as mount

Author Comment

ID: 8250429
arn0ld- I thank you for your time spent on replying, but I really need a yes or no answer here. This is a bit too risky a subject to take a "maybe" seriously.

I'm going to close this question soon with a B, unless I get something more definite.

Thanks again,


Expert Comment

ID: 8250511
yes, that is why i included 3 tests - you run any of them?

Author Comment

ID: 8252845
Thanks for suggesting running fsck on it, which failed of course. This gave me enough confidence to believe that the partition was indeed raw. I formatted the thing and now it's mounted perfectly.

I checked to see if there was a difference between running 'fdisk -l' before & after the format&mount. There was none. I guess linux people should know by heart how their hard drives are partitioned ;-)

Thanks again,



Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question