2

Im new to this forum, so if i have posted the message in the wrong place please accept my apologies.

Issue: Not able to clone an SD Card successfully

Background: I have an SD card that is running some audio encoding software, its happy and works well, we can re-boot etc and there are no issues. I will call this SD "Source".

Trying to achieve: I need to make 5 copies of this SD card for backup and redundancy purposes (because of what we are doing the cards will be stored in physically different locations and need to be ready as quickly as possible) i.e. put SD card into a spare Raspberry Pi 3 power on and go.

To Note: Im using a Mac and we use macs generally, so need to be mac solutions.

Steps to reproduce:

Identify SD

diskutil list

Backup

sudo dd if=/dev/disk2 of=/Users/doozer/Desktop/encoder.img

Duration = 25 mins for 16GB

Restore

sudo dd if=/Users/doozer/Desktop/encoder.img of=/dev/disk2

Duration = 198 mins (3.3 hours) for 16GB

Unmount

diskutil unmountDisk /dev/disk2

Issue:

When I boot Destination SD Card in the same Rpi I get a kernel panic

" not syncing: VFS: Unable to mount root fs on unknown-block(179,7)

Can any Mac users give me any really good step by step ways to clone an SD card that are proven to work. I have confirmed Im using the same type and size SD Cards (Class 10, 16GB)

I appreciate your help and feedback.

Thanks in advance. B

1

Another option is to tell the pi to make it's own.Click Start/accessories/ Sd card copier. It will clone the active card to a backup with all updates included.

0

Following the advise from @yamboy1

Download and install ApplePi-Baker

The site looks a bit odd, but the utility is really slick and easy.

Create your backup from here.

Then Restore using the same tool on the same sized SD Card. Worked perfectly.

Great solution for all Mac users.

0

Here is how to clone an SD card perfectly every time. Tested to work up to 32 GB.

Do a proper shutdown of the Pi. Wait until the green light stops flashing as it flushes all the buffers.

Insert it into whatever adapter you need to plug it into a Windows PC.

Open Win32DiskImager (download here)

Select the drive that contains the card.

Browse to a directory where you want the image to be stored

Click on Read

When it is finished, eject the card and replace it with the new one

Re-select the drive where the new card is installed.

Click Write.

Voila, a perfect duplicate. Plus a backup copy on disk.

If you use a Mac, there are a lot of alternative programs that claim to be similar to Win32DiskImager.

https://www.google.com/search?q=mac+os+alternative+to+win32diskimager+for+sd+cards

  • -1 @Doozer UK uses MacOS, not Windows. – user67191 Jun 5 '17 at 1:47
  • 1
    Im going to borrow a Windows 10 laptop just to try it (I'm desperate at the moment!) – Doozer UK Jun 5 '17 at 1:48
  • Did ApplePi-Baker not work? – user67191 Jun 5 '17 at 3:00
  • Try clonezilla. It's made for cloning disks. – user67191 Jun 5 '17 at 3:02
  • @yamboy1 PiBaker worked brilliantly, I now have my images and they are all working perfectly. – Doozer UK Jun 6 '17 at 20:14
0

You could try setting a higher block size and ensure it's burnt properly so it can be read in the raspberry pi.

DD uses 512 bytes as the default block size. Try a higher value as such

sudo dd if=/dev/disk2 of=/Users/doozer/Desktop/encoder.img **bs = 1M**

Here's a guide for effectively calculating the right block size:

https://stackoverflow.com/a/6161892/6562723

And here's one for the reasons to set the right block size:

https://flux.ninja/2016/03/fixing-usb-drive-block-size.html

If you'd like to see the progress (as a bonus), try:

sudo dd if=/dev/disk2 of=/Users/doozer/Desktop/encoder.img **bs=1M status=progress**

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.