LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Add swap partiiton manually? (https://www.linuxquestions.org/questions/slackware-14/add-swap-partiiton-manually-540136/)

fireball003 03-24-2007 04:24 AM

Add swap partiiton manually?
 
I've installed Slackware 11 and Solaris 10 last night. During Solaris installation I deleted the swap partition for some reason, but now I can't add my swap partition in Slackware.

How can I add swap partition in Slackware manually?

partition table:
/dev/hda1 1 1824 14651248+ 83 Linux
/dev/hda2 * 1825 3737 15366172+ bf Solaris
/dev/hda3 3738 3924 1502077+ 82 Linux swap

Thanks in advance.

syg00 03-24-2007 05:22 AM

Code:

mkswap /dev/hda3
swapon /dev/hda3

Update fstab as appropriate.

fireball003 03-24-2007 06:46 AM

Quote:

Originally Posted by syg00
Update fstab as appropriate.

Thanks a lot. It works fine.

But why I need to update fstab? Because It works fine and shows the swap partition after reboot. If something else is there then plz tell me how will I update fstab?

digen 03-24-2007 07:19 AM

It's showing because there is probably an entry for /dev/hda3 as swap. You may confirm for the same, cat /etc/fstab

If you want to create and use a new swap partition, the information has to be entered in /etc/fstab to permanently make use of it when the system boots.

cwej 04-09-2007 02:47 PM

dign:

I also add my thanks...I didn't ask, but found this post doing search. I had same problem when I got an error on boot one day.

This worked great for getting swap going for the current session...

sudo mkswap /dev/hda5
sudo swapon /dev/hda5

But, what are the edits for /etc/fstab to make the swap permanent so that its there everytime I reboot?

Right now when I run cat /etc/fstab I get:

{quote}

# /etc/fstab: static file system information
#
#<file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/hda1 -- converted during upgrade to edgy
UUID=a5549dd-f158-447f-81b2-20c33965d / ext3 defaults,errors=remount-ro 0 1
# /dev/hda5 -- converted during upgrade to edgy
UUID=6e58e1a4-1742-46d4-a5b1-bd279b77441c none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

{end quote}

General Failure 04-09-2007 03:00 PM

The line is:
Code:

#<file system> <mount point> <type> <options> <dump> <pass>
 /dev/hda5    swap          swap  defaults  0      0


cwej 04-09-2007 04:35 PM

General F: Worked like a champ! Thanks!

General Failure 04-09-2007 05:04 PM

You're welcome :)
You might want to comment out the other swap entry in fstab (the one that doesn't work):
Code:

#UUID=6e58e1a4-1742-46d4-a5b1-bd279b77441c none swap sw 0 0
Edit: And no comment on why this Ubuntu UUID crap thing doesn't work :D


All times are GMT -5. The time now is 11:29 PM.