You are not logged in.

#1 2009-08-06 08:46:29

dinkydarko
Member
From: Glasgow, Scotland
Registered: 2005-01-28
Posts: 35
Website

Moving root partition to a new SSD. easy? worth it?

Hi guy,

i'm thinking of buying this http://www.overclockers.co.uk/showprodu … =HD-002-CR or something like it in the next month or so. I'm happy with the speed  i have just now from my 500gig samsung spinpoint but the prices are getting hard to resist...

My question is,     I took a while setting up my system  (hotplugging was a bitch) as I have 2 screens of different size and a wireless keyboard n bluetooth mouse.. it was a pain getting it all right basically and i'm happy with it as it is. IS there a way I could install this new SSD,   copy EVERYTHING over to it,  add the correct lines to grub,   and expect it to play nice?

I'd like to keep my /home on the samsung 500gig  but expand it to take up everything  (and use a 250gig i have as a backup)


Am i being realistic or am i looking at a full reinstall?

Ta in advance,

David

Offline

#2 2009-08-06 10:10:35

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Moving root partition to a new SSD. easy? worth it?

Have a look at Clonezilla, it rocks for this kind of thing.

I used it to take an image of my 40gb dual-boot Windows/Arch laptop before I had to give it back to my old work. Left the image sitting for a couple of months before I got a replacement laptop - same model but bigger hard drive. It took care of it all fine and dandy with barely a problem. There was one problem that wouldn't let me boot, but it was an easy and quick fix. I don't see any reason it wouldn't work the same for you going from a bigger to smaller drive.

Offline

#3 2009-08-06 11:42:24

dinkydarko
Member
From: Glasgow, Scotland
Registered: 2005-01-28
Posts: 35
Website

Re: Moving root partition to a new SSD. easy? worth it?

Thanks,  I'll take a look.    Given that I'll not be removing the 500 with the current root it seems like it should be safe enough,    I dont need to move the MBR or anything. 

Thanks.

(leaving unsolved incase of more advice!)

Offline

#4 2009-08-06 12:01:20

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Moving root partition to a new SSD. easy? worth it?

Depending on you skills this is what i would suggest

1. Boot livecd
2. mount /dev/sda1 /mnt/old
3. mount /dev/sdb1 /mnt/new
4. cp -rav /mnt/old/* /mnt/new
5. umount /mnt/old
6. mount -o bind /dev /mnt/new/dev
7. mount -t proc none /mnt/new/proc
8. chroot /mnt/new /bin/bash
---1. grub-install /dev/sdb
---2. exit
9. Exit and reboot

You are just copying files from the old to new hard drive and then installing grub.


Website - Blog - arch-home
Arch User since March 2005

Offline

#5 2009-08-07 08:10:50

dinkydarko
Member
From: Glasgow, Scotland
Registered: 2005-01-28
Posts: 35
Website

Re: Moving root partition to a new SSD. easy? worth it?

Thanks pyther,

all looks possible and i hunderstand pretty much whats going on. I've been using linux on off for a few years so i'm not afraid of the command line...

but would this approach be better than clonezilla? I notice you are moving grub,   I'd rather keep the grub i have and amend it to include booting to the new partition on the new drive as an option so i can confirm everything works before i install grub from there.

Offline

#6 2009-08-07 10:10:16

SpeedVin
Member
From: Poland
Registered: 2009-04-29
Posts: 955

Re: Moving root partition to a new SSD. easy? worth it?

pyther wrote:

Depending on you skills this is what i would suggest

1. Boot livecd
2. mount /dev/sda1 /mnt/old
3. mount /dev/sdb1 /mnt/new
4. cp -rav /mnt/old/* /mnt/new
5. umount /mnt/old
6. mount -o bind /dev /mnt/new/dev
7. mount -t proc none /mnt/new/proc
8. chroot /mnt/new /bin/bash
---1. grub-install /dev/sdb
---2. exit
9. Exit and reboot

You are just copying files from the old to new hard drive and then installing grub.

I have question about this.
If there are any difrences about filesytem there won't be problem's?
For example ext4 without journal and ext2 wink

Last edited by SpeedVin (2009-08-07 10:10:28)


Shell Scripter | C/C++/Python/Java Coder | ZSH

Offline

#7 2009-08-07 10:14:14

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: Moving root partition to a new SSD. easy? worth it?

pyther wrote:

4. cp -rav /mnt/old/* /mnt/new

I always do this in two steps:

cp -rav /mnt/old/* /mnt/new
cp -rav /mnt/old/.* /mnt/new

Am I just over complicated? I seem to remember that only the first step did not copy hidden files/directories...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#8 2009-08-07 11:06:08

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Moving root partition to a new SSD. easy? worth it?

SpeedVin wrote:

If there are any difrences about filesytem there won't be problem's?
For example ext4 without journal and ext2 wink

No, so long as the LiveCD you boot is capable of mounting them (any LiveCD should be able to handle ext2 and ext3! smile)

Offline

#9 2009-08-09 13:40:22

dinkydarko
Member
From: Glasgow, Scotland
Registered: 2005-01-28
Posts: 35
Website

Re: Moving root partition to a new SSD. easy? worth it?

i'm not planning to move away from ext4,   i'll alter the boot options i'm sure for an SSD but i really want to know now,    is this manual copying method better than using clonezilla?

Offline

#10 2009-08-09 14:31:56

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: Moving root partition to a new SSD. easy? worth it?

Might wanna read the tips in this wiki article.

Avoiding Pitfalls

The install is pretty normal, except that you'll need to avoid the pitfalls of our alternative Linux install:

   1. Never choose to use a journaling file system on the SSD partitions
   2. Never use a swap partition on the SSD
   3. Edit your new installation fstab to mount the SSD partitions "noatime"
   4. Never log messages or error log to the SSD

The rules ensure that we won't reach the maximum limit of writes on our SSD faster than we should, although this is being contested (see this link and this other link).

Some other minor modifications can be made to decrease number of non-mandatory writes by applications: deactivate ~/.viminfo in vi, deactivate less history file (~/.lesshst), and so on.

So you'll have to disable journaling on ext4 and make sure that you have a dedicated /var on a physical HDD to minimize those log files writes to the ssd.

Last edited by graysky (2009-08-09 14:33:17)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#11 2009-08-09 14:44:11

IncredibleLaser
Member
From: Germany, NRW
Registered: 2008-07-16
Posts: 158

Re: Moving root partition to a new SSD. easy? worth it?

Offline

#12 2009-08-09 22:01:33

moljac024
Member
From: Serbia
Registered: 2008-01-29
Posts: 2,676

Re: Moving root partition to a new SSD. easy? worth it?

graysky wrote:

Might wanna read the tips in this wiki article.

Avoiding Pitfalls

The install is pretty normal, except that you'll need to avoid the pitfalls of our alternative Linux install:

   1. Never choose to use a journaling file system on the SSD partitions
   2. Never use a swap partition on the SSD
   3. Edit your new installation fstab to mount the SSD partitions "noatime"
   4. Never log messages or error log to the SSD

The rules ensure that we won't reach the maximum limit of writes on our SSD faster than we should, although this is being contested (see this link and this other link).

Some other minor modifications can be made to decrease number of non-mandatory writes by applications: deactivate ~/.viminfo in vi, deactivate less history file (~/.lesshst), and so on.

So you'll have to disable journaling on ext4 and make sure that you have a dedicated /var on a physical HDD to minimize those log files writes to the ssd.

All of that makes SSDs pretty useless in my opinion...


The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
--------------------------------------------------------------------------------------------------------------
But if they tell you that I've lost my mind, maybe it's not gone just a little hard to find...

Offline

#13 2009-08-09 22:27:45

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: Moving root partition to a new SSD. easy? worth it?

moljac024 wrote:

All of that makes SSDs pretty useless in my opinion...

+1
I'll wait for SSD's to catch-up to the reliability and longevity of traditional HDD's before bothering. The speed is nice, but I like to know my whole system isn't going to die from the SSD exceeding it's relatively short life-span.

Offline

Board footer

Powered by FluxBB