LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices

Reply
 
Search this Thread
Old 07-24-2006, 01:16 AM   #1
MoonlitSky
Member
 
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, 02:38 AM   #2
chrisortiz
Member
 
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, 03:57 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,448

Rep: Reputation: 1069Reputation: 1069Reputation: 1069Reputation: 1069Reputation: 1069Reputation: 1069Reputation: 1069Reputation: 1069
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, 01:10 AM   #4
MoonlitSky
Member
 
Registered: Jan 2006
Distribution: Fedora 4, 5
Posts: 30

Original Poster
Rep: Reputation: 15
Thanx peeps!
 
  


Reply


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 02:02 PM
Linux swap / solaris not appearing as swap in Ubuntu? Erik_the_Red Linux - Newbie 1 07-30-2005 01:57 PM
can i use the same HDD after a MOBO swap? DeltaXFX Linux - Newbie 4 06-11-2004 10:23 PM
How to unmount actual swap and mount a new(bigger) swap space? isaac Linux - Newbie 1 06-06-2004 02:23 AM
Toter Swap auf 2. HDD --> Kein Zugriff mehr auf alte Partition / Installation Naschkatze82 Linux - Newbie 2 09-20-2003 06:07 PM


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

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