gate_thirteen
Posts: 5
Joined: Sun May 19, 2019 8:43 am

Issues cloning SD image for new Pi-3b

Sun May 19, 2019 8:59 am

Brainstrust --- I have searched high and low and haven't found a solution for this issue.
Quick summary -- I have a mature (read: customized over a long period of time) Raspbian/Retropie set up which works well on my main AV system.
I just bought a second Pi 3b, with same sized SD card, and I want to effectively flash the image from my main card to the new one, to save setup times and inconsistencies between the two Pis.
* I have edited the fstab table to reflect the blkid of the boot partitions on the second card.
* I have edited the cmdline.txt file to also reflect this blkid
I have set tty3 for a verbose boot screen.

The second Pi starts its boot sequence, runs through all its checks, it finds the SD root blkid, it finds the USB device (Rii keyboard) ... and then it just stops with the infamous "random: crng init done" message.
I have switched SD cards between the two Pis, and the expected result happens : the old card in the new Pi works fine, the new card in the old Pi hangs in boot.
The keyboard responds on screen, but pressing Enter (new line on blank screen) or F12 (^23) etc do nothing more to help progress.
Note: Connected to the new Pi is an HDMI cable direct to TV, ethernet cable to 8 port switch, power in and a USB dongle for the Rii keyboard. I've tried various unplugging options of the network cable, and USB dongle, no joy.

Is there some other file which I need to tweak, or is what I'm doing just an all round bad idea....?

Really, REALLY trying to avoid building a Raspbian/Retropie/Kodi and all the trimmings again from scratch, so if any has a good idea, I'm all ears!

Thanks in advance folks.

User avatar
B.Goode
Posts: 7870
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Issues cloning SD image for new Pi-3b

Sun May 19, 2019 11:34 am

Welcome to the Raspberry Pi forums.
Really, REALLY trying to avoid building a Raspbian/Retropie/Kodi and all the trimmings again from scratch, so if any has a good idea, I'm all ears!

For some time, many months if not years, the Raspbian Desktop GUI has had a tool in the drop-down menu system called SD Card Copier.

That might make a bootable clone of your working installation.

If your working installation is so old that you don't have this tool, the Raspberry Pi Foundation blog post that introduced it has update instructions.

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Issues cloning SD image for new Pi-3b

Sun May 19, 2019 10:13 pm

Another way...

1. in winpc backup the old microSD using Win32DiskImager
2. flash the backed up image to new microSD using Etcher
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

gate_thirteen
Posts: 5
Joined: Sun May 19, 2019 8:43 am

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 3:11 am

LTolledo wrote:
Sun May 19, 2019 10:13 pm
Another way...

1. in winpc backup the old microSD using Win32DiskImager
2. flash the backed up image to new microSD using Etcher
Thanks for the initial replies folks.
Just to be clear, I had already cloned the card using Win32dDiskImager (READ) and Etcher (WRITE), so there were no issues there.
I even pre-empted issues and created a 'target' fstab file (with correct blkid for root partitions) and edits the cmdline.txt to reflect this.

My workflow:
1. Use Win32DiskImager to make an unedited clone of my working SD card. Call this ORIG.img
2. On my working system, edit /etc/fstab to remove all USB disk mounts and change the boot partition to reflect correct blkid (xxxxxxxx-01 and xxxxxxxx-02) codes. Edit /boot/cmdline.txt to have the correct xxxxxxxx-02 root partition to be read. Note that by doing so, rebooting my system will break it ...
3. Clone this edited version via Win32DiskImager to COPY.img
4. Use Etcher to write back ORIG.img to the source SD card.
5. Use Etcher to write COPY.img to the new SD card.
6. Original version (on both RPi hardware) works fine. Cloned/edited version fails to boot.

So am really scratching my head as to why my original copy boots fine, but the slightly modified version cannot progress past boot sequence. I am sure there's something simple that I am missing ... I was hoping by buying another 3b (and not the newer 3b+ version) would make this job easier!

gate_thirteen
Posts: 5
Joined: Sun May 19, 2019 8:43 am

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 3:12 am

B.Goode wrote:
Sun May 19, 2019 11:34 am
Welcome to the Raspberry Pi forums.
Really, REALLY trying to avoid building a Raspbian/Retropie/Kodi and all the trimmings again from scratch, so if any has a good idea, I'm all ears!

For some time, many months if not years, the Raspbian Desktop GUI has had a tool in the drop-down menu system called SD Card Copier.

That might make a bootable clone of your working installation.

If your working installation is so old that you don't have this tool, the Raspberry Pi Foundation blog post that introduced it has update instructions.
Thanks, I'll have a look tonight to see if I can progress with this.

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 6:23 am

gate_thirteen wrote:
Mon May 20, 2019 3:11 am
2. On my working system, edit /etc/fstab to remove all USB disk mounts and change the boot partition to reflect correct blkid (xxxxxxxx-01 and xxxxxxxx-02) codes. Edit /boot/cmdline.txt to have the correct xxxxxxxx-02 root partition to be read. Note that by doing so, rebooting my system will break it ...
3. Clone this edited version via Win32DiskImager to COPY.img
This is where you go wrong. When you create the image to clone the card at the same time the source blkid is also cloned and overwrites the target blkid. After cloning there will be two cards with the same blkid information but one card with a wrong entry in fstab and cmdline.

Having the same blkid on two cards is not a problem, except that you should not mount both cards at the same time on one system.
The road to insanity is paved with static ip addresses

gate_thirteen
Posts: 5
Joined: Sun May 19, 2019 8:43 am

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 6:38 am

Ernst wrote:
Mon May 20, 2019 6:23 am
gate_thirteen wrote:
Mon May 20, 2019 3:11 am
2. On my working system, edit /etc/fstab to remove all USB disk mounts and change the boot partition to reflect correct blkid (xxxxxxxx-01 and xxxxxxxx-02) codes. Edit /boot/cmdline.txt to have the correct xxxxxxxx-02 root partition to be read. Note that by doing so, rebooting my system will break it ...
3. Clone this edited version via Win32DiskImager to COPY.img
This is where you go wrong. When you create the image to clone the card at the same time the source blkid is also cloned and overwrites the target blkid. After cloning there will be two cards with the same blkid information but one card with a wrong entry in fstab and cmdline.

Having the same blkid on two cards is not a problem, except that you should not mount both cards at the same time on one system.
Ernst -- interesting. So what you're effectively saying is I have no need then to even alter the fstab or cmdline.txt files, because the clone process also clones the SD card blkid, which is matched by the original (unedited) fstab entries?

And then, if i simply plug my 2nd pi (and cloned card) into a different AV system then all should work? If it's as simple as that then I'll be super happy. I will admit I had both Pi's plugged into the same AV receiver at the same time, so perhaps that was confusing things.

Ernst
Posts: 1141
Joined: Sat Feb 04, 2017 9:39 am
Location: Germany

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 6:43 am

Yes, it is that simple ;-)
The road to insanity is paved with static ip addresses

gate_thirteen
Posts: 5
Joined: Sun May 19, 2019 8:43 am

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 6:45 am

Appreciate that --- at work right now, but will test this again tonight and will let you know how I got on.

LTolledo
Posts: 1548
Joined: Sat Mar 17, 2018 7:29 am

Re: Issues cloning SD image for new Pi-3b

Mon May 20, 2019 10:08 am

Ernst wrote:
Mon May 20, 2019 6:43 am
Yes, it is that simple ;-)
+1

in the procedure I posted above, there was no mention of editing anything ;)
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Return to “Troubleshooting”