Transfering entire system and files to new HDD

The place to post if you need help or advice

Moderators: ChrisThornett, LXF moderators

Postby catgate » Fri May 17, 2013 9:09 pm

towy71 wrote:A couple of hours for normal people ;-)


That rules me out! :cry:

Dutch_Master wrote:... then copy over the relevant bits from the old HDD.

There-in lies my big problem. I used to know what they were when farting around with M$ nastiness but I have never really mastered what was important and what was not with Ubuntu (or any Linux OS.) :oops:
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby towy71 » Fri May 17, 2013 10:03 pm

I wish I had found this page before I started, but typically found it midway through the procedure. :roll: :roll:
still looking for that door into summer
User avatar
towy71
Moderator
 
Posts: 4263
Joined: Wed Apr 06, 2005 2:11 pm
Location: wild West Wales

Postby Dutch_Master » Fri May 17, 2013 10:46 pm

catgate wrote:
Dutch_Master wrote:... then copy over the relevant bits from the old HDD.

There-in lies my big problem. I used to know what they were when farting around with M$ nastiness but I have never really mastered what was important and what was not with Ubuntu (or any Linux OS.) :oops:
Everything in /home 'cause that's where your data resides. The rest is "system" and it's generally not a good idea to blindly copy over config files if you've installed a new system. But you can create an archive (store in a separate dir in /home) of the /etc dir to copy stuff over once you've determined that's safe to do so. Likewise /opt and /usr.
Dutch_Master
LXF regular
 
Posts: 2445
Joined: Tue Mar 27, 2007 1:49 am

Postby nelz » Sat May 18, 2013 7:37 am

You shouldn't need /usr, unless you have manually installed software into /usr/local, the rest is system files (some systems run with /usr mounted read only so you couldn't store configs in there). However you may need some parts of /var.

By the time you've worked out what to backup and then decided what you need to restore, you really will have spent days on it, Clonezilla will take a tenth of the time.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8504
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby catgate » Sat May 18, 2013 1:52 pm

I presume the method with Clonezilla is to put the target drive into a spare slot in the "donor" tower and connect into a SATA socket rather than using an external HD box and USB?
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby catgate » Thu May 23, 2013 11:42 am

I was just going to start on this job when I suddenly realised that I had another question.
Do I need to format the new HDD before cloning on to it? Or will Clonezilla look after that?
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby catgate » Tue May 28, 2013 9:52 am

I finally got round to putting the new hard drive into the box, and, after reading the various “instruction manuals” to be found on the interthingy, bravely fired up Clonezilla.
All seemed to go well until I got passed the point of just clicking the “enter” key on each “page” and had to enter the the target (sdb).
Clonzilla seemed unable to find it.
I came out of the procedure and tried again, and yet again. (I began to wonder if Clonzilla had not read the manuals).
I restarted the machine as normal on the HD just to see if the second Hard Drive was still being recognised. It was.
So I had another go booting up again from the CD drive......with precisely the same results.
I went to bed with bad grace (and she did not help).

This morning, ever the bu**er for punishment, I pushed the GO button again, not really knowing what I was going to do. I soon found out, because there was suddenly nothing happening.

Of course I had taken out the CD last night and had left the boot up still on CD as first choice. Due to old age, and the fact that I am naturally inclined to remain asleep till mid morning even if I am up and walking about, I had overlooked the fact that if the first option was unavailable it should go to the second option, and so I went and altered the first option to the appropriate hard drive (sda).
Still no start.

So I took out the new hard drive and tried again and here we are.

So I am wondering what my next step should be. I hate to think of having to get involved with all that pantomime with permissions etc. That could easily take me days.
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby nelz » Thu May 30, 2013 8:35 am

The drives may not be names the same when booting from the CD. ISTR you can drop to a terminal in Clonezilla, run "fdisk -l" to see what each disk is called.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8504
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby catgate » Thu May 30, 2013 9:31 am

"nelz" [quote=Unix is user-friendly. It's just very selective about who it's friends are.[/quote]

How many bags of sweeties does it take??
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby catgate » Thu Jun 06, 2013 1:30 pm

The situation has changed quite a bit.
Whilst I was fiddling with bits of cable in the magic box (checking for loose connections) I happened to touch the plastic housing of the chip cooling fan slightly with the back of my hand. It moved. A further investigative poke indicated that the cowling was indeed quite lose. So I decided the best thing to do, considering the age of the assemblage, was to replace the lot...Motherboard, CPU, PSU and consequentially a new DVD (sata) drive and a new chunk of RAM.
It all arrived and I put it all together, along with the old SDD drive, that started off this pantomime, and the new larger replacement one.
It fired up nicely off the old SDD and I was able to partition the new one, sdb, using the Gparted on sda.

I then went into the terminal and fed in

sudo dd if/dev/sda of/dev/sdb bs=32M

After going for a cup of tea and a walk round the garden I came back to find it had completed, and had left a message, saying it had been done successfully.
Sadly, I feel it was as far from the truth as most of our politicians are.
When I changed the boot up sequence in the bios, and tried to fire up, I got a message that was far above my level of competence to understand, but it did mention the need for e2fsprogsv1.41+
.
I looked in Synaptic PM and there was e2fsprogsv1.42-1ubuntu2.
This problem would seem to be connected to the formatting of the new sdb, so I thought a wipe clean and a recopy, letting dd have its head, might be the answer, but my problem now is how do I wipe sdb clean for further use.
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby nelz » Thu Jun 06, 2013 3:05 pm

You tried to dd a live drive! That is asking for trouble, and your request was granted. You can't reliably copy a drive while its contents are subject to change. The mention of e2fsprogs indicates that a filesystem error was detected, which is exactly what happens if you try to copy a live drive.

You must boot from a live CD to do this. If you're going to use a live CD, you may as well use one designed for the job, Clonezilla.

Also, your dd syntax was wrong, it's if=/dev/sda etc.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8504
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby catgate » Thu Jun 06, 2013 3:49 pm

nelz wrote:You must boot from a live CD to do this. If you're going to use a live CD, you may as well use one designed for the job, Clonezilla.

Also, your dd syntax was wrong, it's if=/dev/sda etc.

Thanks for the reply, nelz.

Re the syntax. What I did was to to miss type the above command in my post. On my working crib sheet all the equals signs are there and that is what I fed in.
It seems that my next move is to wipe sdb clean and as far as I can see the command to use is
sudo dd if=dev/zero of=/dev/sdb bs=4k
Will this run without risk from sda or should I run it from a live CD?
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby nelz » Thu Jun 06, 2013 5:26 pm

nelz wrote:You must boot from a live CD to do this.


I'm not sure how much clearer I can make it. Using dd from a running drive broke things, repeating the action is likely to repeat the consequences.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8504
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby catgate » Thu Jun 06, 2013 9:24 pm

nelz wrote:
nelz wrote:You must boot from a live CD to do this.


I'm not sure how much clearer I can make it. Using dd from a running drive broke things, repeating the action is likely to repeat the consequences.

Thanks again, nelz.
Sorry. I thought, in my ignorance, that just filling the sdb with zero would not affect the sda.
Good job I still have a live CD to hand.
Am I correct about the command?
Oh, sod it.
catgate
LXF regular
 
Posts: 1056
Joined: Wed Jul 19, 2006 6:45 pm
Location: Just over there, in that corner.

Postby nelz » Thu Jun 06, 2013 9:30 pm

Ah sorry, I didn't read your command properly, filling with zeros is safe, but unnecessary and any subsequent dd will overwrite everything anyway.

Seriously, do yourself a favour and use a program designed explicitly to do exactly what you want instead of fudging around with dd.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8504
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

PreviousNext

Return to Help!

Who is online

Users browsing this forum: No registered users and 2 guests