LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-12-2001, 10:58 PM   #1
kngharv
Member
 
Registered: Nov 2001
Location: China, USA
Distribution: SUN JDS/SUSE 9.1
Posts: 33

Rep: Reputation: 15
stupid questions on replacing harddrive


When I first installed my Redhat 7.1, I only had two 1.2 gb Harddrive. Because all the packaged I wanted, I was forced to install my Linux on 2 harddrives, where one drive consist only /usr directory, another hd consist of rest of the Linux(300mb) AND 128mb Linux swap files (rest of HD are my windoz partition).

Recently, I managed to steal/beg for an old harddrive from my friend who is not using it. It has whole 4gb !!! What I want is to move my current Linux into one HD (a lot more versitle... just in case I one day want to move to another machine).

I used fdisk to partition the disk, and I also use mkfs and mkswap to make the file system and swap. I can temperary mount the new HD to something like /newHD

NOW... i am stuck.

I tempted just copy everything from my main linux partition (300mb) to the new HD. Then I was warned that it is a lot more complicated than that, especially the /proc directory.

Question 1:
Can I just do

tar clpf - / | (cd /newHD; tar xpvf-)

at the root and dont worry about it?

Question 2:
What other precaution should I take (those similiar to /proc directory)?

Question 3:
After I am done, besides /etc/fstab and /etc/lilo.conf, what other file I need to modify in order to use the partition?

Thanks in advance

Harv
 
Old 12-13-2001, 01:32 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
1. Uhm, whats against doing "cp -a"?
2. Just rm -rf /proc on the new disk, then "mkdir /proc", it's a virtual representation and fills itself when the system goes live. Check your kernel for inclusion of all modules if the new HD isn't in the same class as the old one. If you don't want to muck with your current kernel's root device parameters (man rdev), you just swap the new for the old disks position. There's no other precautions I could think of except for running fsck with the -f flag to be sure.
3. Make sure you bootcd/disk works, you'll need it to install LILO if you didn't use LILO's chroot (LILO -r) already: test your new config with "/sbin/lilo -r /newdisk -t -v".

Good luck
 
Old 12-13-2001, 01:50 AM   #3
Aussie
Senior Member
 
Registered: Sep 2001
Location: Brisvegas, Antipodes
Distribution: Slackware
Posts: 4,590

Rep: Reputation: 58
The Hard disk upgrade Mini How-to is what your looking for.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stupid questions DarkNeo Debian 2 08-31-2005 09:42 AM
Two (hopefully) Stupid Questions totalshredder Linux - Newbie 2 02-07-2005 11:03 AM
Stupid Questions zinggniz Linux - Newbie 12 10-26-2004 10:01 PM
Replacing Harddrive wickdgin Linux - Hardware 1 11-29-2002 09:05 AM
And now,some stupid questions Dynamo Linux - Newbie 4 04-30-2001 12:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:56 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration