LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Blogs > divukman
User Name
Password

Notices

Rate this Entry

switch to new hard drive

Posted 12-14-2005 at 07:33 PM by divukman

Aloha,

Let's say you have a new hard drive and want to transfer all files from your
old one, including your fancy linux system. No problem, no problem at all,
but there's nothing I can do about it ? ahha :) not quite...

I'll write a bit more thorough tutorial, but here are just basic steps for
now.

1. Plug the drive :) who would have guessed, if it's ata then take the
jumper off and put the jumper on the old drive to slave, believe me ;)

2. Boot with live cd, let's say knoppix ;)

3. make dir's oldboot and newboot

4. mount old drive to oldboot

5. partition new drive to suit your needs
- go wild and have each partition different fileystem, as my friend does
:)

6. mount new drive to newboot

7. copy files, "cp -aR /oldboot/* /newboot"

8. edit newboot's fstab

9. mount proc, "mount -t proc none /newboot/proc"

10. chroot to your new drive, "chroot /newboot/ /bin/bash"

11. if your on gentoo run "env update" and then "source /etc/profile", on
Debian do just the latter one, I did :)

12. install grub, "grub-install /dev/hda1"...if this doesen't work then try:
- "grub"
- "root (hd0,0)" -> MAKE SURE TO PUT BLANK SPACE
- "setup (hd0)" -> you'll get grub setup msg here
- "quit"

if you keep grub on the disk hdb then these last steps are a bit different, you should then do setup on the hda, therefore steps are:
1. "grub"
2. "root (hd1,0)"
3. "setup (hd0)"
4. "quit"

13. if necessary, edit your grub's menu.lst, I sure did ;)

14. say "yarrrr"...and have some rum, you are done ;) reboot
Posted in Uncategorized
Views 2370 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    personally i wouldnt really do it this way.

    Basically i'd copy/back Home Etc and Var directories.
    and install using a linux distro CD (any distro since KDE and Gnome etc always store things in the exact same area.)
    I changed from Gentoo , Mandriva Ferdora back to Mandriva x86_64 as if i never changed anything.


    I find it quicker and easier and no messing around.
    (also ensures no bodgy librarys lying around)


    However this is a must for gentoo (compiling everything again = Yukk!
    Posted 12-31-1969 at 07:00 PM by divukman divukman is offline
  2. Old Comment
    I cant mount my second hard drive!
    Posted 12-31-1969 at 07:00 PM by divukman divukman is offline
 

  



All times are GMT -5. The time now is 06:56 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration