[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [SLUG] swap file creation
On Thu, 15 Jun 2000, Ben Donohue wrote:
> hi slugs,
> i've deleted/lost the swap partition.
> there is room on the HDD for a swap partition, so how does one go about
> creating a new swap partition?
> ie what's the command to create a new swap partition.
>
> i've tried fdisk.
> created a new partition.
> changed it's id from 83 (linux ext2) to 82 (linux swap)
> but on booting the swap is not found.
> what's the way forward?
Creating the partition is the first step, you need to do two other things
to make your swap partition work on boot:
a) setup the swap space with mkswap - see man mkswap for details
b) tell the system you want this to be swap space by adding a line to
/etc/fstab. eg.:
/dev/sda5 swap swap defaults 0 0
If you don't want to reboot to activate the swap space you can use the
swapon command, "swapon -a" to activate all the swap partitions in
/etc/fstab or "swapon device" to activate the swap on a particular device
- see man swapon for details (priorities can be useful if you have more
than one physical device, or if you're using swap files.)
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to slug-request@nospam.slug.org.au with
unsubscribe in the text