0

I have an OpenElec based HTPC which boots from a USB stick. I would like to replace this with an SSD drive. What is the best way of copying the USB image to the SSD. Is this something that dd could do or would I be better off reinstalling on the SSD from scratch?

1 Answer 1

0

dd should work, if you want to use the same filesystem there. Unfortunately the new partition will have the same size; you probably need to enlarge the partition afterwards.

Some partitioning tools allow you to copy data from one partition to another (the one in the debian installer does) but they might just use dd aswell. Of course should be capable of resizing the partition afterwards.

Personally I would suggest using rsync with appropriate flags. I suggest rsync --archive --hard-links --acls --xattrs --one-file-system, that should get you pretty much everything. Please check the man page if these flags are right for you, you might not need --acls or --xattrs. But you should use --one-file-system or strange things will happen with /proc and the like.

3
  • Thanks @Fabian. Will the SSD be bootable if I use dd? Commented May 19, 2014 at 9:37
  • @KeithMiller You might need to reinstall the boot loader on the SSD; it depends on whether the boot loader bootstrapper is in the boot sector or MBR.
    – user
    Commented May 19, 2014 at 11:22
  • If you use dd if=/dev/sda of=/dev/sdb (where sda is the usb device and sdb is the sdd) the ssd might be bootable. I do not recommend that. If you use dd if=/dev/sda1 of=/dev/sdb1 the ssd will probably not be bootable without reinstalling the bootloader. This also depends on whether you use msdos partition table or gpt.
    – Fabian
    Commented May 19, 2014 at 13:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .