Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Shrinking Pi Image  (Read 4080 times)

0 Members and 1 Guest are viewing this topic.

jdbailey1206

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2656
  • Last login:March 11, 2023, 01:32:56 pm
  • No. It's your top score on Pole Position.
Shrinking Pi Image
« on: November 13, 2017, 07:57:07 pm »
Does anybody have a good step by step process on how to shrink a Pi Image.  I am trying to back up a Pi image on a new SD card.  But I am .09 GB from being too small.  Hook a brotha up.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19955
  • Last login:Yesterday at 10:58:57 pm
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Shrinking Pi Image
« Reply #1 on: November 13, 2017, 08:25:25 pm »
Does anybody have a good step by step process on how to shrink a Pi Image.  I am trying to back up a Pi image on a new SD card.  But I am .09 GB from being too small.  Hook a brotha up.

Shrink a Pie? Slice by slice.
***Build what you dig, bro. Build what you dig.***

jdbailey1206

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2656
  • Last login:March 11, 2023, 01:32:56 pm
  • No. It's your top score on Pole Position.
Re: Shrinking Pi Image
« Reply #2 on: November 13, 2017, 08:57:57 pm »
Remember when you said I was cool?  Now I know what you mean.  I think I have found a work around.  I just used the next step up for a micro sd card.  Went from 32 to 64GB.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 19955
  • Last login:Yesterday at 10:58:57 pm
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Shrinking Pi Image
« Reply #3 on: November 13, 2017, 09:07:32 pm »
Remember when you said I was cool?  Now I know what you mean.  I think I have found a work around.  I just used the next step up for a micro sd card.  Went from 32 to 64GB.



Right on, my man!
***Build what you dig, bro. Build what you dig.***

pbj

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10871
  • Last login:Yesterday at 03:47:56 pm
  • Obey.
    • The Chris Burke Band
Re: Shrinking Pi Image
« Reply #4 on: November 13, 2017, 11:34:30 pm »
Yes, there is a program called pishrink that can do this.  You must run it in linux.  I used a small pi image to boot up to a command prompt, and shrank the image stored on an external usb drive.

It ran for literally two days, but knocked about 10 gigs of a 128gb image that was like 200mb too large.


Osirus23

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 849
  • Last login:August 23, 2021, 01:33:52 pm
Re: Shrinking Pi Image
« Reply #5 on: November 14, 2017, 10:29:07 am »

It ran for literally two days, but knocked about 10 gigs of a 128gb image that was like 200mb too large.

Eh, I'd just buy a bigger card.

pbj

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10871
  • Last login:Yesterday at 03:47:56 pm
  • Obey.
    • The Chris Burke Band
Re: Shrinking Pi Image
« Reply #6 on: November 14, 2017, 11:39:53 am »
Well, I had already spent $60 on the card.  I didn't want to roll the dice again.  But whatever, bro.

 :cheers:

jdbailey1206

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2656
  • Last login:March 11, 2023, 01:32:56 pm
  • No. It's your top score on Pole Position.
Re: Shrinking Pi Image
« Reply #7 on: November 14, 2017, 08:07:32 pm »
Right on, my man!



Eh, I'd just buy a bigger card.

I made it easy on myself and just did this.  The price difference between a 32 and 64 GB Micro SD card is only ten dollars.  Its just frustrating to want to back up my image and the two 32 GB cards are different by .09 GBs.  And of course the one I wanted to copy over was bigger than the new one and not the other way around. 

Yes, there is a program called pishrink that can do this.  You must run it in linux.  I used a small pi image to boot up to a command prompt, and shrank the image stored on an external usb drive.

It ran for literally two days, but knocked about 10 gigs of a 128gb image that was like 200mb too large.



I don't have a Linux machine.  I tried to use GParted on the Pi but it didnt cooperate.  It was going to be too much work for something that was supposed to be quick and fun.

floob

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 36
  • Last login:January 11, 2023, 04:36:51 pm
  • Looking to buy a pre-made MAME cab.
    • Retrogaming on a Raspberry Pi
Re: Shrinking Pi Image
« Reply #8 on: December 03, 2017, 08:12:24 am »
One option here:
http://smartretro.co.uk/forums/viewtopic.php?f=3&t=58

This uses a gparted live CD so the partition isnt mounted.
« Last Edit: December 04, 2017, 02:34:42 pm by floob »

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 27, 2024, 07:02:12 am
  • I want to build my own arcade controls!
Re: Shrinking Pi Image
« Reply #9 on: December 04, 2017, 06:42:44 am »
Can't use gparted on a mounted partition.
download a live linux distro like mint or lubuntu and run gparted on the sdcard after backing it up just in case.

johnm

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 130
  • Last login:February 04, 2024, 03:05:24 pm
Re: Shrinking Pi Image
« Reply #10 on: December 04, 2017, 07:56:23 am »


I had much the same problem with an image I grabbed, the guy had removed all copyrighted material but did not reduce the image size. I stuck pishrink.sh in the same directory and ran it under linux

Grasshopper

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 2380
  • Last login:November 08, 2023, 07:20:31 am
  • life, don't talk to me about life
Re: Shrinking Pi Image
« Reply #11 on: December 05, 2017, 03:33:05 pm »
I've used pishrink.sh a couple of times on 32GB cards, and it worked just fine.

From memory, it only took a few hours to run, although I didn't actually time it. The trick is to run it on a reasonably fast PC running Linux instead of the Pi itself.
"Patriotism is the last refuge of the scoundrel." - Samuel Johnson

pbj

  • Trade Count: (+4)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10871
  • Last login:Yesterday at 03:47:56 pm
  • Obey.
    • The Chris Burke Band
Re: Shrinking Pi Image
« Reply #12 on: December 05, 2017, 04:04:09 pm »
Yes, I ran it literally the slowest possible way, but it was idiot proof and got the result I needed.


nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1746
  • Last login:March 27, 2024, 07:02:12 am
  • I want to build my own arcade controls!
Re: Shrinking Pi Image
« Reply #13 on: December 05, 2017, 10:17:57 pm »
I've used pishrink.sh a couple of times on 32GB cards, and it worked just fine.

From memory, it only took a few hours to run, although I didn't actually time it. The trick is to run it on a reasonably fast PC running Linux instead of the Pi itself.

this is marvelous.
used my laptop to shrink the image by 4gb in 10 min.