PiShrink on Windows 10 Tutorial / Guide (RetroPi SD Card Issues Fixed!)

Ғылым және технология

The new improved 2020 way of using this awesome little script to save yourself some money when an .IMG file is too big to fit on the SD Card that you have.
Don't buy a bigger card! Make a smaller image!
This works for any .IMG file for any device you need to write/flash it to so this tutorial is good for so much more than just RetroPi and Micro SD Cards!
Before you can use the information in this video, please first get WSL2 installed and working on your machine following this guide:
• How To Run Linux on Wi...
Hope you found this video helpful.

Пікірлер: 74

  • @drewbonasera3365
    @drewbonasera33652 жыл бұрын

    Hey! I'm the author of PiShrink. Thanks for making a great tutorial on how to use it with WSL

  • @davids629

    @davids629

    Жыл бұрын

    Thank you!

  • @Phillyrider807

    @Phillyrider807

    Жыл бұрын

    thank you!

  • @JopieHaargel
    @JopieHaargel2 жыл бұрын

    Finally. FINALLY! I found the one tutorial that lets me shrink those damn images on my pc, without jumping through the craziest of hoops...! Thank you so much for this!

  • @jpnosnikrap
    @jpnosnikrap3 жыл бұрын

    Great video, thanks. Had some trouble getting wsl to use version 2 - finally found I had to enable virtualization in the BIOS startup menu and then it worked.

  • @enrique7934

    @enrique7934

    3 жыл бұрын

    Yup, same. Thanks!

  • @hieroben

    @hieroben

    2 жыл бұрын

    In my case, virtualization was already enabled but still no wsl 2. I had to download an update package for the linux kernel from microsoft to make it work. Try "wsl --set-version Ubuntu 2" and wsl will tell you if there is any problem.

  • @roninjei
    @roninjei3 жыл бұрын

    thanks dude, seems like you got the best solution on the internet for this one, took me a while before I got here...

  • @b3jojo
    @b3jojo10 ай бұрын

    Very clear instructions and easy to follow. Perfect tutorial thanks dude!

  • @DwarfPrimus
    @DwarfPrimus2 жыл бұрын

    Thank you so much for this simple but informative tutorial

  • @robinxiao9190
    @robinxiao91902 жыл бұрын

    thank you for the great video, exactly what I was looking for. Microsoft has now made WSL install super simple with a single command line wsl --install and then reboot, all done

  • @FEDGEZZ
    @FEDGEZZ Жыл бұрын

    Thanks for this. So many tutorials for the virtual box and etc are outdated and many of them don't work the way people instruct you to do it. If you run into issues--there are no guides how to fix those issues easily. Just wasted time. This method took me less than 15 min to get up and running and about 10 minutes to get it done.

  • @danhiggsbeard
    @danhiggsbeard Жыл бұрын

    Thanks for the video! Probably a good idea to run "sudo apt update" and "sudo apt upgrade" before you run the scriopt. Don't forget to put "sudo" in front of the command to run the script to run as root. Also, definitely double-check in your BIOS if virtualization is enabled, like he suggests. I didn't because my motherboard documentation says it's enabled by default, but then I couldn't get WLS to run as Version 2. I finally checked in the BIOS settings, and it wasn't enabled. In my BIOS, the setting was under Advanced>CPU.

  • @kibagami25
    @kibagami25 Жыл бұрын

    amazing video. I'm building a custom arcade cabinet and building all custom layout intro videos. One think i needed was this to make my life 100% simpler. Also easier to make sd card backups using "dd"

  • 2 жыл бұрын

    i dit it, thank you so much, very clear tutorial with details of explanation. And your extra video of WSL v2 on windows is cool, too. Now i'm not only can shrink some of my pi image, but also can do a lot of stuff with the Sub-system Linux on my windows. 1 sub 1 like, thanks again.

  • @remco.wiegel
    @remco.wiegel3 жыл бұрын

    Works like a charm! Thank you very much.

  • @DocMicha
    @DocMicha Жыл бұрын

    You saved my day. Thank you. And of course subscribed!

  • @waiteriflyez
    @waiteriflyez3 жыл бұрын

    AWESOME - I fought with other TUT. I had this one up and runnign is less than an hour, AND, I kind of understand what I did. ALSO my 32gig is now 5 gig THANK YOU THANK YOU THANK YOU

  • @ViciousXUSMC

    @ViciousXUSMC

    3 жыл бұрын

    Your welcome!

  • @iammorten
    @iammorten8 ай бұрын

    Amazing! Thanks a lot this was very very helpful :)

  • @jimgolden886
    @jimgolden8868 ай бұрын

    awesome tutorial just followed it and it works fine with win 11 also, thanks helped me a lot

  • @Phillyrider807
    @Phillyrider807 Жыл бұрын

    Still works in 2023 (i did have to use sudo first for it to work though) Thanks for this. Was able to shrink a steam deck image.

  • @lyricjam39
    @lyricjam393 жыл бұрын

    If only this was available sooner, about a year ago I had this problem and took me like 10 hours to solve, mostly because the people in the tutorials forgot to mention that you need to enable "virtualization" from Bios and the steps needed to share folders between your PC and virtual machine, so I had to guess those things. (Coming from someone who never used virtual box or any Linux OS)

  • @Vidalburgos
    @Vidalburgos2 жыл бұрын

    Youre a life saver brother. Thank you.

  • @robertrowan4242
    @robertrowan42423 жыл бұрын

    Can you please tell me which folder to drag and drop pi shrink into through the network back door? You glazed over both drag and drop options and I can't get it to work the way you are showing in comand promt. Thanks.

  • @ZombieNationLTD
    @ZombieNationLTD3 жыл бұрын

    HELP. I’ve made it to the very last step but it’s saying my .img is not a file. I have it save on the same drive as the pishrink wether or not that matters

  • @eeledahc
    @eeledahc Жыл бұрын

    if you get a semaphore error, make sure to upgrade to wsl version 2 if you missed that step. @Vicious Computers. I tried doing virtual machines and had all kinds of problems. I have slow internet. This is the only feasible way to quickly get this done. Thank you.

  • @blackdonny
    @blackdonny2 жыл бұрын

    what i needed .. thank you

  • @KernelKoopa
    @KernelKoopa2 жыл бұрын

    Thanks man!!!! I was able to take an .img that was 224GB and bring it down to 40GB

  • @Mr99ZK
    @Mr99ZK Жыл бұрын

    Worked great. I had to specify that path to pishrink in /usr/local/bin before it would recognize the command. I would like to be able to use it without specifying the path. pishrink shrunk several 30GB images I had to 5GB. I just need to actually try them to see if they work.

  • @ryansretrogamingchannel7494
    @ryansretrogamingchannel74943 жыл бұрын

    Can you please explain if you can drop the pishrink.sh file into a folder to make this work, after opening it up through the explorer window showing the roots? You were about to mention it then you said you preferred using the ubunto command prompt.

  • @davids629
    @davids629 Жыл бұрын

    Thanks a million for this!

  • @ixxus
    @ixxus3 жыл бұрын

    Ahh... @Marcel got it working when using the 'Ubuntu' image from the Microsoft Store instead of the 'Debian' image that I had installed at first.

  • @susantasharma
    @susantasharma3 жыл бұрын

    The best one. thanks a ton

  • @user-fq3oq6fo9r
    @user-fq3oq6fo9r Жыл бұрын

    After the Orange Pi installation steps are all executed successfully, I shut down and restart and cannot connect to the Orange Pi. I need help.

  • @alexeyfilipov6961
    @alexeyfilipov69613 жыл бұрын

    Hi, Trying to run pishrink on Windows 10 with WSL Ubuntu 20.04 and I get the following error: "Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code." Couldn't find anything in google that would help (tried adding symlink :sudo ln -s /proc/self/mounts /etc/mtab). Any ideas what can go wrong?

  • @bossrobotgames

    @bossrobotgames

    3 жыл бұрын

    I had the same problem and used this website to put together the missing pieces. news.timekills.info/pishrink-using-windows-10-windows-subsystem-for-linux-2-wsl-2/ I had to go to two other sites referenced in the link above. My problem was I didn't have WSL2 as a default. I ran this command and saw wsl version was set to 1 wsl -l -v Then this website showed me how to set it to WSL2 www.omgubuntu.co.uk/how-to-install-wsl2-on-windows-10 using this command wsl.exe --set-version Ubuntu-20.04 2 (you need to specify which version of ubuntu) After that the command to run pishrink needs to have sudo in front so it looks like this: sudo ./pishrink.sh [name of file].img I think the file also has to be in the same directory as pishrink.

  • @youngdannyaye
    @youngdannyaye3 жыл бұрын

    trying to do this but its not showing my usb D drive where my img is.anyway to see it?

  • @CarlosDomenechGarcia
    @CarlosDomenechGarcia2 жыл бұрын

    That's very interesting, however I got the following error when running pishrink: tune2fs: Bas magic number in super-block whilte trying to open /dev/loop0; and then tune2fs failed. Unable to shrink this type of image. Any help? Thanks!

  • @foli12321
    @foli123213 жыл бұрын

    Unfortunately, it seems like a lot of the 32gig images out there are already shrunk as much as they can be. It shrunk from 30gig to 30gig, but my cheap MicroCenter card is 29.11gig. I spent a lot of time getting to the final step only to find that out. Just going to buy a Sandisk or Samsung card next time. :)

  • @ronaldmessino3008
    @ronaldmessino30083 жыл бұрын

    Works perfect, in my case after log in root mode, the command thats work for me was $sudo pishrink.sh and the file was resized in windows

  • @jasvindersingh318
    @jasvindersingh3188 ай бұрын

    can it shrink other SBC's images like debian os?

  • @lithiumcopper
    @lithiumcopper2 жыл бұрын

    Good video. I couldn't get it to work completely. I think it needs to be windows 10 Pro. If someone knows otherwise, I'd be happy to learn what I did wrong.

  • @retrolizardscustomarcades
    @retrolizardscustomarcades2 жыл бұрын

    So when I do this, it needs to tell me I “need to run as the root” when attempting to shrink the .img file located in the pishrink folder. Placing on the root says no file exists

  • @ViciousXUSMC

    @ViciousXUSMC

    2 жыл бұрын

    In Linux root means as admin. Try using sudo as part of your command.

  • @retrolizardscustomarcades

    @retrolizardscustomarcades

    2 жыл бұрын

    @@ViciousXUSMC thank you sir. That worked. This video was extremely helpful.

  • @arniep740
    @arniep7403 жыл бұрын

    Thank you for this video and the predecessor one. I followed your directions, but received this error when I finally got to the point of running the pishrink script: pishrink.sh v0.1.2 pishrink.sh: ERROR occurred in line 220: You need to be running as root. Any suggestion of how to cure this error? Thanks again!

  • @ViciousXUSMC

    @ViciousXUSMC

    3 жыл бұрын

    running as root? thats pretty much saying you need super user (admin) rights. Not sure why you have that error.

  • @rodrigomolinadacaret8108

    @rodrigomolinadacaret8108

    3 жыл бұрын

    just use "sudo" before the pishrink command

  • @CoronadosBrickHouse

    @CoronadosBrickHouse

    3 жыл бұрын

    @@rodrigomolinadacaret8108 I had the same issue. just activating root permisions before as you suggested solved my issue.

  • @BABA-is8kv
    @BABA-is8kv2 жыл бұрын

    Thank You.

  • @youhuiyuan3324
    @youhuiyuan33243 жыл бұрын

    Hello, could you pls help me promote a memory card?

  • @IanEastonIsJesus
    @IanEastonIsJesus2 жыл бұрын

    did all this to find out the image i was using was already shrunk smh its a 58.3 GB image and my SD card only has 58.2GB available. I'm Just gonna KMS

  • @aztekno2012
    @aztekno2012 Жыл бұрын

    Skip ahead to 05:30 to get to what the title of this video is about...

  • @ryansretrogamingchannel7494
    @ryansretrogamingchannel74943 жыл бұрын

    I followed all the steps and got this: "ERROR occurred in line 220: You need to be running as root." please help!

  • @drewjbx228

    @drewjbx228

    3 жыл бұрын

    got the same thing, did you figure this out?

  • @ryansretrogamingchannel7494

    @ryansretrogamingchannel7494

    3 жыл бұрын

    @@drewjbx228 No I gave up. Ended up spending the extra money and buying name brand micro SD cards that will fit the entire image. The cheaper ones unfortunately do not have the entire space!

  • @bobkirkpatrick4638

    @bobkirkpatrick4638

    3 жыл бұрын

    @@drewjbx228 put sudo in front of the pishrink command sudo ./pishrink.sh ..... I just now got done with a img that was 125 gig and is now 109 will fit my 128 card easy now.

  • @foli12321

    @foli12321

    3 жыл бұрын

    Try the command "sudo -i" before running the script. That worked for me and let me run as root.

  • @ixxus
    @ixxus3 жыл бұрын

    Also fails at my end - in the same way as @Marcel described...

  • @FishcatGames
    @FishcatGames2 жыл бұрын

    still no super easy way to do this on mac yet 😔

  • @dianekramer6467
    @dianekramer64673 жыл бұрын

    looks you have the best thing out there - yet if its more complicated than the sd card copy built into rasperry pi - then this will not have wide appeal - sorry

  • @user-hl9yv6yh3p
    @user-hl9yv6yh3p Жыл бұрын

    ERROR occurred in line 223: You need to be running as root.

  • @ronp2481
    @ronp24813 жыл бұрын

    got to last step and saying error occud in line 220: you need to be running as root HELP

  • @roninjei

    @roninjei

    3 жыл бұрын

    use "sudo" before the command: sudo ./pishrink.sh file.img

  • @bencolmer5343

    @bencolmer5343

    3 жыл бұрын

    @@roninjei thank you!!!

  • @W-4-Z-D
    @W-4-Z-D Жыл бұрын

    Don't forget to make pishrink.sh executable (chmod +x pishrink.sh) Also I used Debian and phshrink.sh failed due to parted not installed. Had to first 'sudo apt-get update' then 'sudo apt-get install parted' (would not install without the first step)

Келесі