You are not logged in.

#1 2012-01-26 12:16:12

Archdove
Member
Registered: 2011-09-23
Posts: 118

[IGAVEUP]Switching Harddisks

Hi

I've bought me a SSD and have some issues moving my data to it.

1.) I created the exact same partition setup as on the Original disk
     sdb1 /boot
     sdb2 /swap
     sdb3 /root
     sdb4 /home

2.) Then i 'cp -a' root to root and home to home

3.) now i want to make it bootable but i really don't know how

Any Suggestions how i should proceed? Is it enough just 'cp -a'-ing the boot partition?

Of cours i have to alter the fstab to the new drives... will the new disk stay sdb or will it switch to sda when i place it as the only disk to the original location?
I actually dont like to put my guuid in there...

Last edited by Archdove (2012-02-03 16:51:31)

Offline

#2 2012-01-26 13:05:58

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: [IGAVEUP]Switching Harddisks

Hello

I've never tried using "cp" alone for this purpose, but generally use FSArchiver or Clonezilla from a liveCD to create system archives/images that can be restored to a new drive.  Note that with Clonezilla, it will want the new partitions to be as large or larger than those on the source drive.  If you use FSArchiver, you'll need to restore your boot loader to the MBR as a separate process.  Both methods have worked flawlessly for me after using them hundreds of times.

In addition, be sure to check the Arch Wiki for some tweaks that you might want to make concerning the use of the SSD.


Edit:  edited above for clarification

Last edited by ozar (2012-01-26 15:09:51)


oz

Offline

#3 2012-01-26 14:27:16

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [IGAVEUP]Switching Harddisks

Archdove wrote:

Of cours i have to alter the fstab to the new drives... will the new disk stay sdb or will it switch to sda when i place it as the only disk to the original location?

It will be sda if it's the only drive, but you should really consider using another method of partition identification.  If you don't like UUID method, use the fs label method:

LABEL=arch		/		ext4		defaults,noatime		0 1

But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#4 2012-01-26 14:49:30

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [IGAVEUP]Switching Harddisks

thanks, i will go with the uuid method.
Since i'm trying to install on a SSD, i had to recreate the partitions for performance matters.

So now im working on my old disk (sda) with the new disk (sdb) connected trough USB.
How can i install grub? The find command does not show me anything ...

I really can't kill my system now.

Last edited by Archdove (2012-01-26 14:54:44)

Offline

#5 2012-01-26 15:17:06

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: [IGAVEUP]Switching Harddisks

Archdove wrote:

How can i install grub?

The wiki has instructions for installing GRUB, and instructions for creating a GRUB bootdisk should you want one:

https://wiki.archlinux.org/index.php/Grub

You should be able to use SuperGRUB from a liveCD such as the Parted Magic liveCD for restoring your bootloader as well.


oz

Offline

#6 2012-01-26 16:24:28

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [IGAVEUP]Switching Harddisks

I tried rescutux (or somith like that) bit it just tells me that "something" went wrong ...

Offline

#7 2012-01-26 16:46:06

gregor
Member
From: /planet/tmpfs
Registered: 2011-06-20
Posts: 175

Re: [IGAVEUP]Switching Harddisks

try clone you're hd with "dd"  http://linux.die.net/man/1/dd to you're ssd

Offline

#8 2012-01-26 17:25:02

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [IGAVEUP]Switching Harddisks

The destination disk is half the size of the current one... i think cloning will not work.

How about i do a "Real" install and just overwrite all the data afterwards? Would this work?

Offline

#9 2012-01-26 18:22:59

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [IGAVEUP]Switching Harddisks

That could work, but it'd be overkill.

You could try to 'clone' just the 'Master Boot Code' portion of the MBR.  The entire MBR is the first 512 bytes of a drive.  The 'MBC' is the first 440 bytes of the MBR.  So you can clone the 'MBC' with

dd if=/dev/sda of=/dev/sdb bs=440 count=1

That's assuming sda is your old drive and sdb is your SSD.  I've used this method before, but both drives were very similar (same manufacturer, same product line).

Last edited by alphaniner (2012-01-26 18:25:21)


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#10 2012-01-26 22:22:15

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [IGAVEUP]Switching Harddisks

Thanks. I will try this.

I've got grub-install to work and now when i try to boot from the new disk is see the word "GRUB" ond the top left corner.
It stays like this forever...

Just that i understand it correctly. In my /boot partition (sdb1) lies my grub installation. The MBR will start the Code from there? So how does the MBR find my /boot partition?
I think MBR is working but it does not find its configuation ... or something like that.

Last edited by Archdove (2012-01-26 22:22:49)

Offline

#11 2012-01-27 20:54:00

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [IGAVEUP]Switching Harddisks

unfortunatley cloning did not help me.

It seems that i just lack the understanding how this whole boot process works. If someone could enlighten me?

Offline

#12 2012-02-03 16:50:31

Archdove
Member
Registered: 2011-09-23
Posts: 118

Re: [IGAVEUP]Switching Harddisks

Ok - I ended up reinstalling...

Offline

#13 2012-02-03 23:38:55

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [IGAVEUP]Switching Harddisks

I successfully used "cp -a /source/folder/* /destination/folder/" a few times, for backup purposes and it works great because it effectively copies the files in the exact order it finds them. Then I used Parted Magic to chroot into it and reinstalled GRUB, but you can use any LiveCD distro (Ubuntu, Knoppix, SliTaz) from a DVD-RW or a USB stick, just as long as you're not trying to chroot into an x64 installation. Then you'll obviously need a x64 LiveCD.

It's unfortunate that you had to reinstall everything. But I guess it's probably a good idea to do it once every two years or so because a lot of shit gets left behind. My ~/.config folder is full of crap left by programs that I haven't used in years! Hahaha.


PS: UUID's are a lot more accurate.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB