Author Topic: Ubuntu disk partitioning question  (Read 1953 times)

Headless Thompson Gunner

  • friend
  • Senior Member
  • ***
  • Posts: 8,517
Ubuntu disk partitioning question
« on: January 10, 2009, 03:05:13 AM »
Point me in the right direction, plz...

I just bought a new pc (Dell mini-9 netbook) that came with Ubuntu pre-installed.  I want to look up how the hard disk is partitioned (how many partitions,how big are they, and what parts of the filesystem live on each partition).  What's the easiest way to do this?

mtnbkr

  • friend
  • Senior Member
  • ***
  • Posts: 15,388
Re: Ubuntu disk partitioning question
« Reply #1 on: January 10, 2009, 03:49:36 AM »
via the command line, type df and press enter.  It will tell you all the partitions, the mount points, and usage.

Chris

zahc

  • friend
  • Senior Member
  • ***
  • Posts: 5,803
Re: Ubuntu disk partitioning question
« Reply #2 on: January 10, 2009, 04:27:32 AM »
df -lh
Maybe a rare occurence, but then you only have to get murdered once to ruin your whole day.
--Tallpine

mtnbkr

  • friend
  • Senior Member
  • ***
  • Posts: 15,388
Re: Ubuntu disk partitioning question
« Reply #3 on: January 10, 2009, 04:43:43 AM »
zahc's command will be easier for mere mortals to read/understand. ;)

Chris

2swap

  • friend
  • Member
  • ***
  • Posts: 134
  • : 4 5 ;
Re: Ubuntu disk partitioning question
« Reply #4 on: January 10, 2009, 09:08:35 AM »
The way to see all partitions on one disk is fdisk -l device. Probably the device is either /dev/sda or /dev/hda.
: spin
  92 47 124 45 45 58 emit dup emit emit
  begin 8 emit dup emit swap 2swap key? until ;

lee n. field

  • friend
  • Senior Member
  • ***
  • Posts: 13,611
  • tinpot megalomaniac, Paulbot, hardware goon
Re: Ubuntu disk partitioning question
« Reply #5 on: January 10, 2009, 10:35:15 AM »
Quote
I just bought a new pc (Dell mini-9 netbook) that came with Ubuntu pre-installed.  I want to look up how the hard disk is partitioned (how many partitions,how big are they, and what parts of the filesystem live on each partition).  What's the easiest way to do this?

"sudo fdisk" or "sudo gparted" from a command prompt in a terminal window, to see partitions.

"mount" shows what's mounted where.

"df -h" gives sizes.

gparted will give prettier pictures.  If it's not installed, "sudo apt-get install gparted" will install it for you.
In thy presence is fulness of joy.
At thy right hand pleasures for evermore.

roo_ster

  • Kakistocracy--It's What's For Dinner.
  • friend
  • Senior Member
  • ***
  • Posts: 21,225
  • Hoist the black flag, and begin slitting throats
Re: Ubuntu disk partitioning question
« Reply #6 on: January 10, 2009, 10:39:36 AM »
Please no more posts about mini-notebooks with installed linux.  I am having a difficult time not buying one for my personal machine.
Regards,

roo_ster

“Fallacies do not cease to be fallacies because they become fashions.”
----G.K. Chesterton

Iain

  • friend
  • Senior Member
  • ***
  • Posts: 3,490
Re: Ubuntu disk partitioning question
« Reply #7 on: January 10, 2009, 10:50:10 AM »
You'll be pleased to know that my Aspire One appears to have died on me then. Not recognising anything bootable. Might have to start another thread if I can't find an obvious solution.
I do not like, when with me play, and I think that you also

mtnbkr

  • friend
  • Senior Member
  • ***
  • Posts: 15,388
Re: Ubuntu disk partitioning question
« Reply #8 on: January 10, 2009, 03:57:26 PM »
"sudo fdisk" or "sudo gparted" from a command prompt in a terminal window, to see partitions.

"mount" shows what's mounted where.

"df -h" gives sizes.

gparted will give prettier pictures.  If it's not installed, "sudo apt-get install gparted" will install it for you.

I don't have a booted linux machine handy, but df and df -lh show everything as well.  The -lh tag makes it easier to read.

Chris

Headless Thompson Gunner

  • friend
  • Senior Member
  • ***
  • Posts: 8,517
Re: Ubuntu disk partitioning question
« Reply #9 on: January 10, 2009, 04:10:37 PM »
Ok, but what about partitions that aren't part of the filesystem?

I have a 32 gb hard drive.  df can account for only 26 gb.  Where's the rest?  I assume that at least some of it is a swap space.  But 6 gigs for swap?  That seems unlikely.

What's the standard linux tool for partitioning a disk?  Google has been remarkably unhelpful.  Most info is devoted to partitioning a disk prior to installation, not viewing partitions on a system that's already been setup.

Iain

  • friend
  • Senior Member
  • ***
  • Posts: 3,490
Re: Ubuntu disk partitioning question
« Reply #10 on: January 10, 2009, 04:16:08 PM »
gparted is probably your best bet
I do not like, when with me play, and I think that you also

Headless Thompson Gunner

  • friend
  • Senior Member
  • ***
  • Posts: 8,517
Re: Ubuntu disk partitioning question
« Reply #11 on: January 10, 2009, 04:17:33 PM »
Please no more posts about mini-notebooks with installed linux.  I am having a difficult time not buying one for my personal machine.
I likes mine.  The keyboard takes some getting used to, but other than that it's a really cool tool/toy.

Go get one.  They're cheap enough.

Iain

  • friend
  • Senior Member
  • ***
  • Posts: 3,490
Re: Ubuntu disk partitioning question
« Reply #12 on: January 10, 2009, 04:20:52 PM »
I'm starting to view mine more and more as a tool. I don't even notice it in my work bag, and as we're somewhat limited on machines and space then I can set it up anywhere and check email, research etc at work. I've found it to be useful in several situations. I didn't find the keyboard on the Acer to be much to adapt to (the Dell is apparently slightly odder), but the mousepad and buttons did take some getting used to.
I do not like, when with me play, and I think that you also

lee n. field

  • friend
  • Senior Member
  • ***
  • Posts: 13,611
  • tinpot megalomaniac, Paulbot, hardware goon
Re: Ubuntu disk partitioning question
« Reply #13 on: January 10, 2009, 04:21:43 PM »
Quote
What's the standard linux tool for partitioning a disk?

fdisk or one of it's variants.
In thy presence is fulness of joy.
At thy right hand pleasures for evermore.

Headless Thompson Gunner

  • friend
  • Senior Member
  • ***
  • Posts: 8,517
Re: Ubuntu disk partitioning question
« Reply #14 on: January 10, 2009, 04:23:03 PM »
Ha!  I just figured it out.  Turns out 2swap was right, fdisk is the answer.  Thanks everyone.

MicroBalrog

  • friend
  • Senior Member
  • ***
  • Posts: 14,505
Re: Ubuntu disk partitioning question
« Reply #15 on: January 10, 2009, 05:44:43 PM »
Ha!  I just figured it out.  Turns out 2swap was right, fdisk is the answer.  Thanks everyone.

When it comes to computers, 2swap is always right. Trust me on this one. =D
Destroy The Enemy in Hand-to-Hand Combat.

"...tradition and custom becomes intertwined and are a strong coercion which directs the society upon fixed lines, and strangles liberty. " ~ William Graham Sumner