RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Copy Image file to same size SD card fails

    Scheduled Pinned Locked Moved Help and Support
    7 Posts 4 Posters 7.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      HiTechnology
      last edited by

      Hi Guys.

      This is my first post and want to thank everyone involved in making the software. Its good fun watching my kids enjoy the same games i did when i was their age.

      Any ways...

      I have several Pi3's and i have one setup pretty much how i want it and when i went to copy the image to another SD card the file is slightly large tehn the card i want to transfer to it and produces an error on the Win32DiskImager software. I know the file system is expanded on boot and since all SD cards vary in size it seems i cant just copy the image and load it to a new cards so each of my kids can have their own system. I searched around and i cant seem to find a way to remove the expanded file.

      Is there a way to shrink the expanded file to make it a smaller? Don't really want to have to transfer roms, scrape and setup controllers and Kodi on every one separately. Was thinking this would be easy but i am hitting a wall. I have 32GB SD cards and using Windows Laptop to create and save the images.

      Any help is greatly appreciated.

      1 Reply Last reply Reply Quote 0
      • cyperghostC
        cyperghost
        last edited by

        That's not as difficult but tooks a bit of time.

        The easiest way is to extract the data needed and just add to your new installation.
        You just have to secure your ROMS and yourretroarch.cfgfrom /opt/retropie/configs/all

        Read ahead here:
        https://retropie.org.uk/forum/topic/2593/updating-retropie-issue-2-6

        1 Reply Last reply Reply Quote 0
        • cyperghostC
          cyperghost
          last edited by cyperghost

          Other method....
          The complicated way - the unusal way - the cyperghost style :)

          Resize your root/ext4 partition:
          There are serveral programms out there. Best is, use gparted from your PC and just resize the biggest partition. (Tried this long time ago)
          You can do it manually with parted-command (never did that - but usually works, too)

          Okay... your root partition is a bit smaller now?
          Good! Reboot your resized card with the RPi
          Log into terminal, best with root (so you don't need the SUDO).
          Type: fdisk -l

          Now you will get something like that:

          Device         Boot  Start     End Sectors  Size Id Type
          /dev/mmcblk0p1 *      8192  124927  116736   57M  e W95 FAT16 (LBA)
          /dev/mmcblk0p2      124928 7774207 7649280  3.7G 83 Linux
          
          

          So MMCBLK0p1 is the Windows visible partion
          So MMCBLK0p2 is our target

          you see, I only got a 4GB sdcard for backup reasons installed and my ROMS are located outside on a USB device.

          So what we need? Just the Sectors.
          Write down the 7774207 (your Sectorcount will be much more)
          Now use the Linux Reader - it's linked in the first post.
          Insert the SD to your PC
          Start Linux Reader
          You will see your MMC into Physical Devices
          Make a left click on it, and a menu pops up, select CREATE IMAGE, click Cancel
          Now activate "Region" and set STARTSECTOR=0 and ENDSECTOR=7774207 (again! That's my card.... verify YOUR card yourself!!!)

          Image URLs:
          http://www.pic-upload.de/view-31250669/Bild2.png.html
          http://www.pic-upload.de/view-31250668/Bild6.png.html

          Image
          Image
          8tention! Forget one 7 > should be 7774207 guys :)
          Again! That's my MFZB SD-card, check sector size on your own :p

          1 Reply Last reply Reply Quote 1
          • herb_fargusH
            herb_fargus administrators
            last edited by

            Another idea is rpiwiggle: https://github.com/dweeber/rpiwiggle haven't tried it but it looks like iy might work

            If you read the documentation it will answer 99% of your questions: https://retropie.org.uk/docs/

            Also if you want a solution to your problems read this first: https://retropie.org.uk/forum/topic/3/read-this-first

            cyperghostC 1 Reply Last reply Reply Quote 1
            • cyperghostC
              cyperghost @herb_fargus
              last edited by cyperghost

              @herb_fargus
              That's col herb ...
              Maybe you can combine rpiwiggle togehter with the Linux Reader.
              The magic is, to create an image of a specific sector size

              So

              1. Use rpiwiggle
              2. Use fdisk -l command
              3. Read max-sector size
              4. Backup with Linux Reader and readed sector size

              UPDATE:
              Be careful using rpiwiggle!
              It may come to issues!

                        Script was designed for use with Debian Wheezy so this
                         should not be an issue if used as intended.
              
              1 Reply Last reply Reply Quote 0
              • FloobF
                Floob
                last edited by

                FWIW I tend to use this approach as I don't have a linux machine handy.
                http://smartretro.co.uk/forums/viewtopic.php?f=3&t=58

                This could become a lot easier when this is released:
                http://www.howtogeek.com/249966/how-to-install-and-use-the-linux-bash-shell-on-windows-10/

                Please read the Docs before asking a new question.
                RetroPie Help Guides: https://goo.gl/3gcNsT

                1 Reply Last reply Reply Quote 0
                • cyperghostC
                  cyperghost
                  last edited by

                  Well gParted is a Live Linux system :)

                  So part 1 is as I wrote - Resize Partition (maybe 0,5 Gigabyte)
                  On the gparted system you can also try to use the fdisk -l command... That should also work.
                  So you can also use Linux Reader for Windows and then create a 100% fitting image without chunk size calculation :)

                  Nothing is easy :)

                  1 Reply Last reply Reply Quote 1
                  • First post
                    Last post

                  Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                  Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.