Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Migrating root to SSD -- solved.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Thu Jan 15, 2015 2:58 pm    Post subject: Migrating root to SSD -- solved. Reply with quote

Hi,

I just got an SSD I want to put into an existing Gentoo box. I don't really want to reinstall, which is what I typically do.

Can I just format it and copy partitions 1-3 over?
Code:

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.10

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 1465149168 sectors, 698.6 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 736B3181-5AB6-416B-B5C8-96D2C7B7B267
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 1465149134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048            6143   2.0 MiB     EF02  bios
   2            6144         1054719   512.0 MiB   EF00  /boot
   3         1054720        22026239   10.0 GiB    0700  /
   4        22026240      1465149134   688.1 GiB   8E00  Linux LVM


I'll have to update /etc/fstab, I'm using UUID and PARTUUID in there.

I would like to avoid dd/disk destroyer if I can, I was hoping to
Code:
cp -rax / /mnt
if I can.

Thanks.
[/list]


Last edited by 1clue on Sat Jan 17, 2015 12:48 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Thu Jan 15, 2015 8:29 pm    Post subject: Reply with quote

Should work just fine, it's even easier on EFI machine as you don't have to worry about the bootloader being on the right sectors.

But yes, need to fix references to UUID/PARTUUID (fstab, bootloader) and anything that requires absolute offsets (like resume to swapfile)...

Aw come on, dd is not disk destroyer! :( It's the command that does it all! (forgot where that quote comes from ...)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Fri Jan 16, 2015 2:34 am    Post subject: Reply with quote

I don't hesitate to use dd on older or cheaper equipment. This thing is expensive enough it'll really hurt if I break it. I bought a brand new 64g flash drive back when they were over USD $100, and first thing I did with it was dd onto it and something went wrong, fried it. Never got it back. Somehow convinced the drive that it was the size of the iso image I had dd'd onto it, and that was that. I believe the problem came from copying my image to the raw device rather than the partition. I'm sure there's some way I could have fixed it, but I never figured it out.

I've had years of practice with using dd on regular hard drives, not really very many bad events and no other destroyed hardware, but I've certainly lost some data along the way.


I'm not using resume to swap, but I need to remember to set up trim. And swap is on a spinner, not on an ssd.

Thanks.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Fri Jan 16, 2015 3:05 am    Post subject: Reply with quote

I use dd when it makes sense, it's not a bad tool even on SSDs. Might be something wrong with that SSD or it was designed poorly - ideally it shouldnt matter how or what you write to it. I've heard of some crappy ssds that assume you're using MBR/FAT and those are a problem.

I also swap on SSDs as well as hibernate to it. It's great - nice fast resumes even from hibernate.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13845

PostPosted: Fri Jan 16, 2015 11:39 pm    Post subject: Reply with quote

The main problem with using dd on an SSD is that dd writes every block until it runs out of input. This will mark large portions of the SSD as in-use until it is TRIMmed. If the SSD cannot TRIM, or the user does not run a TRIM, then free space (in the filesystem view) will be considered used from the SSD view. This can degrade performance and drive life, although theoretically modern drives have a high enough write cycle count that this form of abuse should not matter as much as it once did.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2549

PostPosted: Sat Jan 17, 2015 12:48 am    Post subject: Reply with quote

OK that makes sense. The two drives are different sized, so I need to be more selective about what goes where anyway.

It's an OCZ Vector 150, 480g. I'm going to have to do a firmware update on it too, as well as trim. Never did a firmware update on a hard drive before.

Another thing I need to do is hunt down some thermal paste. I opened up the box and saw dust bunnies everywhere, started blowing it out and finally found the CPU fan. It was caked in so hard I'm surprise it didn't melt. It looked like I could remove just the fan without taking the heat sink, but I was wrong. I know I have a tube of thermal paste somewhere but they're so small it might be easier to just get another one. I didn't do a very good job of it the first time, gotta do better this time.

I'm torn between upgrading this box and buying a new one. On the one hand I could upgrade to 24g from 12g for not much money, and use this SSD to get some more speed out of it, on the other hand the newer processors have some features I'd really like, like AES-NI.

Anyway, thanks for the advice. I guess I can mark this one solved.
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 3941
Location: Dallas area

PostPosted: Sat Jan 17, 2015 1:20 am    Post subject: Reply with quote

When I converted my boot/root/home over to ssd I just copied the files with a cp -a

Booting is so much faster than with the old hd.

Oh and to be able to use trim, the filesystem has to understand it.
I swapped out from reiser3 to btrfs for that reason.
Boot partition is so small and gets so few writes that I'm not worried about it being ext2.
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.0 (no-pie) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum