LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-19-2004, 06:59 AM   #1
rmanocha
Member
 
Registered: Oct 2003
Location: Austin,TX
Distribution: Debian SID-->fully content-->Love APT,kernel 2.6.4
Posts: 327

Rep: Reputation: 30
copy linux installation from old disk to new disk


hey guys,
I have just added a new HD to my 3 year old machine. I wanted to copy over my linux installation onto the new disk.these are the steps i followed:
1)i issued this command:
Code:
cp -r /root /usr/ /boot/ .....  /mnt/new_disk/*
2)I then changed the /mnt/newdisk/etc/fstab file with the new parameters as in boot with /dev/hdb2 mounted on / and the new swap partition on the new disk.
3.)then i edited /mnt/new_disk/etc/lilo.conf and made the root=/dev/hdb2 and boot=/dev/hdb
4.)i issued this command:
Code:
/sbin/lilo -C /mnt/new_disk/etc/lilo.conf
When i reboot though..i still boot into the old disk(/dev/hda3) even though the additional swap space is picked up and i can see the swap memory at 1200 MB in gkrellm.
can someone please tell me how i am going wrong here and how to correct it.

Oh and i did not copy over /proc from the old directory since that is recreated at boot time(right??).
I am uing knoppix with kernel 2.6.3(or 7...i am not at home right now).
thanks
 
Old 07-19-2004, 08:09 AM   #2
qwijibow
LQ Guru
 
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
you need to re-install grub.

the moethod you used will work fine provided you DO NOT USE CD-RECORDDING, X or ANY GRAPHICAL USER ENVIRONMENT !

(like my caps lock abuse ?)

you forgot to tell the copy command to preserve file attributes !

i tried this before... X will not be able to load because certain files which need to be writable to the user will not be.
also, some parts of X NEED to be set to suid root.

you just made a horrible mess !

i sure hope you didnt delete the origonal install !

you can fix the OS... but it will take a LOT or trial and error fixing file attribute settings with chown and chroot.

and yes, /proc is created at boot time, but /dev/ isnt neccererily... depends on how you setup your OS and kernel. load knoppix, and mount the old OS... there may be some devices in the old mounted /dev/ directory ! but you can re-build the /dev/ directory with the make_devices script.

Last edited by qwijibow; 07-19-2004 at 08:10 AM.
 
Old 07-19-2004, 08:49 AM   #3
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
Follow the link below, here you wil find all the information you need

http://www.linux.com/howtos/Hard-Disk-Upgrade/
 
Old 07-19-2004, 01:51 PM   #4
rmanocha
Member
 
Registered: Oct 2003
Location: Austin,TX
Distribution: Debian SID-->fully content-->Love APT,kernel 2.6.4
Posts: 327

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by arno
Follow the link below, here you wil find all the information you need

http://www.linux.com/howtos/Hard-Disk-Upgrade/
I have already tried the method described in this link. Infact it is the one i followed the first time around.
It did not seem to work and i honestly cannot remember screwing up anywhere.
thanks though
 
Old 07-20-2004, 06:21 AM   #5
arno
Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: fedora core 8, suse 10.3, ubuntu 7.10, kamikaze 7.09
Posts: 515

Rep: Reputation: 30
If you follow the instructions to the letter you should at some moment remove the old disk, in this case you are force to boot the "new-disk".

If you want to use the old disk connect it again after you have finished the migration instruction
 
  


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
use dd to copy a disk ubuntu-norm Linux - Software 1 07-28-2005 02:43 PM
Reclaim disk partition from hard disk installation EStester Linux - Enterprise 2 03-09-2005 11:46 AM
Reclaim disk partition from hard disk installation EStester Linux - General 1 03-09-2005 11:25 AM
how to copy file in linux to floppy disk aiyong Linux - Newbie 3 10-17-2003 05:26 PM
Disk copy bfloeagle Linux - Hardware 4 11-16-2002 05:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:40 AM.

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