LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 04-19-2017, 06:48 AM   #1
enine
Senior Member
 
Registered: Nov 2003
Distribution: Slackware 14.2, SlackwareArm-current
Posts: 1,197
Blog Entries: 4

Rep: Reputation: 183Reputation: 183
Copy MicroSD


This is probably a more general question but its only failing when I copy a MicroSD card from my PI.

I try to take a MicroSD from one of my Pi's and plug into a reader on my laptop, DD it to an image then DD that to another microsd and plug the new one back into the same Pi and have it boot.

All my hardware should be fine since I can download a pre-made image and write it fine, I can read/write files from the Sd cards fine, I just can't make a bootable copy.

I've tried various block sizes, etc. There must be something simple I'm overlooking.
 
Old 04-19-2017, 08:53 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,577

Rep: Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816
again, there is no question, there is no problem description, so what do you expect now?
http://catb.org/~esr/faqs/smart-questions.html
 
Old 04-19-2017, 10:54 AM   #3
enine
Senior Member
 
Registered: Nov 2003
Distribution: Slackware 14.2, SlackwareArm-current
Posts: 1,197
Blog Entries: 4

Original Poster
Rep: Reputation: 183Reputation: 183
question is how can I copy/backup the microsd from my Pi successfully, I seem to be unable to.
 
Old 04-19-2017, 01:15 PM   #4
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX & Vuu-Do.
Posts: 1,857

Rep: Reputation: Disabled
Raspbian does it from within, not sure how, might be worth taking a look at.

Are you creating your new cards as bootable disks when you create your partition on them(?).
Also the type of formatting has something to do with whether they boot or not, (I think it might have to be 32bit dos formatted).

Sorry I can't be more helpful, as I only bought my one to see if it could replace a desktop computer for every day usage.
 
Old 04-19-2017, 01:50 PM   #5
enine
Senior Member
 
Registered: Nov 2003
Distribution: Slackware 14.2, SlackwareArm-current
Posts: 1,197
Blog Entries: 4

Original Poster
Rep: Reputation: 183Reputation: 183
I'm taking a bootable MicroSD with a running OS on it, shutting down that OS and DD'ing it to an image. So its copying partitions, formatting, etc. Then I try to DD it back to a new MicroSD and then pop that new microSD into the Pi and it won't boot.

Its similar to how you would download rasbain from the RPi foundation and DD it to a blank card.
 
Old 04-19-2017, 02:38 PM   #6
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 476

Rep: Reputation: 81
maybe read here?
 
Old 04-19-2017, 03:11 PM   #7
enine
Senior Member
 
Registered: Nov 2003
Distribution: Slackware 14.2, SlackwareArm-current
Posts: 1,197
Blog Entries: 4

Original Poster
Rep: Reputation: 183Reputation: 183
Ok, so the directions there are what I'm doing;


Code: Select all
dd if=/dev/sdx of=/path/to/image


/dev/sdx == what the device is... in this example /path/to/image will be the directory created in your home directory. I called my image 'slack.image'. This will take a few minutes.

When done, just pull the card and get your Pi up and running again.

Now, to clone a copy, get another SD card THE SAME SIZE as the copied one.

Insert it into the machine you already copied the Pi SD from and issue (again DO NOT MOUNT IT):

Code: Select all
dd if=/path/to/image of=/dev/sdx

for whatever reason the dd to image and dd from image to new card works fine but the new card won't boot the pi.
 
Old 04-19-2017, 06:04 PM   #8
glorsplitz
Member
 
Registered: Dec 2002
Distribution: slackware!
Posts: 476

Rep: Reputation: 81
All that worked for me in the link I posted.

I cloned slackwarearm sd card and openelec sd card, got two new rpi3, plugged in cloned sd cards and was up and running after few tweaks here there for this and that.

I'd say post at fatdog but I know the fatdog regulars check here often too.

I've also read sometimes sd cards same brand, size, etc, will sometimes misbehave.

You figure it out post back.

Last edited by glorsplitz; 04-19-2017 at 06:06 PM.
 
Old 04-19-2017, 08:13 PM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 15,812

Rep: Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168Reputation: 2168
I don't use Raspian, but with Arch, I just copy (as in cp or rsync) the files up to my PC hard disk, then stick a new SDCard in and copy back. Works on a pi3, and also a goflex home backup system (Marvell Sheeva plug) in which I installed a new (real) hard disk about a week ago.
Has the side benefit you know the source filesystem(s) is ok and readable.

Edit: presumes U-Boot or similar has been flashed successfully beforehand.

Last edited by syg00; 04-19-2017 at 08:15 PM.
 
Old 04-20-2017, 01:07 AM   #10
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,577

Rep: Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816Reputation: 2816
you cannot copy the sd card which is currently in use.
what you told in post #5 usually works, but would be nice to explain what did you exactly tried and what's happened.
 
Old 04-20-2017, 04:11 AM   #11
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,347

Rep: Reputation: 91
Many low-cost SD cards can't work with non-fat filesystems.
 
Old 04-21-2017, 03:26 PM   #12
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 1,131
Blog Entries: 2

Rep: Reputation: 147Reputation: 147
from my own mileage:
1. Some cards ("non brand" names) seem to misbehave on R_Pi?
2. what has the same md5 is the same (try comparing md5sum of the image got from the copy?)
3. R_Pi seems to be cherry picking SDcards, so try sticking to Samsung or the like branded ones for testing?

Once just as I was about to quit, I reiterated with a "branded" SDcard, and got it going?

And I don't speak off top of my head here:

On the zero "track", usually there is the boot loader that "imports" the kernel et al. (in between the partition table and the 1st partition) to the RAM, there from all that matter is the parttion(s) contain filesystems that the kernel has modules for (built-in or pre-loaded (initrd->RAM) )

So for testing try an known good SDcard and only the "boot payload" (the begin and the fat partition).

If You get lucky, go for it and buy an device from an reputable brand?

If fail, try pull back the image from the 2nd SDcard and compare the two copies?

maybe the card reader is faulty, or it has intermittent problems (cable? plugs?)

And please report back?
 
Old 04-22-2017, 12:28 PM   #13
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,347

Rep: Reputation: 91
https://pandorawiki.org/SD_compatibility_list
 
1 members found this post helpful.
Old 04-25-2017, 06:32 PM   #14
briselec
Member
 
Registered: Jun 2013
Location: Ipswich, Australia
Distribution: Slackware
Posts: 62

Rep: Reputation: Disabled
Not a Pi user but just a thought. Is fstab using UUID? That would explain why it doesn't boot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
microsd partition corrupted. Sefid par Linux - Hardware 1 06-05-2015 12:20 AM
Get detailed information about microsd hardware? coralfang Linux - Hardware 2 10-28-2014 11:18 PM
[SOLVED] MicroSD Memory Card Recovery NotAComputerGuy Linux - Newbie 7 06-30-2014 08:44 PM
PengPod boot microSD card djheadley Linux - Software 1 04-15-2014 03:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 11:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration