Jump to content

SDCard from backup doesnt start


Ruediger

Recommended Posts

Hello!

 

Shortform:

SDCard recreated from .iso image does not boot.

 

####

 

Detailed:

I use an Odroid as my Minecraft server. I have a fast 32GB card in it, and a usb hdd for swap and media files.

 

After the setup was working, and after each update, I pulled the card from the machine (after shutting down) and plugged it into my PC to make a backup:

 

dd if=/dev/sdc bs=4M | gzip -c >/media/backup/odroid.img.gz

 

In case I ever needed to recreate the card, I have this line to run:

gunzip -c /media/backup/odroid.img.gz | dd of=/dev/sdc bs=4M

 

/dev/sdc is a placeholder for whichever drive my USB Cardreader is appearign as.

 

I do have a https enabled Apache webserver with some static content, a Mumble voicechat server for gaming voicechat, Dokuwiki for my occasional bouts of hobby writing and a lot of other little tidbits on the machine, such as a VPN and one of these mediaserver thingies for my TV.

That is a LOT of hand crafting that went into it over the years, and I am effectively unable to recreate all the little things I added over the years, which is why a new setup is something I am scared shitless imagining.

Also, I named every backup separately, so I do have a LOT of backups - my backup drive is 4TB in size and my systems run on average on a space budged of 32 to 64 GB, my home partition being rsynced to a NAS via 1GB ethernet on each shutdown.

 

When my SDCard died after years of trusty service and I replaced it with a newer, faster card, writing the isoimage went smoothly, the ext4 partition was flawless un doing fsck on it before doing sync and then pulling the card.

 

However, the machine doesn't start. Power LED goes on, but nothing else happens.

 

####

 

The error I see - Power LED on, no Keepalive LED blinking - makes me guess the bootloader isn't - or wasn't - backed up with the method I used.

However, the way I use DD I am very sure it should copy the whole drive inclusive the bootloader, grub, lilo, uboot or whatever else there might be on it.

Even cloning Amiga HDDs works flawlessly with DD this way.

 

So, assuming I am correct and the way the backup was made was correct:

1) is there a known way to get an image written to SDCard that wil lhave the odroid bootloader workable?

2) is there a trick, like creating a new SDCard from an Armbian image and then copying the /dev/sd*1 partition from the image file to the newly made sdcard, that might get the image working?

3) Which other recommendations or suggestions ( I don't know, like mounting a rewritten image and a newly made SDCard and then doing cp -a /mnt/source/* /mnt/target/ ?) that might help me get my system back to working do you people have?

 

With kind regards,

a frustrated SDCard-user

 

(with HDDs doing DD in the manner described above works nicely since almost 20 years for me, cloning systems between machines, replacing deceased drives and so on )

 

Board: Odroid C2
Link to comment
Share on other sites

The problem here I suspect is the sd-card got tear and wear, hence the capacity might drop, but if you ran a full dd of the entire card, the iso might become bigger than what fits on the sd-card (that now is a tiny bit smaller).
It's not unusual that the cells are still readable but not writable, ie you can not modify the data. So when you create the img file, it is a complete one, but your card can no longer fit that img.

 

Let me shamelessly invite you to use my little project: shrink-backup

That way your img file becomes the size of the DATA on the device, not the entire thing.

Then it will get re-expanded to use the entire sd-card when you boot it the first time after restoration. (if your os is supported, armbian is)

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines