LinuxQuestions.org
Visit Jeremy's Blog.
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 01-06-2007, 04:45 PM   #1
DataSheet
Member
 
Registered: Apr 2006
Posts: 36

Rep: Reputation: 15
How to see how many partitions I have?


Now I know that Partition mean to devide a hard drive into diffirent logical drives. but how many can partitions can I have in one hard drive?

Also how can I see how many partitions my hard drive has?

what is the command to see hard drive partitions?


Data Sheet
 
Old 01-06-2007, 04:51 PM   #2
jrtayloriv
Member
 
Registered: Jun 2004
Location: Inland NW, US
Distribution: Ubuntu
Posts: 365
Blog Entries: 1

Rep: Reputation: 44
Viewing partition tables

under linux, you could use fdisk or cfdisk to view your partition tables.

--jrtayloriv
 
Old 01-06-2007, 04:55 PM   #3
DataSheet
Member
 
Registered: Apr 2006
Posts: 36

Original Poster
Rep: Reputation: 15
[root@gangster ~]# cfdisk

bash: cfdisk: command not found

can you assist?

Data Sheet
 
Old 01-06-2007, 04:55 PM   #4
Dudydoo
Member
 
Registered: Sep 2003
Location: UK
Distribution: I use 'em all ;-)
Posts: 275

Rep: Reputation: 38
I think Linux supports 63 logical partitions on a ATA/IDE disk and 15 for SCSI.

To see what partitions your disk currently has, as root type:

Code:
/sbin/fdisk -l /dev/hdX
where X is the hard disk device. eg. /dev/hda for IDE and /dev/sda for SCSI.
 
Old 01-06-2007, 05:37 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 62
Needs to be run as root.
/sbin/fdisk -l

Or to see mount partitions.
cat /proc/partitions

Brian
 
Old 01-06-2007, 06:48 PM   #6
DataSheet
Member
 
Registered: Apr 2006
Posts: 36

Original Poster
Rep: Reputation: 15
Hey Brian,
That is what I was looking for...

root# cat /proc/partitions

Major Minor #blocks name
3 0 19551168 hda
3 1 200781 hda1
3 2 10241437 hda2
3 3 1052257 hda3

Now I know I have three partitions on my 19GB hard disk.

is there anyway to find out how much free space I have in my hard disk?

Data Sheet
 
Old 01-06-2007, 07:03 PM   #7
bhert
Member
 
Registered: May 2006
Distribution: OpenSUSE 10.3 Kubuntu Hardy Heron
Posts: 268

Rep: Reputation: 30
df -h finds out the free space on your hard disk

-bhert
 
Old 01-06-2007, 07:14 PM   #8
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Just a warning of the 63 partitions in a Pata disk.

Current cfdisk stops to disply after 59 partitions but can be used to partition up to 63.

Current fdisk stops at 60 partitions.

Use Gparted or Parted Magic to see the full list.

An example of "fdisk-l" showing the Pata limit is here. The hda there has 63 partitions, as indicated by Grub's menu.lst but hdc has only 59 partitions inside because I got a big Vista partition in hdc3.

The Sata sda and sdb have the maximum 15 partitions as reported by Dudyoo.

Last edited by saikee; 01-06-2007 at 07:16 PM.
 
Old 01-06-2007, 08:24 PM   #9
DataSheet
Member
 
Registered: Apr 2006
Posts: 36

Original Poster
Rep: Reputation: 15
[root@gangster ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 9.7G 1.8G 7.5G 19% /
/dev/hda1 190M 8.4M 172M 5% /boot
none 125M 0 125M 0% /dev/shm

df -h does not show the free space in the hard disk.

any other command?

Data Sheet
 
Old 01-07-2007, 06:09 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
I believe the state-of-art partitioning tool is the latest Gparted 3.3 which is available in Live CD. Another Live CD called Parted Magic also has this program.

The filled area and unfilled space of every partition is listed graphically.

Apart from Windows Vista, which has a mechanisim to prevent alteration to its partition table, this software can resize a partition in just above every system I tries.
 
Old 01-08-2007, 09:39 AM   #11
DataSheet
Member
 
Registered: Apr 2006
Posts: 36

Original Poster
Rep: Reputation: 15
what is Live CD? Can I download GParted 3.3 for Red Hat Linux?

Data Sheet
 
Old 01-08-2007, 09:46 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,334

Rep: Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907Reputation: 1907
A liveCD is a OS that boots from a CD and runs from RAM and does not use a hard drive. It loads/runs apps from the CD as required. There are many liveCDs that have GParted.

To see how the drive is partitioned you can use the following command
fdisk -l /dev/hda (must be root, that is a small L)
 
  


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
windows killed my partitions! no linux partitions found on this computer. The MJ Linux - Software 10 01-05-2007 09:31 AM
Question on creating more partitions than default ones, i.e. /home,/root partitions casmac SUSE / openSUSE 1 12-20-2006 06:02 PM
e2fsck: root partitions and ro mounted partitions Clemente Linux - General 4 11-06-2006 10:32 PM
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 07:15 PM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 02:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 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