Index

Subject : [lug] Digest (7 messages)

From : lug-owner@lists.ncsu.[redacted]

Date : Thu, 19 Apr 2012 00:58:30 -0400


The Lug Digest
Volume 1 : Issue 279 : "mime" Format

Messages in this Issue:
201204/23 : Re: Bait and Switch
Greg Sheremeta <greg@gregsheremeta.[redacted]>
201204/29 : Re: Bait and Switch
Caleb Wilson <ctwilso3@ncsu.[redacted]>
201204/24 : Fun with dd and netcat
Bill Farrow <bill@arrowsreach.[redacted]>
201204/25 : Re: Fun with dd and netcat
Alex Ray <alexjray.ncsu@gmail.[redacted]>
201204/26 : Re: Fun with dd and netcat
Marhn Fullmer <mhfullme@ncsu.[redacted]>
201204/27 : Re: Fun with dd and netcat
Ian Kilgore <imkilgor@ncsu.[redacted]>
201204/28 : Re: Fun with dd and netcat
Caleb Wilson <ctwilso3@ncsu.[redacted]>

You can pick up a SATA/IDE to USB adapter (with power source) from Newegg for about $15. It's such a useful tool that everyone should have one. :)

Back to OP's issue -- Caleb, you can still do this with Clonezilla by saving your image to a network location, swapping the drives out, and copying the image back to the new drive.

Greg

On Tue, Apr 17, 2012 at 11:21 PM, Michael Marley < michael@michaelmarley.[redacted] > wrote:
Laptop do use standard-size SATA and SATA power connectors, so you can hook a laptop disk straight up to a desktop PC without any adapters.  The reverse should work too, but you would need some kind of external power source as I would image most laptops would not supply enough power for a desktop disk.

Michael

On 04/17/2012 11:11 PM, Alex Jones wrote:
that's..... really clever, I don't usually clone my drives, but I'm hoping I'll remember that, I'm due to replace my laptop soon.
On that note,  do laptop drives usually use standard sata nowadays? I know you use to need a 2.5 IDE to 3.5 IDE cable.
On 4/17/2012 10:59 PM, Michael Marley wrote:
dd works for me on drives of different sizes.  You just have to resize the partition before (if the destination drive is smaller than the source) or after (if the destination drive is larger than the source).  I have copied numerous hard disks this way.  Just make sure you get the entire drive (ex. /dev/sda) and not just one partition (ex. /dev/sda1).

Michael

On 04/17/2012 09:16 PM, Warren Myers wrote:
Using dd is likely going to be a Bad Idea, unless the two drives are *identical* in size.

There are a variety of approaches listed on a similar question asked on superuser: http://superuser.com/q/11453/978 "How to move from one drive to another that's a different size?"

Then just use dd on the first 512 bytes (the MBR and partition table) like this (presuming the SSD is sda, and the hdd is sdb):
dd if=/dev/sda of=/dev/sdb bs=512 count=1

That all being said, clonezilla is probably your best bet :)

-WMM

On Tue, Apr 17, 2012 at 16:41, Caleb Wilson < ctwilso3@ncsu.[redacted] > wrote:
>
> Hooking them up at the same time isn't possible right now (laptop, no converter) and also I am more of a hardware guy, not software. So while what you said sounded like a solid fix, I would have no idea what I'd be doing lol.
>
>
> On Tue, Apr 17, 2012 at 4:12 PM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
>>
>> Yes, Clonezilla goes onto a CD or a USB. Then it's easiest to connect both drives to the machine, boot from CD or USB into Clonezilla, and bounce the data.
>>
>> If you can't connect both drives to the same computer (maybe via a USB-to-SATA adapter or something), then Clonezilla offers a few options to bounce the image -- easiest would probably be using a network location.
>>
>> Yes, it will overwrite data on the destination drive, but I don't think it will clean wipe the entire drive. You probably don't need that anyway.
>>
>> On Tue, Apr 17, 2012 at 3:57 PM, Caleb Wilson < ctwilso3@ncsu.[redacted] > wrote:
>>>
>>> Create an iso image onto a cd, switch out drives and from there? Will this wipe the data on the HDD previously? (don't need to keep it.)
>>>
>>> On Tue, Apr 17, 2012 at 3:30 PM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
>>>>
>>>> Clonezilla should work for you.
>>>>
>>>>
>>>> On Tue, Apr 17, 2012 at 3:23 PM, Caleb Wilson < ctwilso3@ncsu.[redacted] > wrote:
>>>>>
>>>>> Alright so here is what I am trying to do.
>>>>>
>>>>> I may not be using the correct terminology, but I need a way to 'clone' or 'copy' the OS and data from my SSD onto a HDD. I've run out of space very quickly on my SSD despite not saving data on it. So my goal is to create a clone of it, and switch out the drives so that I am literally booting the same setup. I have spent a good many hours tweaking the OS and UI and won't be able to recreate it from scratch.
>>>>>
>>>>> So, as long as I can do this, I'll be able to dual boot linux again (YAY!)
>>>>
>>>>
>>>
>>
>



--
Warren Myers
http://warrenmyers.com
http://twitter.com/warrenmyers
http://www.linkedin.com/in/warrenmyers



Alright, it sounds like the USB-SATA adapter will be the easiest/least amount of complications for me to copy the image on the SSD straight to the HDD while both are running. Will just wait until I get my next check ;)
Thanks for the help!

On Wed, Apr 18, 2012 at 8:41 AM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
You can pick up a SATA/IDE to USB adapter (with power source) from Newegg for about $15. It's such a useful tool that everyone should have one. :)

Back to OP's issue -- Caleb, you can still do this with Clonezilla by saving your image to a network location, swapping the drives out, and copying the image back to the new drive.

Greg


On Tue, Apr 17, 2012 at 11:21 PM, Michael Marley < michael@michaelmarley.[redacted] > wrote:
Laptop do use standard-size SATA and SATA power connectors, so you can hook a laptop disk straight up to a desktop PC without any adapters.  The reverse should work too, but you would need some kind of external power source as I would image most laptops would not supply enough power for a desktop disk.

Michael

On 04/17/2012 11:11 PM, Alex Jones wrote:
that's..... really clever, I don't usually clone my drives, but I'm hoping I'll remember that, I'm due to replace my laptop soon.
On that note,  do laptop drives usually use standard sata nowadays? I know you use to need a 2.5 IDE to 3.5 IDE cable.
On 4/17/2012 10:59 PM, Michael Marley wrote:
dd works for me on drives of different sizes.  You just have to resize the partition before (if the destination drive is smaller than the source) or after (if the destination drive is larger than the source).  I have copied numerous hard disks this way.  Just make sure you get the entire drive (ex. /dev/sda) and not just one partition (ex. /dev/sda1).

Michael

On 04/17/2012 09:16 PM, Warren Myers wrote:
Using dd is likely going to be a Bad Idea, unless the two drives are *identical* in size.

There are a variety of approaches listed on a similar question asked on superuser: http://superuser.com/q/11453/978 "How to move from one drive to another that's a different size?"

Then just use dd on the first 512 bytes (the MBR and partition table) like this (presuming the SSD is sda, and the hdd is sdb):
dd if=/dev/sda of=/dev/sdb bs=512 count=1

That all being said, clonezilla is probably your best bet :)

-WMM

On Tue, Apr 17, 2012 at 16:41, Caleb Wilson < ctwilso3@ncsu.[redacted] > wrote:
>
> Hooking them up at the same time isn't possible right now (laptop, no converter) and also I am more of a hardware guy, not software. So while what you said sounded like a solid fix, I would have no idea what I'd be doing lol.
>
>
> On Tue, Apr 17, 2012 at 4:12 PM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
>>
>> Yes, Clonezilla goes onto a CD or a USB. Then it's easiest to connect both drives to the machine, boot from CD or USB into Clonezilla, and bounce the data.
>>
>> If you can't connect both drives to the same computer (maybe via a USB-to-SATA adapter or something), then Clonezilla offers a few options to bounce the image -- easiest would probably be using a network location.
>>
>> Yes, it will overwrite data on the destination drive, but I don't think it will clean wipe the entire drive. You probably don't need that anyway.
>>
>> On Tue, Apr 17, 2012 at 3:57 PM, Caleb Wilson < ctwilso3@ncsu.[redacted] > wrote:
>>>
>>> Create an iso image onto a cd, switch out drives and from there? Will this wipe the data on the HDD previously? (don't need to keep it.)
>>>
>>> On Tue, Apr 17, 2012 at 3:30 PM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
>>>>
>>>> Clonezilla should work for you.
>>>>
>>>>
>>>> On Tue, Apr 17, 2012 at 3:23 PM, Caleb Wilson < ctwilso3@ncsu.[redacted] > wrote:
>>>>>
>>>>> Alright so here is what I am trying to do.
>>>>>
>>>>> I may not be using the correct terminology, but I need a way to 'clone' or 'copy' the OS and data from my SSD onto a HDD. I've run out of space very quickly on my SSD despite not saving data on it. So my goal is to create a clone of it, and switch out the drives so that I am literally booting the same setup. I have spent a good many hours tweaking the OS and UI and won't be able to recreate it from scratch.
>>>>>
>>>>> So, as long as I can do this, I'll be able to dual boot linux again (YAY!)
>>>>
>>>>
>>>
>>
>



--
Warren Myers
http://warrenmyers.com
http://twitter.com/warrenmyers
http://www.linkedin.com/in/warrenmyers




On Wed, Apr 18, 2012 at 8:41 AM, Greg Sheremeta <greg@gregsheremeta.[redacted]> wrote:
> Back to OP's issue -- Caleb, you can still do this with Clonezilla by saving
> your image to a network location, swapping the drives out, and copying the
> image back to the new drive.

You can also use dd and netcat to do the same thing, just depends how
familiar you are with command line tools.

Basic commands:
Network Server: nc -l 1234 > hdd_image.bin
Laptop booted with LiveCD: dd if=/dev/sda | nc 192.168.1.xxx 1234

Notes: When using dd, try setting the block size parameter to speed up
the transfers: bs=1M

The pipe-viewer tools (pv) is really useful in the these situations, I
add this in like so for a 40 gig hdd:
Network Server: nc -l 1234 | pv -pbret -s 40G > hdd_image.bin
Laptop booted with LiveCD: dd if=/dev/sda | pv -pbret -s 40G | nc
192.168.1.xxx 1234

Bill

Man, packet loss would not be nice in this situation

On Wed, Apr 18, 2012 at 11:35 AM, Bill Farrow < bill@arrowsreach.[redacted] > wrote:
On Wed, Apr 18, 2012 at 8:41 AM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
> Back to OP's issue -- Caleb, you can still do this with Clonezilla by saving
> your image to a network location, swapping the drives out, and copying the
> image back to the new drive.

You can also use dd and netcat to do the same thing, just depends how
familiar you are with command line tools.

Basic commands:
Network Server:  nc -l 1234 > hdd_image.bin
Laptop booted with LiveCD: dd if=/dev/sda | nc 192.168.1.xxx 1234

Notes: When using dd, try setting the block size parameter to speed up
the transfers: bs=1M

The pipe-viewer tools (pv) is really useful in the these situations, I
add this in like so for a 40 gig hdd:
Network Server:  nc -l 1234 | pv -pbret -s 40G > hdd_image.bin
Laptop booted with LiveCD: dd if=/dev/sda | pv -pbret -s 40G | nc
192.168.1.xxx 1234

Bill



--



I've DD'd bad drives & saved situations but it's sort of been Hobson's choice
at the time. (~"Oh yeah, we'll be on something else by that time. The API
the app set depends on won't get changed and security updates streamed
in-line to make the new set problematic. Right ...")

One, among many, when money is at stake, that is considered is:
bru backup
from Tolis Group that make sure you get it across & back. They used
to have a free/trial/student/academic prices at certain feature price/function
points? lone tar but I haven't seen it in action, ever. Haven't looked into
the exact details of bru for a long time. There's some nice open source HA (high availablity) stuff I've been thinking about lately but a BSD-cloud based tool to EC2 is probably what I'll use for better backup, with VM & coordinated app management ready for it with that. (Backblaze keeps teasing about Linux & I use it for Mac & Windows on she whose pictures must be safe's laptop & is cheaper.) GlusterFS takes 64bit CPUs & AFS, even with 5 virtual machines in a box to make it tick, still begs for an off-site backup as part of what it'd take.

Best thing is multiple HW w/targets & execution in different places in ways that you are happy but that may, at the moment, be beyond student budgets or available attention span given other pressures, <grin>. Commvault is another among myriad people who do checkpoint, etc.
rsync does some rudimentary checksumming but some products
care whether you actually finish with what you want, that go to bare-metal
restores across different qualified products, etc.
There are some forensic HW & SW products that help you snapshot it
also but the restores could be problematic across disparate HW.

Clonezilla gets a little cranky sometimes, depending on how big and
what filesystems are on what OS.
- marhn

On Wed, Apr 18, 2012 at 10:59 PM, Alex Ray < alexjray.ncsu@gmail.[redacted] > wrote:
Man, packet loss would not be nice in this situation

On Wed, Apr 18, 2012 at 11:35 AM, Bill Farrow < bill@arrowsreach.[redacted] > wrote:
On Wed, Apr 18, 2012 at 8:41 AM, Greg Sheremeta < greg@gregsheremeta.[redacted] > wrote:
> Back to OP's issue -- Caleb, you can still do this with Clonezilla by saving
> your image to a network location, swapping the drives out, and copying the
> image back to the new drive.

You can also use dd and netcat to do the same thing, just depends how
familiar you are with command line tools.

Basic commands:
Network Server:  nc -l 1234 > hdd_image.bin
Laptop booted with LiveCD: dd if=/dev/sda | nc 192.168.1.xxx 1234

Notes: When using dd, try setting the block size parameter to speed up
the transfers: bs=1M

The pipe-viewer tools (pv) is really useful in the these situations, I
add this in like so for a 40 gig hdd:
Network Server:  nc -l 1234 | pv -pbret -s 40G > hdd_image.bin
Laptop booted with LiveCD: dd if=/dev/sda | pv -pbret -s 40G | nc
192.168.1.xxx 1234

Bill



--




On Wed, Apr 18, 2012 at 10:59 PM, Alex Ray <alexjray.ncsu@gmail.[redacted]> wrote:
>
> Man, packet loss would not be nice in this situation
>
>

TCP
--
ik

Agreed


On Wed, Apr 18, 2012 at 11:57 PM, Ian Kilgore < imkilgor@ncsu.[redacted] > wrote:
On Wed, Apr 18, 2012 at 10:59 PM, Alex Ray < alexjray.ncsu@gmail.[redacted] > wrote:
>
> Man, packet loss would not be nice in this situation
>
>

TCP
--
ik