LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-12-2005, 02:27 AM   #1
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
Fdisk can't show my partitiontable...


Im using slackware 10.2 on a SATA disc.

I wanna check out my swap space so I go into terminal typing:

fdisk /dev/sda1

Then this comes up:

The number of cylinders for this disk is set to 36203.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):

After that i type p then this shows up:

command (m for help): p

Disk /dev/sda1: 297.7 GB, 297788004864 bytes
255 heads, 63 sectors/track, 36203 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System


No tables at all.

Anybody know the solution to this?
 
Old 11-12-2005, 02:35 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
Yes:
Code:
fdisk -l /dev/sda
Everytime you've doubts about using a command, read the man page with:
Code:
man <command>
Example:
Code:
man fdisk
To check the swap, you may want to use:
Code:
free -m
Forgot to say, it probably doesn't show anything because you're pointing to a partition, you need to point to the whole harddisk, in your case, sda not sda1.

Last edited by gbonvehi; 11-12-2005 at 02:45 AM.
 
Old 11-12-2005, 02:41 AM   #3
Fluxx
Member
 
Registered: Aug 2005
Location: Bavaria, Germany
Distribution: Slackware (Current)
Posts: 225

Rep: Reputation: 30
And what happens with

Quote:
fdisk /dev/sda
I use this command to show the harddisk with all partitions.

Another possibility would be

Quote:
cfdisk /dev/sda
Fluxx.
 
Old 11-12-2005, 03:04 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
fdisk works (best ) with disks not partitions.
As mentioned above, use "fdisk /dev/sda".
 
Old 11-12-2005, 03:19 AM   #5
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Original Poster
Rep: Reputation: 30
Thanks for helping out, now im getting this:

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 36204 290808598+ 83 Linux
/dev/sda2 36205 36483 2241067+ 5 Extended
/dev/sda5 36205 36483 2241036 82 Linux swap

I was just wondering, is it 'normal' that the Linux swap partition comes up as an extended partition sda2. ?
 
Old 11-12-2005, 04:05 AM   #6
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally posted by antiloaded
Thanks for helping out, now im getting this:

Command (m for help): p

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 36204 290808598+ 83 Linux
/dev/sda2 36205 36483 2241067+ 5 Extended
/dev/sda5 36205 36483 2241036 82 Linux swap

I was just wondering, is it 'normal' that the Linux swap partition comes up as an extended partition sda2. ?
if you partitioned it this way, it's normal....
I don' t see why this can be a problem at all.
 
Old 11-12-2005, 04:10 AM   #7
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Original Poster
Rep: Reputation: 30
I didnt actually make the extended partition. I used to have Fedora on the system so I just used the partitiontable from that version.

My question is what is the extended partition for? Can i delete it?

Last edited by anti.corp; 11-12-2005 at 04:30 AM.
 
Old 11-12-2005, 07:56 AM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,153

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
Quote:
Originally posted by antiloaded
I was just wondering, is it 'normal' that the Linux swap partition comes up as an extended partition sda2. ?
Read it again - carefully this time. /dev/sda5 is the swap.
This means it is a logical partition - contained within the extended partition. This is the whole purpose of an extended partition - to contain logical partitions. It is a facility to allow more than 4 partitions per disk.
Nothing to be gained by deleting it.

BTW this is a DOS invention - has been around forever. Has nothing to do with Linux.
 
Old 11-12-2005, 01:26 PM   #9
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 53
Quote:
Originally posted by antiloaded
I didnt actually make the extended partition. I used to have Fedora on the system so I just used the partitiontable from that version.

My question is what is the extended partition for? Can i delete it?
To make it clearer what syg00 is saying....

The problem is that when people were creating the structure of the partition table in the master boot record a long time ago they kept two bits for partitions so you can only number 4 partitions.
00,01,10,11 or 1,2,3,4 if you prefer in decimal. Those are the primary partitions.
Some years after, when they saw that having only 4 partitions is a big restriction, in order to overcome this and keep compatibility with this old scheme they introduced the extended - logical partition scheme. They said "lets name one of those four primary partitions as extended, and create partitions inside this special primary partition". Those partitions are different from the other partitions (primary) because they are hosted inside a primary partition and are called logical.
From a practical point of view, the difference is that there cannot be a gap between those partitions (the second logical partitions must start were the first logical ends, because every logical partitions points to the next one, so they are not independent) and that some old O.S.s like DOS can only boot from a primary partition. Modern OSs like Linux do not have this kind of restriction.

SO as you can see of course you cannot delete the extended partition without destroying the logical partitions inside it. By deleting extended /dev/sda2 and logical /dev/sda5 and creating a primary /dev/sda2 for swap you won't loose any data because it's the swap partition, but you will not gain anything either...
 
Old 11-12-2005, 05:26 PM   #10
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Original Poster
Rep: Reputation: 30
A huge thanks for your help with Hope you will bare with me

After some studying into fdisk man pages plus the above posts im now on top of it...i think hehe.

I did a new clean partitiontable, now it looks like this:

Disk /dev/sda: 300.0 GB, 300090728448 bytes
255 heads, 63 sectors/track, 36483 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 62 497983+ 83 Linux
/dev/sda2 63 187 1004062+ 82 Linux swap
/dev/sda3 188 36483 291547620 83 Linux


A very happy

Thanks.
 
  


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 Off
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
Hard drives start at hdc && fdisk doesn't show hde triet Linux - Hardware 0 11-03-2004 09:25 PM
messed up partitiontable -help with gpart jackren Linux - General 0 05-22-2004 06:45 AM
partitiontable erased. Linux can still read disk? EyesOnly Linux - Software 8 01-17-2004 04:30 AM
To show all partitions(without using fdisk -l) arunshivanandan Linux - Newbie 18 08-04-2003 11:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:16 PM.

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