1

I have an old, unbranded 2GB USB with 10.10 that is running a Samba server connected to a RAID array (basically a makeshift NAS.) As most people do, I started running out of space with the various servers and packages I needed to install over the years. I purchased a 16GB USB drive (one of those SanDisk micro ones) to upgrade it, but I'm not sure how I should go about cloning the old 2GB disk to the new 16GB. I am doing this from my MacBook Pro. For reference, my diskutil list is...

/dev/disk0 (MacBook Pro)
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Mac OS X                499.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (upgrade USB)
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *16.0 GB    disk1
   1:             Windows_FAT_32 NO NAME                 16.0 GB    disk1s1
/dev/disk2 (old USB)
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *2.1 GB     disk2
   1:                      Linux                         254.8 MB   disk2s1
   2:                  Linux_LVM                         1.9 GB     disk2s5

Using this answer as well as the Ubuntu USB instructions for OS X, my initial thought was to...

  1. Unmount both disks.
  2. dd if=/dev/disk2 of=/dev/disk1
  3. Repartition the 16GB to utilize the entire disk.

However, it feels like it just shouldn't be that easy, and I'm worried I might mess something up on the upgrade USB. Is this the correct course of action, or am I missing something important?

Thanks!

Patrick
  • 113
  • 5

1 Answers1

0

the dd command sounds right for the job.
In any case even if it doesn't work for some reason it won't mess up anything on your old usb stick since it is just reading from it and writing to the other one.

However to speed things up I'd advise you to use the bs flag and set it to 512k so your command should look like

dd if=/dev/disk2 of=/dev/disk1 bs=512k

this sets the read/write blocksize to 512kb instead of the default 512 bytes

Daniel W.
  • 3,436