LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 12-01-2006, 01:34 AM   #1
noir911
Member
 
Registered: Apr 2004
Posts: 682

Rep: Reputation: Disabled
fdisk delima


fdisk shows I got a 146GB disk. But df shows no entry for "/dev/sda3" Moreover /dev/sda3 is showing as a Win95 slice!

I was wondering how can I safely allocate more space to /dev/sda1 using fdisk which is running out of disk space.

Quote:
athena:/ # fdisk -l

Disk /dev/sda: 146.8 GB, 146813222912 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 638 5124703+ 83 Linux
/dev/sda2 * 639 663 200812+ 83 Linux
/dev/sda3 6931 17849 87706867+ f W95 Ext'd
(LBA)
/dev/sda4 6539 6930 3148740 82 Linux swap
/dev/sda5 6931 8236 10490413+ 83 Linux

Partition table entries are not in disk order

athena:/ # df -h -P
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.9G 4.1G 890M 83% /
tmpfs 1013M 56K 1013M 1% /dev/shm
/dev/sda2 197M 39M 158M 20% /boot
/dev/sda5 11G 639M 9.4G 7% /var
 
Old 12-01-2006, 02:04 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
sda3 is an extended partition, which contains logical partitions, you can't write data to sda3, and even more so, df only shows mouted partitions.

adding the space to sda1 wouldn't be fun, you'd need to look into parted or a similar tool to move other partitions, but i'd be more interested with sda5 - what is that all about?
 
Old 12-01-2006, 02:14 AM   #3
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie
sda3 is an extended partition, which contains logical partitions, you can't write data to sda3, and even more
so, df only shows mouted partitions.
then why do I see sda3 with a Win95 id?

Quote:
Originally Posted by acid_kewpie
adding the space to sda1 wouldn't be fun, you'd need to look into parted or a similar tool to move other partitions
the disk is 146.8 GB. How can I know where's my unused/unallocated disk space?
 
Old 12-01-2006, 02:25 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Because that's what it is. They were invented by M$ when win95 came out...

Just look at the partition table itself, for example yours extended partition goes up to 17849 cylinders, which is the capacity of the disk, but the last partition ends at 8236, so you've got half your drive still unpartitioned.
 
Old 12-01-2006, 03:03 AM   #5
noir911
Member
 
Registered: Apr 2004
Posts: 682

Original Poster
Rep: Reputation: Disabled
I did the following -

Code:
zeus:~ # fdisk /dev/sda

Command (m for help): p 

Disk /dev/sda: 146.8 GB, 146813222912 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         638     5124703+  83  Linux
/dev/sda2   *         639         663      200812+  83  Linux
/dev/sda3            6931       17849    87706867+   f  W95 Ext'd (LBA)
/dev/sda4            6539        6930     3148740   82  Linux swap
/dev/sda5            6931        8236    10490413+  83  Linux


Command (m for help): n
First cylinder (8237-17849, default 8237):
Using default value 8237
Last cylinder or +size or +sizeM or +sizeK (8237-17849, default 17849):
Using default value 17849

Command (m for help): p

Disk /dev/sda: 146.8 GB, 146813222912 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         638     5124703+  83  Linux
/dev/sda2   *         639         663      200812+  83  Linux
/dev/sda3            6931       17849    87706867+   f  W95 Ext'd (LBA)
/dev/sda4            6539        6930     3148740   82  Linux swap
/dev/sda5            6931        8236    10490413+  83  Linux
/dev/sda6            8237       17849    77216391   83  Linux

Partition table entries are not in disk order
Looks like it created a new /dev/sda6 partition. I didn't save it for I fear of losing data. Would it be safe to go ahead with this one?
 
Old 12-01-2006, 03:04 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
yeah that looks fine, no danger at all.
 
  


Reply



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
memory delima GUIPenguin Linux - General 1 03-19-2006 11:37 AM
Fdisk?! erfg1 Linux - Newbie 1 03-12-2005 10:30 AM
fdisk theresaboothe Linux - Newbie 1 02-18-2005 09:19 AM
fdisk theresaboothe Linux - Newbie 3 01-28-2005 09:08 AM

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

All times are GMT -5. The time now is 12:12 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
Open Source Consulting | Domain Registration