View Full Version : position of the swap partition

Rico da halvarez
01-28-2003, 05:40 PM

Just a little doubt :
I had installed knoppix on my hd
I have 3 partitions :

hda1 --> winslow98
hda5 --> linux
hda6 --> swap

The doubt : a swap partition can be at the end of the drive, or it's better to set it at the begining of the logical partition ?
Why hda5 and not hda2 ?



01-28-2003, 06:13 PM
The reason your two linux partitions are /dev/hda5 and /dev/hda6 is because your drive was fdisked with DOS/windows, which only allows one primary partition, the second partition has to be an extended partition in DOS. So when you put linux on your HD it went in the extended partition, linux names the extended partition /dev/hda4 and logical partitions are placed inside of it so your first linux partition is /dev/hda5 and your swap is /dev/hda6. BTW linux fdisk allows up to four primary partitions, or three primary and one extended.

I've heard some people say that having the swap at the front of the drive will be slightly faster, many "canned" installs, e-smith router/server for example, make a small /boot partition, then do the swap, and then fill the remaining space with your / partition, which is the easiest way to do it.



01-29-2003, 01:56 PM
thX :D

01-29-2003, 08:15 PM
Just another question about partitioning tools

actually my partition table is :

hda1 : win98 (primary)
hda5 : / logical
hda6 :swap logical

I would use GNU parted to set it as you told me :

hda1 win98 unchanged
hda5 /boot ~30Mo
hda6 swap moved but not resized
hda7 / moved & resized

My questions are motived by my ignorance of the combination of the différent options of the parted command, I naturaly, the fear of a HD damage caused by a wrong manipulation...

What are parted commands for :

moving hda6 to the actual place of hda5

resizing hda5 to give space to a 30Mo /boot partition

creating the /boot partition and initialising it
:?::?::?::?::?::?::?::?::?::?::?::?::?::?::?::?::? :