Page 1 of 1

Can I move SD card's content to a USB hard drive via 'dd'?

Posted: Tue Jan 13, 2015 9:17 am
by allfox
Greetings.

I've just ordered an USB hard drive to replace the SD card as Pi's storage. And now I'm thinking about how to set it up.

I have another smaller SD card with a modified cmdline.txt to direct the boot via sda device. I used it to boot via an USB flash drive. I'm planning using it to boot up Pi via the USB hard drive.

Can I just 'dd' everything from the current running SD card to the hard drive, and after booting up the Pi, I use raspi-config to expand the file system?

I don't want to set everything up from scratch.

Re: Can I move SD card's content to a USB hard drive via 'dd

Posted: Tue Jan 13, 2015 9:27 am
by gkreidl
http://www.raspberrypi.org/forums/viewt ... 29&t=44177

You don't have to start with a fresh Raspbian install (as decribed in this tutorial), but can use your existing installation instead.

Re: Can I move SD card's content to a USB hard drive via 'dd

Posted: Tue Jan 13, 2015 9:38 am
by allfox
gkreidl wrote:http://www.raspberrypi.org/forums/viewt ... 29&t=44177

You don't have to start with a fresh Raspbian install (as decribed in this tutorial), but can use your existing installation instead.
Thanks, this topic is great.

It told me that I could use rsync to copy the content instead of dd, as it won't copy blank space, so would be faster.

I'll try it when my hard drive arrives.

Re: Can I move SD card's content to a USB hard drive via 'dd

Posted: Tue Jan 13, 2015 11:11 am
by RaTTuS

Re: Can I move SD card's content to a USB hard drive via 'dd

Posted: Wed Jan 14, 2015 9:02 am
by emma24xia
The file transfer from SD card to hard drive can be done on a computer if this is what you mean.

Re: Can I move SD card's content to a USB hard drive via 'dd

Posted: Wed Jan 14, 2015 9:16 am
by gkreidl
emma24xia wrote:The file transfer from SD card to hard drive can be done on a computer if this is what you mean.
The Raspberry Pi is a computer.

It cannot be done on a Windows machine.