ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 8:27 am

Hi,
i have a Raspberry pi3 with a 32GB SD Card and all the things configured on it.
Now, i buyed a pi4 and i want to move this SD card from the pi3 to the pi4.
I read on the internet i can upgrade the SD card to use it on the pi4, but nobody say how.
How can i do this?
Thanks a lot in advance...

Christian

User avatar
HawaiianPi
Posts: 7842
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 8:39 am

Short answer, you can't.

The Pi4 uses a new version of Raspbian (Buster) and upgrading from one version to the next (Stretch to Buster) is not recommended.

Longer answer, you shouldn't.

If you look online you'll find ways to upgrade an older version to a newer one, but that's not recommended because it's not likely to work as expected. You may corrupt your card and end up with a non-bootable OS. Or it may boot up fine, giving you hope, only to find loads of stuff broken.

The bottom line is, it's almost certainly easier to start over from a fresh install, using your old card as a reference, then it will be to try and upgrade and then troubleshoot all of the problems you'll run into.
Last edited by HawaiianPi on Tue Jun 25, 2019 8:43 am, edited 1 time in total.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups, and where is that annoying music coming from?

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 8:41 am

ducarpit wrote:
Tue Jun 25, 2019 8:27 am
Hi,
i have a Raspberry pi3 with a 32GB SD Card and all the things configured on it.
Now, i buyed a pi4 and i want to move this SD card from the pi3 to the pi4.
I read on the internet i can upgrade the SD card to use it on the pi4, but nobody say how.
How can i do this?
Thanks a lot in advance...

Christian

It is not recommended, but after making a full back up change the sources from Stretch to Buster:

This has a section for Jessie to Stretch, just change the names:

https://www.raspberrypi.org/documentati ... pdating.md


Personally just went with creating a fresh Raspbian Buster with Desktop SD Card......
Take what I advise as advice not the utopian holy grail, and it is gratis !!

User avatar
rpdom
Posts: 22361
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 11:41 am

One issue that may catch you out with the upgrade is that the recommended /boot partition size is now 100MB, which is a bit larger than it used to be. It may cause problems during upgrades now or in the future if it isn't resized.

I'm going to try an upgrade of a Stretch Lite Pi to Buster later today (probably) and see how it goes using these steps:

1. Backup working Stretch card to new card.

2. Boot on new card.

3. Change sources.list files.

4. apt-get update and dist-upgrade.

5. Check everything still works.
Unreadable squiggle

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 12:21 pm

rpdom wrote:
Tue Jun 25, 2019 11:41 am
One issue that may catch you out with the upgrade is that the recommended /boot partition size is now 100MB, which is a bit larger than it used to be. It may cause problems during upgrades now or in the future if it isn't resized.

I'm going to try an upgrade of a Stretch Lite Pi to Buster later today (probably) and see how it goes using these steps:

1. Backup working Stretch card to new card.

2. Boot on new card.

3. Change sources.list files.

4. apt-get update and dist-upgrade.

5. Check everything still works.

On a fresh Raspbian Buster install it is a 256MB FAT32 Boot Partition ;)
Take what I advise as advice not the utopian holy grail, and it is gratis !!

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 12:29 pm

Hi, thanks to all.
But i know Buster is not available in the stable channel yet, am i right?
I read in the past in the middle of july....
Christian

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 12:33 pm

ducarpit wrote:
Tue Jun 25, 2019 12:29 pm
Hi, thanks to all.
But i know Buster is not available in the stable channel yet, am i right?
I read in the past in the middle of july....
Christian

Raspbian Buster was released on the 20th June 2019

http://downloads.raspberrypi.org/raspbi ... _notes.txt


Maybe you are confusing with Debian Buster which is due official release some time early July 2019 ?
Take what I advise as advice not the utopian holy grail, and it is gratis !!

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 12:46 pm

fruitoftheloom wrote:
Tue Jun 25, 2019 12:33 pm
ducarpit wrote:
Tue Jun 25, 2019 12:29 pm
Hi, thanks to all.
But i know Buster is not available in the stable channel yet, am i right?
I read in the past in the middle of july....
Christian

Raspbian Buster was released on the 20th June 2019

http://downloads.raspberrypi.org/raspbi ... _notes.txt


Maybe you are confusing with Debian Buster which is due official release some time early July 2019 ?
Yes, i confused the two SO, sorry!

So i have to try to update from stretch to buster and resize (before) the /boot partition.
It doesn't seem simple ahaha

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 12:51 pm

ducarpit wrote:
Tue Jun 25, 2019 12:46 pm
fruitoftheloom wrote:
Tue Jun 25, 2019 12:33 pm
ducarpit wrote:
Tue Jun 25, 2019 12:29 pm
Hi, thanks to all.
But i know Buster is not available in the stable channel yet, am i right?
I read in the past in the middle of july....
Christian

Raspbian Buster was released on the 20th June 2019

http://downloads.raspberrypi.org/raspbi ... _notes.txt


Maybe you are confusing with Debian Buster which is due official release some time early July 2019 ?
Yes, i confused the two SO, sorry!

So i have to try to update from stretch to buster and resize (before) the /boot partition.
It doesn't seem simple ahaha

The best advice as always is to start with a fresh install, Buster works well on my RPi 2B v1.1
Take what I advise as advice not the utopian holy grail, and it is gratis !!

ralphrmartin
Posts: 29
Joined: Sat May 06, 2017 3:42 pm

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 4:19 pm

I had a RPi 3 booting from the SD, but with the main OS on a USB HD. (I.E. /boot was the SD, / was the HD).
Here's how I replaced it with an RPi 4:
Edit /etc/apt/sources.list replacing "stretch" by "buster"
Edit /etc/apt/sources.list.d/raspi.list replacing "stretch" by "buster"
sudo apt update
sudo apt dist-upgrade
reboot, check it works OK.
Remove SD, USB HD, plug them into RPi 4
Boot

All was working OK for me.

This was for a machine used as a web server. I can't promise it will work for you using the RPi as a desktop etc.

fruitoftheloom
Posts: 27225
Joined: Tue Mar 25, 2014 12:40 pm

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 4:40 pm

Buster Blog including full instructions how to go from Stretch to Buster at your own volition:

https://www.raspberrypi.org/blog/buster ... -raspbian/
Take what I advise as advice not the utopian holy grail, and it is gratis !!

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 5:35 pm

ralphrmartin wrote:
Tue Jun 25, 2019 4:19 pm
I had a RPi 3 booting from the SD, but with the main OS on a USB HD. (I.E. /boot was the SD, / was the HD).
Here's how I replaced it with an RPi 4:
Edit /etc/apt/sources.list replacing "stretch" by "buster"
Edit /etc/apt/sources.list.d/raspi.list replacing "stretch" by "buster"
sudo apt update
sudo apt dist-upgrade
reboot, check it works OK.
Remove SD, USB HD, plug them into RPi 4
Boot

All was working OK for me.

This was for a machine used as a web server. I can't promise it will work for you using the RPi as a desktop etc.
Did you expand the /boot partition from 100mb to 256mb? Other users below said this.....

User avatar
thagrol
Posts: 9847
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 9:04 pm

rpdom wrote:
Tue Jun 25, 2019 11:41 am
One issue that may catch you out with the upgrade is that the recommended /boot partition size is now 100MB, which is a bit larger than it used to be. It may cause problems during upgrades now or in the future if it isn't resized.
I'd expect problems doing that. Last time I tried the library used by fdisk and/or gparted couldn't resize FAT partitions as small as the one used by raspbian.

It can be done, but it's not trivial:
  1. Backup your SD card
  2. Boot from a second SD card
  3. Connect the original SD card via a USB card reader but do not mount it
  4. (Assuming the desktop here) Launch gparted and select the original SD card
  5. Reduce the size of the root partition and move it's start position to the right.
  6. Delete the existing FAT partition
  7. Createa new one of the desired size
  8. Write changes to disc
  9. Close gparted
  10. Mount the root partition of the original Sd card
  11. Edit /etc/fstab so that the entry for /boot matches the new partition (either use the new PARTUUID, UUID, or /dev/mmcblk0p1)
  12. Unmount the root partition and moun the /boot partition
  13. Copy the files for /boot from your backup to the new partition
  14. Shutdown, swap SD cards and boot.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 9:40 pm

thagrol wrote:
Tue Jun 25, 2019 9:04 pm
rpdom wrote:
Tue Jun 25, 2019 11:41 am
One issue that may catch you out with the upgrade is that the recommended /boot partition size is now 100MB, which is a bit larger than it used to be. It may cause problems during upgrades now or in the future if it isn't resized.
I'd expect problems doing that. Last time I tried the library used by fdisk and/or gparted couldn't resize FAT partitions as small as the one used by raspbian.

It can be done, but it's not trivial:
  1. Backup your SD card
  2. Boot from a second SD card
  3. Connect the original SD card via a USB card reader but do not mount it
  4. (Assuming the desktop here) Launch gparted and select the original SD card
  5. Reduce the size of the root partition and move it's start position to the right.
  6. Delete the existing FAT partition
  7. Createa new one of the desired size
  8. Write changes to disc
  9. Close gparted
  10. Mount the root partition of the original Sd card
  11. Edit /etc/fstab so that the entry for /boot matches the new partition (either use the new PARTUUID, UUID, or /dev/mmcblk0p1)
  12. Unmount the root partition and moun the /boot partition
  13. Copy the files for /boot from your backup to the new partition
  14. Shutdown, swap SD cards and boot.
Hi, congratulation, very very good idea.
But i have some questions:
Point 2/3/4: i can do this also with a PC with a Linux distributions, am i right? I think it's not necessary another raspberry...i can use my PC and insert the SD card in a USB adapter.
Point 6/7: why have i to delete and then recreate the /boot partition? After reducing the /root, i have space at right to enlarge the /boot partition. I think it is not necessary to delete it, recreate it and the restore the files on it.

Correct me if i am wrong.
Thanks a lot
Christian

User avatar
thagrol
Posts: 9847
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK

Re: How can i upgrade a pi3 SD card to pi4?

Tue Jun 25, 2019 10:06 pm

ducarpit wrote:
Tue Jun 25, 2019 9:40 pm

Hi, congratulation, very very good idea.
But i have some questions:
Point 2/3/4: i can do this also with a PC with a Linux distributions, am i right? I think it's not necessary another raspberry...i can use my PC and insert the SD card in a USB adapter.
Yep and for steps 10 - 13.
Point 6/7: why have i to delete and then recreate the /boot partition?
Because fdisk/gparted can't resize a FAT partition as small as the one used by raspbian
After reducing the /root, i have space at right to enlarge the /boot partition. I think it is not necessary to delete it, recreate it and the restore the files on it.
The disc space used by a partition has to be contiguous. You can't split it between space at the start of the disc and space at the end. Well you probably can using LVM et al but that ain't gonna work for the /boot partition.

You have to move the root partition so that the free space is between the existing FAT partition and the start of the root partition.

As stated above, the current partitioning tools cannot handle resizing a FAT partition of the size of the /boot partition in raspbian stretch (and earlier). If you want to enlarge it, you have no choice but to delete it and recreate it.

I'm not sure what the lower limit for increasing the FAT partition size is. You may find it'l work with a sufficiently large value, however that may then be too big for what's going on it.

A windows PC might be able to do it but, frankly, I wouldn't trust windows to make changes to linux partitions.
Knowledge, skills, & experience have value. If you expect to profit from someone's you should expect to pay for them.

All advice given is based on my experience. it worked for me, it may not work for you.
Need help? https://github.com/thagrol/Guides

Andryshik345
Posts: 1
Joined: Wed Jun 26, 2019 8:40 am

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jun 26, 2019 8:44 am

Can I just replace SD card from my RPi 3 with Raspian Stretch to RPi 4 and continue to use the configured system?

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jun 26, 2019 8:54 am

thagrol wrote:
Tue Jun 25, 2019 10:06 pm
ducarpit wrote:
Tue Jun 25, 2019 9:40 pm

Hi, congratulation, very very good idea.
But i have some questions:
Point 2/3/4: i can do this also with a PC with a Linux distributions, am i right? I think it's not necessary another raspberry...i can use my PC and insert the SD card in a USB adapter.
Yep and for steps 10 - 13.
Point 6/7: why have i to delete and then recreate the /boot partition?
Because fdisk/gparted can't resize a FAT partition as small as the one used by raspbian
After reducing the /root, i have space at right to enlarge the /boot partition. I think it is not necessary to delete it, recreate it and the restore the files on it.
The disc space used by a partition has to be contiguous. You can't split it between space at the start of the disc and space at the end. Well you probably can using LVM et al but that ain't gonna work for the /boot partition.

You have to move the root partition so that the free space is between the existing FAT partition and the start of the root partition.

As stated above, the current partitioning tools cannot handle resizing a FAT partition of the size of the /boot partition in raspbian stretch (and earlier). If you want to enlarge it, you have no choice but to delete it and recreate it.

I'm not sure what the lower limit for increasing the FAT partition size is. You may find it'l work with a sufficiently large value, however that may then be too big for what's going on it.

A windows PC might be able to do it but, frankly, I wouldn't trust windows to make changes to linux partitions.
Ok, no problems, thank a lot. This evening i will try to expand the /boot partition from 100MB to 256MB (at least). Then, i will inform you how the test is gone.
Thanks a lot

Christian

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jun 26, 2019 6:06 pm

thagrol wrote:
Tue Jun 25, 2019 10:06 pm
ducarpit wrote:
Tue Jun 25, 2019 9:40 pm

Hi, congratulation, very very good idea.
But i have some questions:
Point 2/3/4: i can do this also with a PC with a Linux distributions, am i right? I think it's not necessary another raspberry...i can use my PC and insert the SD card in a USB adapter.
Yep and for steps 10 - 13.
Point 6/7: why have i to delete and then recreate the /boot partition?
Because fdisk/gparted can't resize a FAT partition as small as the one used by raspbian
After reducing the /root, i have space at right to enlarge the /boot partition. I think it is not necessary to delete it, recreate it and the restore the files on it.
The disc space used by a partition has to be contiguous. You can't split it between space at the start of the disc and space at the end. Well you probably can using LVM et al but that ain't gonna work for the /boot partition.

You have to move the root partition so that the free space is between the existing FAT partition and the start of the root partition.

As stated above, the current partitioning tools cannot handle resizing a FAT partition of the size of the /boot partition in raspbian stretch (and earlier). If you want to enlarge it, you have no choice but to delete it and recreate it.

I'm not sure what the lower limit for increasing the FAT partition size is. You may find it'l work with a sufficiently large value, however that may then be too big for what's going on it.

A windows PC might be able to do it but, frankly, I wouldn't trust windows to make changes to linux partitions.

Hi, i have just done this operations on my Raspberry and all is OK.
At the moment i am monitoring it to trust if it it stable and all is OK.
I rsized the /boot partition from 100MB to 500MB (i am a little bit megalomaniac :D ).
Tomorrow, if it's all OK, i will upgrade from scratch to buster.
Then i will inform you how the upgrade was gone.
Best regards

Christian

axrst
Posts: 8
Joined: Fri Jul 28, 2017 3:48 pm
Location: Greece

Re: How can i upgrade a pi3 SD card to pi4?

Sun Oct 13, 2019 7:13 pm

Hi,

Did you do it finally? Was it success?

I've already upgraded from Stretch to Buster and I have a working system to my RPi3. Now I want to transfer the card to my new RPi4. So I have to do the resizing thing with the /boot partition. Just to make some things clear: To transfer the /boot partition in the new place, all I have to do is just to copy the files from the old to new? And the new PARTUUID, UUID for editing the /etc/fstab will be showing at the gparted?

Thanks,
Chris.

axrst
Posts: 8
Joined: Fri Jul 28, 2017 3:48 pm
Location: Greece

Re: How can i upgrade a pi3 SD card to pi4?

Fri Oct 18, 2019 2:33 pm

Well, after some testing, I didn't manage to do it.

I had already upgraded from strech to buster.
I did the steps for resizing the /boot partition to 350MB, and copied the files from the backup to it. The SD card is bootable by RPi3, but not from RPi4. I also tried to make a new buster card and transfer the /boot files from there to original resized card, but still with no luck. The system hungs in the first screen after some loading (when searches for keyboard drivers if I remember well). Maybe needs to first make the /boot resizing and after upgrading to buster.

Never-mind, I did a fresh install and re-set my services from the beginning.

That's for anyone who wants to play with it...

npaisnel
Posts: 269
Joined: Sun Aug 05, 2018 4:23 pm

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jan 01, 2020 9:27 am

I thought about creating a new thread, but found this one, so decided might be just as well to ask in here.

The OP asks about Upgrading the Pi3b SD card

I don’t want to UPGRADE or change anything happy with my setup on the Pi3 as it is, apart from it stuttering the audio output a bit, on complex signals, (am running it as Software Defined Radio). So heavy signal processing ‘bogs’ it down a bit and output ‘stutters’. Hoping faster processor and more RAM might help


So if I bought a Pi 4, will the Pi3b+ SD card just slip straight in the ‘4’ and boot it without any upgrade, ?

drgeoff
Posts: 13733
Joined: Wed Jan 25, 2012 6:39 pm

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jan 01, 2020 9:53 am

npaisnel wrote:
Wed Jan 01, 2020 9:27 am
I thought about creating a new thread, but found this one, so decided might be just as well to ask in here.

The OP asks about Upgrading the Pi3b SD card

I don’t want to UPGRADE or change anything happy with my setup on the Pi3 as it is, apart from it stuttering the audio output a bit, on complex signals, (am running it as Software Defined Radio). So heavy signal processing ‘bogs’ it down a bit and output ‘stutters’. Hoping faster processor and more RAM might help


So if I bought a Pi 4, will the Pi3b+ SD card just slip straight in the ‘4’ and boot it without any upgrade, ?
Depends on what is on the card.

A card with Stretch will work in a 3B+ and any previous model. It will not work in a 4B.

A card with Buster will work in any RPi available at the time I write this.
Quis custodiet ipsos custodes?

npaisnel
Posts: 269
Joined: Sun Aug 05, 2018 4:23 pm

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jan 01, 2020 10:15 am

Ok,
Thanks
Rpi3 was setup in Sept-Oct 2018... not come across Buster yet.

The pi just sits in the attic working.

SSH into it occasionally to reboot it.

I had to SSH into it this morning to do a yearly schedule update to the home control HA-Bridge / Heyu setup, and it got me thinking about upgrading it. It runs HA-Bridge for X-10 home control and an RTL-SDR dongle for radio . Got me thinking about upgrading the hardware. Wondered about Odriod, then saw a Rpi4 was available.. If it was easy SD card swap I’d have done it.

Guess I’ll leave well alone. It’s working! Don’t screw with it !

Thank you

ducarpit
Posts: 79
Joined: Mon Jan 09, 2017 8:32 am

Re: How can i upgrade a pi3 SD card to pi4?

Wed Jan 01, 2020 12:48 pm

In the past, i tryied to update my Raspbian Stretch to Buster and as a whole it worked but the stability of the system wasn't good, sometimes the system crashed and i had to reboot it manually.
So finally, i decided to erase my SD card and install on it the new Buster system.....then i replaced some standard configurations with my configurations of the previoos Stretch system and now all work very well.
I suggest to you to do the same procedure....
Christian

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

Re: How can i upgrade a pi3 SD card to pi4?

Sat Jul 18, 2020 3:19 pm

popy wrote:
Sat Jul 18, 2020 3:13 pm
When you are on Raspbian buster you can upgrade!
But the originator of the thread, a year ago, was NOT using Buster.
Beware of the Leopard

Return to “Advanced users”