GeeCON Prague 2014*
The moose likes Linux / UNIX and the fly likes Burning the OS image from an SDHC card Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Burning the OS image from an SDHC card" Watch "Burning the OS image from an SDHC card" New topic
Author

Burning the OS image from an SDHC card

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9399
    
    2

Is there a tool that any of you might know to burn the image of the contents of my SDHC card? I mean something similar to the Time Machine from Apple?


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16103
    
  21

Do you mean something like backing up the OS image to a CD/DVD? If so, you'd need to make an ISO flat file out of the card's contents and use the cdrecord utility to write it to the disc. For DVD, you can skip the ISO and use the root of the mounted SD card directly, something like this:



growisofs makes the ISO a transient object so that you don't actually have to physically create it.

Note that if you want the created ISO to be bootable, you'll have to do a little more work, since the simple form of the command does a straight file replication without regard for the "magic" boot zone of the CD or DVD.


Customer surveys are for companies who didn't pay proper attention to begin with.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9399
    
    2

Tim Holloway wrote:Do you mean something like backing up the OS image to a CD/DVD? If so, you'd need to make an ISO flat file out of the card's contents and use the cdrecord utility to write it to the disc. For DVD, you can skip the ISO and use the root of the mounted SD card directly, something like this:



growisofs makes the ISO a transient object so that you don't actually have to physically create it.

Note that if you want the created ISO to be bootable, you'll have to do a little more work, since the simple form of the command does a straight file replication without regard for the "magic" boot zone of the CD or DVD.


Yes, I want the ISO to be bootable. I'm currently installing MongoDB for which unfortunately, there is no packaged version. I have to compile it from the sources and install it to the SD card on my RasPi. It takes at least 5 to 8 hours to get this done. If during the next couple of months, I mess something up with my SD card, I do not want to go through the pain of loosing 5+ hours on getting MongoDB on to the RasPi. So I would like to get an ISO image of my SD card and make it bootable such that if something goes wrong, I can get back the current state of it working.
Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9399
    
    2

It actually looks much simpler than I thought!

http://lifehacker.com/how-to-clone-your-raspberry-pi-sd-card-for-super-easy-r-1261113524
 
GeeCON Prague 2014
 
subject: Burning the OS image from an SDHC card