[SLUG] swap file creation

2000-06-14 Thread Ben Donohue

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?



--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text



Re: [SLUG] swap file creation

2000-06-14 Thread DaZZa

On Thu, 15 Jun 2000, Ben Donohue wrote:

 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)

Create partition {which you've done}

mkswap /dev/hdaX - replacing X with your partition number.
Edit /etc/fstab and add the correct line - it should look something like
this

/dev/hdaX   swapswapdefaults0 0

That format might not be exactly correct - someone could jump in here and
point it out exactly, since my Linux box is at home, and I'm not, so I
can't confirm my off the top of my head outline.

 what's the way forward?

The way forward is slow and troubled, my son, but learn well, Glasshopper,
and soon you will be enlightened.

DaZZa

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text



Re: [SLUG] swap file creation

2000-06-14 Thread Tony Cook

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   swapswapdefaults   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 [EMAIL PROTECTED] with
unsubscribe in the text



Re: [SLUG] swap file creation

2000-06-14 Thread Ben Donohue

hi again slugs,
sorry about this,
the swap partition is not being very friendly.

i've created the swap partition with fdisk
i've changed the id to linux swap (82)
rebooted. (yeah i know... just like windows)

mkswap /dev/hda3
setting up swapspace version 0, size = 103215104 bytes

swapon -a
swapon: /dev/hda3: device or resource busy.

fstab has swap in /dev/hda3. this is where swap was origionally.
reboot again but swap failing
always busy when swapon /dev/hda3 is typed as well.

any more ideas grandmasters?


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text



Re: [SLUG] swap file creation

2000-06-14 Thread Tony Cook

On Thu, 15 Jun 2000, Ben Donohue wrote:

 hi again slugs,
 sorry about this,
 the swap partition is not being very friendly.
 
 i've created the swap partition with fdisk
 i've changed the id to linux swap (82)
 rebooted. (yeah i know... just like windows)
 
 mkswap /dev/hda3
 setting up swapspace version 0, size = 103215104 bytes
 
 swapon -a
 swapon: /dev/hda3: device or resource busy.
 
 fstab has swap in /dev/hda3. this is where swap was origionally.
 reboot again but swap failing
 always busy when swapon /dev/hda3 is typed as well.
 
 any more ideas grandmasters?

I get the above error if I run swapon -a too - because the device is
already being used as swap.

Check if the device is already being used for swap:

swapon -s


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text



Re: [SLUG] swap file creation

2000-06-14 Thread Matthew Dalton

Ben Donohue wrote:
 mkswap /dev/hda3
 setting up swapspace version 0, size = 103215104 bytes
 
 swapon -a
 swapon: /dev/hda3: device or resource busy.
 
 fstab has swap in /dev/hda3. this is where swap was origionally.
 reboot again but swap failing
 always busy when swapon /dev/hda3 is typed as well.
 
 any more ideas grandmasters?

Perhaps you still have /dev/hda3 in your /etc/fstab as a normal
partition?
--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text



Re: [SLUG] swap file creation

2000-06-14 Thread DaZZa

On Thu, 15 Jun 2000, Ben Donohue wrote:

 i've created the swap partition with fdisk
 i've changed the id to linux swap (82)
 rebooted. (yeah i know... just like windows)
 
 mkswap /dev/hda3
 setting up swapspace version 0, size = 103215104 bytes
 
 swapon -a
 swapon: /dev/hda3: device or resource busy.
 
 fstab has swap in /dev/hda3. this is where swap was origionally.
 reboot again but swap failing
 always busy when swapon /dev/hda3 is typed as well.

Is your disk fsck'd? Could be something is drastically wrong with the disk
- since the swap space was there, and now it's gone away.

Is /dev/hda3 attempting to be mounted somewhere else in fstab? Try typing
"mount" on its own, and see if /dev/hda3 is listed somewhere.

DaZZa

--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text