anden88
Posts: 12
Joined: Fri Sep 19, 2014 11:02 pm

Will my SD card work if i put it in a new Pi (but same model

Fri Sep 19, 2014 11:05 pm

If I want to sell a product that containes Rasp Pi B+ then can I simply duplicate the SD card and put the duplicated SD cards with my program files and everything into new Rasp Pi B+ that i buy. And it will work?

Or will I have to reinstall Raspian on every new Rasp Pi B+ that I buy.

Another words, can a duplicated SD card directly work on any new Rasp Pi B+ if I just simply plug the SD card in.

/thanks

klricks
Posts: 6609
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Will my SD card work if i put it in a new Pi (but same m

Sat Sep 20, 2014 4:19 am

Yes you can duplicate SD cards and they will work on any RPi any model. (As long as you start with a recent image).
The OS is installed to the SD card, the RPi itself does not store any data.
You might want to search about for details on duplicating images. Many run into trouble because cards labeled 8G or whatever are not all exactly alike so the image will fail to copy if the destination SD is a bit smaller than the original image.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
MattHawkinsUK
Posts: 538
Joined: Tue Jan 10, 2012 8:48 pm
Location: UK
Contact: Website

Re: Will my SD card work if i put it in a new Pi (but same m

Sat Sep 20, 2014 7:27 am

Quickly being able to swap or clone an SD card is one of selling points of the Pi. It's the main answer to the "can't you just use a laptop to learn programming?".

As pointed out the only issue with cloning is that not all cards of the same capacity are exactly the same size.

I'd recommend labeling your cards and noting down what's on each one.
My Raspberry Pi blog and home of the BerryClip Add-on board : http://www.raspberrypi-spy.co.uk/
Follow me on Google+, Facebook, Pinterest and Twitter (@RPiSpy)

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Will my SD card work if i put it in a new Pi (but same m

Sat Sep 20, 2014 10:24 am

Will my SD card work if i put it in a new Pi (but same model
Yes (i think so )

And IIMHO this is even posible with diffrent model's if the /boot partition files are up to date.
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

Vance
Posts: 9
Joined: Tue Sep 16, 2014 10:44 pm
Location: Florida (USA)

Re: Will my SD card work if i put it in a new Pi (but same m

Sun Sep 21, 2014 2:28 am

I have had good luck switching my two SD cards between my two model A's and one model B. The RPi will boot just fine on any of them.

I do remember having trouble with ssh keys not matching one time. I couldn't ssh into my RPi. I had to delete keys and make new keys. I thought at the time that this had to do with swapping the cards back and forth, but I'm not sure. I also have two wifi dongles between three RPi's. Which has the MAC address, the wifi dongle or the RPi? I don't know. Anyway, I now try to keep SD cards and wifi dongles matched with my RPi's to avoid any trouble. My trouble with not being able to ssh into my RPi may have nothing to do with swapping cards or wifi dongles, but I thought I would bring it up. I never tried duplicating the problem to verify the cause. I made the assumption and went with it.

So swapping SD cards may be OK, but maybe not under all circumstances.

Vance

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12344
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Will my SD card work if i put it in a new Pi (but same m

Sun Sep 21, 2014 3:40 am

anden88 wrote:If I want to sell a product that containes Rasp Pi B+ then can I simply duplicate the SD card and put the duplicated SD cards with my program files and everything into new Rasp Pi B+ that i buy. And it will work?

Or will I have to reinstall Raspian on every new Rasp Pi B+ that I buy.

Another words, can a duplicated SD card directly work on any new Rasp Pi B+ if I just simply plug the SD card in.

/thanks
in principle if you have a card that contains the latest version of the boot & "PI-bios" files then the combination of them will be compatible with any pi. any differences between PI's will be resolved by the equivalent off a "BIOS", that is part of the files loaded at boot, they take care of the possible differences, by detecting the model of PI they are running on, and then making suitable changes to correct those differences. For example there are PI's with different brands of SDRAM that need different operating parameters, the "PI-BIOS" takes care of that, also the B+ needs to generate a 25 MHz clock signal that on a B+ is used to clock the LAN/ETHERNET chip, earlier versions used a dedicated 25MHz crystal to do that.

Getting a SD-card replicated may sometimes be a problem, as no SD-card has exactly the same size, as lots of them have "bad flash sections", so every card has a different size, in fact some aftermarket (I mean "fake") cards simply increase card sizes by pretending that dodgy sections are "fine", and program the card's controller to use them and report the larger capacity.

it's enlightening to watch this: http://media.ccc.de/browse/congress/201 ... _xobs.html

The correct way to duplicate cards is to resize them so their size becomes smaller than the smallest expected size.
This can be done with a partition manager, which converts unused space into "free and empty space" by shrinking the partition.

alpeace89
Posts: 49
Joined: Wed Dec 04, 2013 12:34 am

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 12:18 pm

Yes this should work as long as it does not rely on using features only available on one RPi when you use it in a different model. Such as the extra GPIO on B+ if you went back to using an B.

Alex

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 12:46 pm

To add to what Alex has said you can easily test for the firmware revision and have an identical code base that will run on a model A, model B, model B+ or a Compute Module.

cat /proc/cpuinfo gives revision number that can be used in a userspace program.

Here's an example of how to decode it:
https://github.com/metachris/raspberryp ... t_model.py
Note: I don't think that code detects a Compute Module.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

DirkS
Posts: 9966
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 12:56 pm

DougieLawson wrote:Here's an example of how to decode it:
https://github.com/metachris/raspberryp ... t_model.py
Note: I don't think that code detects a Compute Module.
B+ (10) is also not recognised. Compute Module is 11.

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 1:32 pm

DirkS wrote:
DougieLawson wrote:Here's an example of how to decode it:
https://github.com/metachris/raspberryp ... t_model.py
Note: I don't think that code detects a Compute Module.
B+ (10) is also not recognised. Compute Module is 11.
It shouldn't be too hard to hack that.
I've also opened an issue on github for Chris's code.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 1:37 pm

r3d4 wrote:
Will my SD card work if i put it in a new Pi (but same model
Yes (i think so )

And IIMHO this is even posible with diffrent model's if the /boot partition files are up to date.
*.sh
I.T
smeg!

I forget the B+ needs module's / driver's for the newer usb/lan chip , that would require (some one build) modules to load and or an update of the kernel .!.
Last edited by r3d4 on Mon Sep 22, 2014 2:00 pm, edited 1 time in total.
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 1:43 pm

r3d4 wrote: I forget the B+ needs module's / driver's for the newer usb/lan chip , that would require (some one build) modules to load and or an update of the kernel .!.
Remember once you've done that piece with bootcode.bin and start*.elf (not *.sh) the micro SDCard will boot in a regular model A or model B (in a SDCard adapter).
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
r3d4
Posts: 967
Joined: Sat Jul 30, 2011 8:21 am
Location: ./

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 2:03 pm

DougieLawson wrote: (not *.sh)
sorry to confuse was just abstract colourful lang ;)
Real life is, to most, a long second-best, a perpetual compromise between the ideal and the possible.
-
Meanwhile, the sysadmin who accidentally nuked the data reckons "its best not run anything more with sudo today"
-
what about spike milligan?

User avatar
DougieLawson
Posts: 36316
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Will my SD card work if i put it in a new Pi (but same m

Mon Sep 22, 2014 3:07 pm

r3d4 wrote:
DougieLawson wrote: (not *.sh) :mrgreen:
sorry to confuse was just abstract colourful lang ;)
I think I missed adding a smiley.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “General discussion”