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/* 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 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 |
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. |
Follow the link below, here you wil find all the information you need
http://www.linux.com/howtos/Hard-Disk-Upgrade/ |
Quote:
It did not seem to work and i honestly cannot remember screwing up anywhere. thanks though |
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 |
All times are GMT -5. The time now is 11:36 AM. |