SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576
Rep:
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
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.
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.
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...
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576
Original Poster
Rep:
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.