I hope that somebody can help, and I know that it is probably in the
docs, but please...
I developed a partition table error on my dual boot system, so I re
F-Disked. I kept my linux partition, cos it's important, but I lost my
swap space. I have since re-created the SWAP partition but can't figure
out how to format it.
Can somebody please help
Thanks in advance
Jason
> I developed a partition table error on my dual boot system, so I re
> F-Disked. I kept my linux partition, cos it's important, but I lost my
> swap space. I have since re-created the SWAP partition but can't figure
> out how to format it.
>
man mkswap
Chris
> I developed a partition table error on my dual boot system, so I re
> F-Disked. I kept my linux partition, cos it's important, but I lost my
> swap space. I have since re-created the SWAP partition but can't figure
> out how to format it.
Ensure that the partition type is set to swap. Then use the command
`mkswap /dev/hda2' (this assumes that the partition is the second one on
the first IDE hard drive) to initialise the swap.
Then add an entry to your /etc/fstab file like this
/dev/hda3 swap swap defaults 0 0
Now simply call /sbin/swapon to activate the swap.
Jason Clifford http://www.definitelinux.com/
Definite Linux - The UK's leading distribution with crypto support
**** Linux Workstation and Server Systems ****
To set up the appropriate stuff in a partition, CAREFULLY type
mkswap DEV, where DEV is the block special file in /dev which
represents your swap partitions, something like:
mkswap /dev/hda2
Before you attempt to swap on this partition, you will probably
have to sync first. Then, swapon /dev/hda2. I say CAREFULLY
because mkswap, like any sort of filesystem creation, is not
good for existing filesystems. You might want to run badblocks
on the partition first, although there's probably no major need
if the disk is reliable.
Your system should pick this up automatically next time you
boot, if you have the partition in your fstab.
For instance (from my /etc/fstab)
/dev/sda1 / ext2 defaults 1 1
/dev/hda2 swap swap defaults 0 0
(Anything of type swap is swapon'd at boot time with swapon -a)
a great example of why you should be very careful indeed when using commands
like mke2fs and mkswap...
SammyTheSnake
--
SammyT...@SammyServ.Tollon.co.uk SammyT...@Hotmail.com
PHUAE / S.A.Penny@(dcs.)Warwick.ac.uk (E)TLA page www.warwick.ac.uk/~phuae/
-=SF9=- a team based FPS game with AI by SammyTheSnake & JB www.symbiosys.org
primrose up 26 days, 9:55, load average: 2.40, 2.66, 2.61