Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 07-24-2006, 12:16 AM   #1
Registered: Jan 2006
Distribution: Fedora 4, 5
Posts: 30

Rep: Reputation: 15
Question Swap on new HDD

I'm thinking of getting a new 80 gig hard drive for my Linux box. But before I do, i need to know how to move my swap partition. This is the current partition layout of my linux system:

dev/hda1.........FC5 Partition (EXT3)
dev/hda2.........MediaFiles (EXT3)
dev/hdb1.........Storage (EXT3)
dev/hdb2.........*Swap* (SWAP)

I was thinking maybe I could put the new HDD in my Windows machine, and use Partition Magic to create the partitions, then swap it into my Linux machine. But then Linux will need to know what partition is where on the new HDD. The whole thing seems kinda complicated, but I don't want to have to reinstall everything again. Any ideas?
Old 07-24-2006, 01:38 AM   #2
Registered: Nov 2005
Distribution: Slackware, and of course the super delux uber knoppix universal live recovery cd
Posts: 429

Rep: Reputation: 30
well, if you have a running fedora installation its pretty easy.
1. throw the new drive in.
2. open up a console and type "cfdisk /dev/hdc"
3. make a swap partition on it.
4. quit cfdisk and type "swapoff /dev/hdb2"
5. "type swapon /dev/hdc1"
6. then edit /etc/fstab, look for /dev/hdb1 swap ** ** ** and change it to /dev/hdc1
7. Use a program called QTparted to resize your /dev/hdb1

thats it, should take you about 10 mins.
Old 07-24-2006, 02:57 AM   #3
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,795

Rep: Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157Reputation: 2157
Better stick in a;
4a. "mkswap /dev/hdc1"

And personally I'd do the swapon before I attempted the swapoff - just in case ...
Old 07-25-2006, 12:10 AM   #4
Registered: Jan 2006
Distribution: Fedora 4, 5
Posts: 30

Original Poster
Rep: Reputation: 15
Thanx peeps!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using usb hdd as swap space linuxmandrake Linux - General 4 09-17-2006 01:02 PM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 12:57 PM
can i use the same HDD after a MOBO swap? DeltaXFX Linux - Newbie 4 06-11-2004 09:23 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 01:23 AM
Toter Swap auf 2. HDD --> Kein Zugriff mehr auf alte Partition / Installation Naschkatze82 Linux - Newbie 2 09-20-2003 05:07 PM > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration