View previous topic :: View next topic |
Author |
Message |
Jackie Lin Tux's lil' helper
Joined: 31 May 2017 Posts: 115
|
Posted: Fri Mar 15, 2019 5:09 am Post subject: move root file system from hdd to ssd |
|
|
hello, there!
I want to buy an SSD。I have installed gentoo root directory on hdd.
how can I move the root file system from hdd to ssd without reinstalling gentoo on ssd again?
thanks a lot! _________________ peace, focus. |
|
Back to top |
|
|
e3k Guru
Joined: 01 Oct 2007 Posts: 513 Location: Inner Space
|
Posted: Fri Mar 15, 2019 9:45 am Post subject: Re: move root file system from hdd to ssd |
|
|
Jackie Lin wrote: | hello, there!
I want to buy an SSD。I have installed gentoo root directory on hdd.
how can I move the root file system from hdd to ssd without reinstalling gentoo on ssd again?
thanks a lot! |
1. boot from systemrescuecd
2. mount both drives (you have to create the root partition on the ssd first)
3. cp -a /dev/sdaX /dev/sdbX (where a is the hdd and b is the ssd)
you still will need the hdd for booting as moving the root partition is not enough. probably you want also to copy the /boot partition and install the bootloader on the SSD. _________________
Flux & Contemplation - Portrait of an Artist in Isolation
|
|
Back to top |
|
|
vasettoo Tux's lil' helper
Joined: 11 Nov 2012 Posts: 96
|
Posted: Fri Mar 15, 2019 3:40 pm Post subject: |
|
|
I successfully moved my whole gentoo installation from a smaller SSD to a bigger one on UEFI and gpt partition table with Clonezilla installed on bootable USB flash stick - cached into RAM after booting the clonezilla drive. Needed only to resize volume filesystems on the new drive as they are LVM. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Fri Mar 15, 2019 4:27 pm Post subject: |
|
|
I think what @e3k wrote is mostly correct. For the 3rd step, I would prefer rsync over cp: rsync -avh /mnt/sdaX/ /mnt/sdbX (note the trailing / in the source directory) _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
Irre Guru
Joined: 09 Nov 2013 Posts: 434 Location: Stockholm
|
Posted: Fri Mar 15, 2019 8:47 pm Post subject: |
|
|
And correct entries like: Code: | UUID=6bce835a-0910-434e-a610-576cc0c2fa54 / ext4 noatime 0 1 | in /etc/fstab or boot loader. |
|
Back to top |
|
|
Jaglover Watchman
Joined: 29 May 2005 Posts: 8291 Location: Saint Amant, Acadiana
|
Posted: Fri Mar 15, 2019 8:56 pm Post subject: |
|
|
ppurka wrote: | I think what @e3k wrote is mostly correct. For the 3rd step, I would prefer rsync over cp: rsync -avh /mnt/sdaX/ /mnt/sdbX (note the trailing / in the source directory) |
What 3ek wrote is 100% correct. Everybody can check out 'man cp' and the -a option. _________________ My Gentoo installation notes.
Please learn how to denote units correctly! |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21431
|
Posted: Sat Mar 16, 2019 1:14 am Post subject: |
|
|
ppurka wrote: | For the 3rd step, I would prefer rsync over cp: rsync -avh /mnt/sdaX/ /mnt/sdbX (note the trailing / in the source directory) | I like rsync, but that invocation is not correct. You failed to preserve ACLs, hard links, and xattrs. |
|
Back to top |
|
|
Jackie Lin Tux's lil' helper
Joined: 31 May 2017 Posts: 115
|
Posted: Sat Mar 16, 2019 4:45 am Post subject: Re: move root file system from hdd to ssd |
|
|
e3k wrote: | Jackie Lin wrote: | hello, there!
I want to buy an SSD。I have installed gentoo root directory on hdd.
how can I move the root file system from hdd to ssd without reinstalling gentoo on ssd again?
thanks a lot! |
1. boot from systemrescuecd
2. mount both drives (you have to create the root partition on the ssd first)
3. cp -a /dev/sdaX /dev/sdbX (where a is the hdd and b is the ssd)
you still will need the hdd for booting as moving the root partition is not enough. probably you want also to copy the /boot partition and install the bootloader on the SSD. |
Thanks, I think I have got the idea. I will have a try. _________________ peace, focus. |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sat Mar 16, 2019 7:40 am Post subject: |
|
|
Jaglover wrote: | ppurka wrote: | I think what @e3k wrote is mostly correct. For the 3rd step, I would prefer rsync over cp: rsync -avh /mnt/sdaX/ /mnt/sdbX (note the trailing / in the source directory) |
What 3ek wrote is 100% correct. Everybody can check out 'man cp' and the -a option. | Thanks! Something for me to learn as well. _________________ emerge --quiet redefined | E17 vids: I, II | Now using kde5 | e is unstable :-/ |
|
Back to top |
|
|
|