Installing onto bootable USB

Asked by Jason Stewart

I am trying to create images from a number of failed hard drives in the hope I can recover the programs and data. This includes 3 sata drives, two of which had the operating systems on them, and the third was document storage. Plus an old pata drive that has photographs on it.

Most important is a Windows XP OS on a partition. ( another also has a Ubuntu 9.04, which I stopped using after the hard drive failure).

The command line is daunting for me, although with the correct instructions I can copy and paste as good as the next person :-=P I am still familiarising myself with Ubuntu again, which makes this process challenging. What I am is a struggling inventor that works better with my hands and thinks in 3D, so a graphical interface would be desireable for me to use. At best I can muddle my way through.

As I type this I am working from Ubuntu 16.04 off a flash drive. It appears I can install gddrescue okay, but have not yet managed to get the GUI version working. I have tried downloading the program and installing it that way. Plus I have used terminal using commands found on the internet.

I am not sure if I can create an image of a partition and save it to a portable hard drive, then restore this image to a working hard drive. Creating an ISO first is one little piece of advice I have read for recovery from a failed drive.

What I have not found is an indication that the GUI version will work from a live flash drive. Also if I can make ddrescue, or the gui version, persistent on the flash drive (which would be useful).

So in summary my goals are:

1. a bootable flash drive for imaging failed hard drives
2. If possible a graphical interface for imaging the drives included on that flash drive.
3. the correct process for imaging, then hopefully restoring and mounting (if this is the correct terminology) the OS and programs to a working hard drive.

Resources I have available. A newish, but second hand, Dell laptop that does NOT have a DVD/CD drive. A second hand, but blank, 500gb hard drive, a 2TB portable drive with 80% free capacity, A working 170GB hard drive that has all my documents (last backup 6 months ago to the portable drive). My old computer with a full ATX intel socket 1156 motherboard.

The OS partition/s I wish to image are 200GB. The drives are WD 650gb black editions.

My documents are pretty much secure (except for the old photos) so I could of course load up XP and all my software from disc to my old computer, but the desire is to learn this imaging process and set up my systems to make a hard drive failure less of a problem in the future. My faith in hard drives is now not great, three identical drives of which two failed just outside the warranty period. Now the third has failed six years on.

Question information

Language:
English Edit question
Status:
Answered
For:
DDRescue-GUI Edit question
Assignee:
Hamish McIntyre-Bhatty Edit question
Last query:
Last reply:
Revision history for this message
Jason Stewart (firemaster) said :
#1

Update. I have successfully copied all my files with GUI, and with no errors. But the drive onto which they were copied does not boot. Could be that I have only copied the windows files from what was a dual boot with ubuntu. Might be a grub problem, something beyond my knowledge.

Still not sure I treated the destination drive correctly. To get GUI to work I had to partition the drive, which I did in NFTS. The partition is shown graphically by a change of colour in Gparted, but is not shown as a separate drive. The gap in my knowledge, and where I can not find good instruction, is how to treat the destination drive. For instance how should I make a copy of an entire dual boot hard drive, that also has an image stored of the document drive in separate partition?

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#2

Hi,

Glad you got the GUI working! You'll probably need to reinstall the bootloader to make your new drive bootable, but just to make sure I understand your situation, could you please tell me exactly what you imaged from the old drive to the new drive?

In terms of making a bootable USB with this software on it, you can do that, but it's difficult and requires quite a lot of technical knowledge. You might be better off using something like Parted Magic (www.partedmagic.com), which has this tool and many others.

To fix the bootloader, you might be able to use one of my other programs, WxFixBoot, but first it'd be good to confirm what you've imaged :)

Thanks,
Hamish

Revision history for this message
Jason Stewart (firemaster) said :
#3

Hi Hamish,

thank you for responding.

I copied the partition from duel boot HDD, and the partition contains windows xp operating system and all the windows programs I had loaded. This drive is SDB in the fdisk result copied at the bottom of this message.

That HDD was dual booted with ubuntu 9.04.

SDC is the flash drive I am working from. The loop device is a portable HDD that I was trying to copy the files across to yesterday, but is not currently connected. I did not succeed, and is a separate problem.

PS. Here is what I do. www.intensifire.co.nz. I built the website myself on the wordpress platform, but this type of work is on the fringe of my understanding.

Disk /dev/loop0: 1.4 GiB, 1459982336 bytes, 2851528 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x69205244

Device Boot Start End Sectors Size Id Type
/dev/sda1 218129509 1920119918 1701990410 811.6G 72 unknown
/dev/sda2 729050177 1273024900 543974724 259.4G 74 unknown
/dev/sda3 168653938 168653938 0 0B 65 Novell Netware 386
/dev/sda4 2692939776 2692991410 51635 25.2M 0 Empty

Partition 1 does not start on physical sector boundary.
Partition 2 does not start on physical sector boundary.
Partition 3 does not start on physical sector boundary.
Partition table entries are not in disk order.

Disk /dev/sdb: 596.2 GiB, 640135028736 bytes, 1250263728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xb0e06137

Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 63 409593239 409593177 195.3G 7 HPFS/NTFS/exFAT
/dev/sdb2 409593303 681204194 271610892 129.5G 7 HPFS/NTFS/exFAT
/dev/sdb3 1168343190 1250258624 81915435 39.1G f W95 Ext'd (LBA)
/dev/sdb5 1168343253 1249905194 81561942 38.9G 83 Linux
/dev/sdb6 1249905258 1250258624 353367 172.6M 82 Linux swap / Solaris

Disk /dev/sdc: 7.2 GiB, 7748222976 bytes, 15133248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x14ce438f

Device Boot Start End Sectors Size Id Type
/dev/sdc1 * 2048 15133247 15131200 7.2G c W95 FAT32 (LBA)

Revision history for this message
Jason Stewart (firemaster) said :
#4

Just to clarify, sdb1 is what I selected to copy. All the programs on this partition only occupy around 60gb.

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#5

Okay, so to clarify, you copied /dev/sdb1 (a partition) to another partition on your external drive?

Which partitions hold your operating systems? If you want to be able to boot your operating systems from the external drive, probably what you want to do is image the entire drive that holds your operating systems (e.g. /dev/sdb), to your external drive. Some more configuring will be required before they will boot properly though.

Are you doing this as a form of backup, or because one of your drives is failing?

If this is intended to be a backup solution, you might be better off using a tool called Clonezilla for this. It's a little difficult to use, but I'd be happy to guide you through that, or at least point you at a good guide if so.

Hamish

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#6

Oh, by the way, your site looks pretty cool, even though it's under maintenance right now

Revision history for this message
Jason Stewart (firemaster) said :
#7

Okay, so to clarify, you copied /dev/sdb1 (a partition) to another partition on your external drive? No. I copied it to a blank, but used, HDD shown as "sda". First attempt at copying from "sdb1" to "sda" would not work. So I created a 230gb nfts partition on "sda" drive using Gparted. This partition did now show up, but allowed your GUI program to copy the files. It appears I have made an error in this process, perhaps I should have simply formatted the blank hard drive.

I only make mention the portable drive because I was trying to make a copy of the files I copied using your GUI from "sdb1" to "sda" before I did any further work on the files or "sda" drive. I did not use GUI with the portable/external hard drive. I only connected the external drive after I had made the copy from "sdb1" to "sda" using GUI.

"sdb is the failed HDD that won't boot". It was dual booted with ubuntu, which is on the linux partitions.

My goal is to get recover the windows operating system and programs from "sdb1" to "sda" so that "sda" is a bootable windows operating system.

 I would copy the whole of the "sdb", with all its partitions, but "sda" is not large enough. (although the used space on "sdb" is less than 500gb).

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#8

Okay, thanks for clarifying.

The problem here is that you're trying to copy a partition (/dev/sdb1), to a device (/dev/sda), which won't work.

What you need to do instead is try to shrink the partitions (but don't do this on the failing drive!). The ideal solution would be to copy your failing drive (/dev/sdb) onto another drive of equal or bigger capacity if you have one (say, /dev/sdc), shrink the partitions, and then copy the partitions in /dev/sdc to /dev/sda using GParted or something similar to that.

I know the above is quite a long-winded way of achieving what you want, but the major problem to tackle here is that you're recovering to a smaller drive, which is best avoided if at all possible. Would it be possible for you to simply buy a new (or used) hard drive of equal or bigger capacity? Especially since you are having problems with failing drives, I think buying a new one might be a good idea.

I have a Seagate Barracuda drive, they seem to have a good reputation, if you're interested in buying another drive.

If you aren't, I'm happy to try and guide you through the above process, but know it will be complicated and quite slow!

Hamish

Revision history for this message
Jason Stewart (firemaster) said :
#9

Thanks for your continued input Hamish. Where are you located? Freight might make it uneconomic to buy a hard drive from you.

So a further update, and small break through for me. The files I had copied from the failed drive to the blank hard drive have now successfully been copied to a folder on the 2TB external hard drive. (for some reason the external drive was happily readable this time).

I will think of the copying of "sdb1" as practice for the more important copying I wish to do.

I am going to ponder my next move.

One possibility is to copy my other failed HDD, which I shall call "sdd" for the sake of continuity of the discussion, to "sda". So I have some questions for you that relate back to using GUI for the copy process.

"sdd1" is a windows operating system on a 200gb partition, this is what I want to copy to a new drive so it will boot. Ultimately my objective is to have this operating system on a solid state drive, which I may update and/or dual boot with ubuntu. First I want to simply recover the operating system and programs.

"sdd" is the same brand and capacity as "sdb" However this drive was NOT dual booted. The used space in the partition "sdd1" is around 120gb. There are other partitions that were used for backups, but these are not required.

Questions

1. If I format "sda", and erase all data on it, will this permit GUI to copy across the files from "sdd1?
2. Or do I need to copy the whole 650gb drive to get a bootable copy?
3. Can GUI copy to an external drive without damaging files already stored there?

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#10

Hi,

Ah, sorry, I don't sell them, I've just used one of those for around 3-4 years, so I'm recommending them XD

1) From "sdd1" to "sda"? Yes, should copy fine, but:

2) You probably need to copy the whole drive because Windows is really picky :P I nearly had to reinstall when transferring to an SSD, so I would recommend you create some windows recovery media to fix your bootloader before you do it :)

3) If you're absolutely certain that you're copying to a different partition to one with the saved files on it, you should be okay. Just make sure to copy partitions only to other partitions, and devices only to other devices. To clarify, if you store you files on "/dev/sde1", but have another partition "/dev/sde2" that has not useful data on it, you are safe to copy a partition to "/dev/sde2", but you are NOT safe to copy a device e.g. "/dev/sdf" to "/dev/sde" :)

Hope this helps,
Hamish

Revision history for this message
Jason Stewart (firemaster) said :
#11

Hey thanks again. I will play around with things and keep you appraised. Might take a week or three with other obligations taking precedent.

Jason

Revision history for this message
Jason Stewart (firemaster) said :
#12

Hi Hamish,

I formatted sda and put a 200gb partition on it, which is sda1.

I then copied sdd1, which is a windows XP operating system, to sda1 using your GUI program. This process appeared to go well, and no errors were listed. I can see all the files on sda1 when working with ubuntu.

However when trying to boot sda1, I get a black screen with a cursor flashing on it. It will not boot.

The question is what an I do to get this booting? Is this something that I might be able to do myself? What resources are available online that could help me through the process?

I could really use the programs on this hard drive, such as photoshop and autocad.

Revision history for this message
Hamish McIntyre-Bhatty (hamishmb) said :
#13

Hi,

Sorry for my slow reply -- too many random emails in my inbox, this one got lost XD

I suggest you use Microsofts tools on the Windows XP CD (if you still have it):

Put this disk in your drive and restart, and the installer should prompt you to repair your Windows installation in the first few steps.

Are you using dual boot? If so, you may need to run other tools to get the rest of your operating systems working after doing this, but I'm happy to guide you through that as well.

Hamish

Can you help with this problem?

Provide an answer of your own, or ask Jason Stewart for more information if necessary.

To post a message you must log in.