Updating a Raspberry Pi 2 boot disk to a Raspberry Pi 3

This is just the real basics as I figured out and a work in progress.  I have not really figured out yet what wireless network driver that needs to be added to a Pi2 image to make it see the embedded Pi3 wireless network, but using a wired ethernet it at least gives me the option to capture some code off a distributed Pi2 image so it can be dropped onto a fresh install of 2016-05-27-raspian-jessie.

So in the example, I am using the ProxyMagic image for a Raspberry Pi 2 and want to drop the code onto a newer Pi3 Raspbian image.

  1. Download the latest raspbian image – I am using the debian jessie version dated May 27th 2016 from https://www.raspberrypi.org/downloads/raspbian/
  2. Unpack the .zip to expand to the .img file 2016-05-27-raspbian-jessie.img
  3. View the disk contents – this shows 2 partitions, the 63MB MSDOS boot partition and the 3.7GB linux partition
    $> fdisk -lu 2016-05-27-raspbian-jessie.img

    Disk 2016-05-27-raspbian-jessie.img: 3.8 GiB, 4019191808 bytes, 7849984 sectors 
    Units: sectors of 1 * 512 = 512 bytes 
    Sector size (logical/physical): 512 bytes / 512 bytes 
    I/O size (minimum/optimal): 512 bytes / 512 bytes 
    Disklabel type: dos 
    Disk identifier: 0x14c20151 
    Device                          Boot  Start     End   Sectors  Size Id   Type 
    2016-05-27-raspbian-jessie.img1        8192  137215    129024   63M  c    W95 FAT32 (LBA)
    2016-05-27-raspbian-jessie.img2      137216 7849983   7712768  3.7G 83    Linux
    
  4. Copy this off to a 8GB microSD card  – my sdcard came in as /dev/sdd – you can check your dmesg output after inserting your card to get the device.
    $> sudo dd if=2016-05-27-raspbian-jessie.img of=/dev/sdd
  5. As soon as the dd completes, my linux file manager (nemo) refreshed with the “boot” partition and a 3.7GB Volume.  I can click on each to mount them in userspace – ie, the mount as /media/glaw/boot and /media/glaw/<some big long UID>
  6. In a terminal window, I did a cd to the sdcard ext4 mount  and wiped everything out
    $> cd /media/glaw/fc254b57-8fff-4f96-9609-ea202d871acf
    $> sudo rm -rf *
    $> sudo sync
  7. Now to mount up the ProxyMagic image to copy the files over.  I’ve read about how you can calculate the total sectors offset based on the start # and the sector size and then specify the offset when doing a loop back mount, but found that kpartx does the trick very well.
    $> kpartx -v -a ProxyMagic-RPI-v1.img
    add map loop2p1 (253:0): 0 114688 linear /dev/loop2 8192
    add map loop2p2 (253:1): 0 5662720 linear /dev/loop2 122880
  8. Up pops an authentication window asking for sudo rights to mount the new boot file system – it should mount as /media/glaw/boot1 and then click on the 2.9GB volume to mount.S05NLP~U
  9. Locate the other

Sofa pictures

As shown, it looks like there is a gap in the back, but the 2 main sections were not “joined” in these pictures – there is a metal brace that slides into the bottom of the sections to join them – no gap when its fully assembled

looking at sofa, front left corner where the cats have scratched it.

whole thing assembled takes up about 9 ft x 9 ft 2 main pieces are about 7.5 ft x 3 ft x 3ft

back left corner, also some cat scratches

right back corner, didn’t realize it came out this blurry – similar to the other back corner.

front right arm

not sure what the stain is from, there’s a couple other small stains here and there.

center cushion – I do not believe the marks are stains – just from something sitting on the cushion while stored in the garage