Jump to content
funtoo forums
  • 0
Sign in to follow this  
ofwar

How to migrate properly my system to another ssd disk

Question

Hi,

 

I have my funtoo system on a old hard drive and i want to transfer on a new ssd drive.

 

I think doing like this:

 

1. Boot with a livecd, like system recscue cd.

 

2. Prepare my new ssd disk, with fdisk.

    I use MBR and no ufei

 

3 Format new partition ssd disk and mount partitions (like a new install)

 

4. make a copie of the system from the old hard drive to the new ssd drive, by: cp -a /Old-Hard-Drive /New-SSD-Drive

 

(cp -a normaly copy with the good privilege no ?)

 

5. Update the /etc/fstab to write the good place for /boot et / etc...

 

6. update grub

But i'm using grub-legacy and no boot-update...

i edit manualy the /boot/grub-legacy/grub.conf with exemple this:

of-war nicolas # cat /boot/grub-legacy/grub.conf

default 1

timeout 10

title Funtoo - 4.0.3

root (hd0,0)

kernel /boot/kernel-4.0.3 root=/dev/sda3 video=uvesafb:1920x1080-24,mtrr:3,ywrap console=tty1



title Funtoo - 4.0.4

root (hd0,0)

kernel /boot/kernel-4.0.4 root=/dev/sda3 video=uvesafb:1920x1080-24,mtrr:3,ywrap console=tty1

and i install manualy grub in the mbr with old method...

 

what do you think ?

 

 

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Are the disks the same size?  If so, I suspect you could just use dd from your LiveCD environment:

dd if=/dev/sda of=/dev/sdb

Just, be really careful that you know which disk is the old one and which is the new one, because disk destroyer will blindly copy, bit for bit, with no regards for what it's actually doing.  What's neat though, if you do this, dd will copy over your MBR as well (it will copy the *entire* disk), so it might be a single command, then take the old drive out, and reboot.

 

If the new disk is larger you can still do something similar like this, but you might have to then resize partitions to make use of the new space.  I haven't played with that in a while, so I don't know the exact commands, but it should be pretty easy to google.  They're likely file system dependent in any case.

Share this post


Link to post
Share on other sites
  • 0

I like iwoloschin's idea, because dd does a "proper" clone of your data. Some notes from my experience - 

 

1) dd will copy every bit, even free space. So your old 100GB partition of which you have used 50GB will still create a 100GB img. cp, on the other hand, will only take note of the files you have used.

 

2) As such, you won't be able to use 

dd if=/dev/sdX of=/dev/sdY

 if your destination drive is even slightly smaller than your original. You could try it with partitions, though!

 

3) I suppose, to get around the partition resizing issue, you could partition first and then use dd on each partition, as long as the size rule in 2) is met.

 

4) dd takes a really long time and has no progress bar. So I'd advise patience, free time and planning ahead.

Share this post


Link to post
Share on other sites
  • 0

Awesome!

 

Linux is fun, there's a million ways to do something, and as long as the end result is a working system it's hard to say that any one way is wrong.  Some just might be easier or less error prone than others :).

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...