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
Site News

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


  

Author Topic: Modifying Pi .img  (Read 892 times)

0 Members and 1 Guest are viewing this topic.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Modifying Pi .img
« on: January 17, 2017, 01:03:07 am »
Despite buying the exact card and downloading the exact torrent specified, I'm coming up about half a meg short of the size I need.  Should be easily remedied by removing a couple of crap games.

Do any of you know of a good tutorial for modifying an .img file?

 :cheers:
#RIP in piece, UCA.

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1108
  • I have a gaming addiction.....
Re: Modifying Pi .img
« Reply #1 on: January 17, 2017, 03:32:58 am »
Which Img are you DL'ing matey?

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #2 on: January 17, 2017, 12:13:22 pm »
Rey's 128GB.  Problem is I don't have a bigger card to flash it to, edit, and redump.



#RIP in piece, UCA.

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1108
  • I have a gaming addiction.....
Re: Modifying Pi .img
« Reply #3 on: January 17, 2017, 12:50:07 pm »
Can you not extract the image to your pc hdd and edit before reburning?

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #4 on: January 17, 2017, 12:54:59 pm »
That sounds plausible.  Type up some instructions.

 :cheers:
#RIP in piece, UCA.

behrmr

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 320
Re: Modifying Pi .img
« Reply #5 on: January 17, 2017, 01:14:39 pm »
This snippet was copied from the link below and works but must be done in Linux.

The best thing to do is

1.Copy all the files from all partitions using

mkdir myimage
mkdir myimage/partition1
mkdir myimage/partition2
sudo cp -Rrf --preserve=all /media/mount_point_partition1/* myimage/partition1/
sudo cp -Rrf --preserve=all /media/mount_point_partition2/* myimage/partition2/

2.Extract MBR using following command

sudo dd if=/dev/sdX of=myimage/mbr.img bs=446 count=1
replace /dev/sdX with corresponding device.

3.Partition the destination disk into partitions with sizes greater than copied data and should be of same format and same flags using gparted. Please google how to partition a disk.

4.Now mount the freshly formatted and partitioned disk. Mostly you need to just connect the disk to system and you can find the mounted partitions in /media folder.

5.Now copy the previously copied data to destination partitions using following commands

sudo cp -Rrf --preserve=all myimage/partition1/* /media/mount_point_partition1/
sudo cp -Rrf --preserve=all myimage/partition2/* /media/mount_point_partition2/
6.Now copy back MBR using

sudo dd if=myimage/mbr.img of=/dev/sdX bs=446 count=1
Now njoy Ur new disk!


http://2.bp.blogspot.com/-coeDzWCOtFM/VV4WvrIOOLI/AAAAAAAAID4/DAmeE-DeiFI/s1600/it-s-a-madhouse-a-madhouse_zps90lr3bnk.png

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #6 on: January 17, 2017, 03:26:31 pm »
Jesus.

:dizzy:
#RIP in piece, UCA.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15690
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Modifying Pi .img
« Reply #7 on: January 17, 2017, 06:57:45 pm »
Jesus.

:dizzy:
But the Pie rocks, d00d!!!
***Build what you dig, bro. Build what you dig.***

Malenko

  • KNEEL BEFORE ZODlenko!
  • Trade Count: (+58)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 12033
  • 說好話 做好事 存好心
    • forum.arcadecontrols.com/index.php/topic,142404.msg1475162.html
Re: Modifying Pi .img
« Reply #8 on: January 17, 2017, 07:23:51 pm »
Try Partition manager, see if you can make the partition the correct size.
https://www.partitionwizard.com/free-partition-manager.html
2014 Standup UCA Runner Up
2015 Restoration UCA Winner
2016 thomas_surles choice award

Latest project:
http://forum.arcadecontrols.com/index.php/topic,150902.0.html
RedheadKingPinball aka GingerBalls

Latest Restore?
http://forum.arcadecontrols.com/index.php/topic,152600.0.html
Killer Instinct Cab

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7863
  • My arcade cabinet has a cup holder.
Re: Modifying Pi .img
« Reply #9 on: January 17, 2017, 07:25:47 pm »
I just want to download an image, transfer some ROMs, and maybe change resolution and remap controls.  When I turn it on, I want to see a simple list of only the 20 or so arcade games I've loaded.  No navigating other menus, no Xbox controller icons, etc.

This is for a Pi Zero.  It needs to run at 640x480 out the composite output.
It would also be nice if the version of MAME running is new enough to have volume control.

Does it exist?

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1108
  • I have a gaming addiction.....
Re: Modifying Pi .img
« Reply #10 on: January 17, 2017, 07:46:49 pm »
Not sure about the resolution but retro pie works pretty good for that.

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 7863
  • My arcade cabinet has a cup holder.
Re: Modifying Pi .img
« Reply #11 on: January 17, 2017, 08:35:31 pm »
Not sure about the resolution but retro pie works pretty good for that.
I have retropie installed.  I dislike it very much.
It seems to be for people who want to use an Xbox360 controller and HDTV.
How do I bypass or hide the retropie menus?

(This would be going in a 6" cabinet with a 2.5" screen.  The retropie menus aren't going to be readable.)
« Last Edit: January 17, 2017, 08:39:19 pm by BadMouth »

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #12 on: January 17, 2017, 08:44:47 pm »
Alright, this is currently cranking, so let's see if it works.

The .img file was copied to an external hard drive to a folder called images.  We'll pretend it was called bigimage.img

I also downloaded and copied pishrink.sh from this link to the same folder:

https://github.com/Drewsif/PiShrink

The hard drive was plugged into a Pi running emulation station.

I exited out to the command prompt...


cd /media/usb0
cd /images

fdisk -l bigimage.img

I looked at the Start field for bigimage.img2 and multiplied that number by 512.  Let's pretend the result was 1234567

Then I said:

mount -v -o offset=1234567 -t ext4 bigimage.img /mnt/img/two

Then cd /mng/img/two

Then I poked around and deleted a few ---steaming pile of meadow muffin--- N64 games.

Back out of that to the images folder....

Then:

chmod +x pishrink.sh

sudo bash pishrink.sh bigimage.img smallimage.img




And now we wait.

 :cheers:
#RIP in piece, UCA.

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 685
  • I want to build my own arcade controls!
Re: Modifying Pi .img
« Reply #13 on: January 17, 2017, 09:07:47 pm »
Not sure about the resolution but retro pie works pretty good for that.
I have retropie installed.  I dislike it very much.
It seems to be for people who want to use an Xbox360 controller and HDTV.
How do I bypass or hide the retropie menus?

(This would be going in a 6" cabinet with a 2.5" screen.  The retropie menus aren't going to be readable.)

There are a few images over on the attract mode forum that might work for you.

mahuti

  • Wiki Master
  • Trade Count: (0)
  • Full Member
  • *****
  • Offline Offline
  • Posts: 2351
  • Back from the dead.
Re: Modifying Pi .img
« Reply #14 on: January 18, 2017, 02:59:39 am »
Quote
I have retropie installed.  I dislike it very much.
It seems to be for people who want to use an Xbox360 controller and HDTV.

I use retropie in arcade cabinets. Front end is using Attractmode rather than the default emulation station.

Quote
How do I bypass or hide the retropie menus?

You've asked a number of questions in this post that are off-topic to resizing the partition. Maybe make a new post and I can work on answering in detail.
Formerly known for the (apparently now defunct) arcadeartlibrary

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1108
  • I have a gaming addiction.....
Re: Modifying Pi .img
« Reply #15 on: January 18, 2017, 04:13:18 am »
Not sure about the resolution but retro pie works pretty good for that.
I have retropie installed.  I dislike it very much.
It seems to be for people who want to use an Xbox360 controller and HDTV.
How do I bypass or hide the retropie menus?

(This would be going in a 6" cabinet with a 2.5" screen.  The retropie menus aren't going to be readable.)


You can hide the config menu  using kiosk mode.

https://youtu.be/1BWjNp7Br9c

If you want to hide the actual retropie menu itself you can do it as described here:
https://www.reddit.com/r/RetroPie/comments/33gz62/retropie_30_hide_retropie_option_menu/

But instead of editing the CFG, I duplicated it, Changed it and then dropped it into the /opt/retropie/configs/all/emulationstation folder.
That overides the standard one but allows you to easily revert back if needed by changeing the name so it goes back to the standard CFG
« Last Edit: January 18, 2017, 05:31:45 am by Titchgamer »

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #16 on: January 18, 2017, 10:14:54 am »
12 hours later, still cranking,

 :angry:
#RIP in piece, UCA.

HaRuMaN

  • Supreme Solder King
  • Global Moderator
  • Trade Count: (+44)
  • Full Member
  • *****
  • Online Online
  • Posts: 9910
  • boom
    • Arcade Madness
Re: Modifying Pi .img
« Reply #17 on: January 18, 2017, 10:59:41 am »
Couldn't you just have got a slightly larger card?  :dizzy:

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #18 on: January 18, 2017, 12:43:26 pm »
Yeah, those cards are $40 each, and you have no idea if it'll work until you open the package.  So... no.
#RIP in piece, UCA.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #19 on: January 18, 2017, 09:20:58 pm »
Still cranking.....
#RIP in piece, UCA.

yotsuya

  • Trade Count: (+21)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 15690
  • 2014 UCA Winner, 2014, 2015, 2016 ZapCon Winner
    • forum.arcadecontrols.com/index.php/topic,137636.msg1420628.html
Re: Modifying Pi .img
« Reply #20 on: January 18, 2017, 11:19:07 pm »
***Build what you dig, bro. Build what you dig.***

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #21 on: January 19, 2017, 09:14:17 am »
30 hours of staring at this....




And it apparently.... worked?  Allegedly shrank it from 120 to 101GB.  Will have to see if it boots tonight..

:cheers:

#RIP in piece, UCA.

Titchgamer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1108
  • I have a gaming addiction.....
Re: Modifying Pi .img
« Reply #22 on: January 19, 2017, 11:42:18 am »
30 hours!? ---steaming pile of meadow muffin---....

Good luck!

nitrogen_widget

  • Trade Count: (0)
  • Full Member
  • ***
  • Online Online
  • Posts: 685
  • I want to build my own arcade controls!
Re: Modifying Pi .img
« Reply #23 on: January 19, 2017, 11:45:12 am »
30 hours of staring at this....




And it apparently.... worked?  Allegedly shrank it from 120 to 101GB.  Will have to see if it boots tonight..

:cheers:

Good lord.

what kind of PC do you have?
If you say i5 based system i'll just compile my own distro on the RPI 3.
would take about 27 hrs less.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #24 on: January 19, 2017, 02:35:57 pm »
I was running it on a Raspberry Pi 3.  64GB micro SD card, with about half of it free.  The .img I was compressing was an on external USB drive.  So, essentially, the slowest possible way to accomplish this.

#RIP in piece, UCA.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #25 on: January 20, 2017, 10:00:41 am »
Tested it out briefly this morning, appears to be working fine. 

:cheers:

#RIP in piece, UCA.

jmike

  • Trade Count: (+10)
  • Full Member
  • ***
  • Online Online
  • Posts: 973
Re: Modifying Pi .img
« Reply #26 on: January 20, 2017, 01:36:27 pm »
Very cool.
When you can, post some pics so we can see what you got working.
I don't have the patience with this stuff so glad you got it to work.

 :applaud:


pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #27 on: January 20, 2017, 02:59:17 pm »
It's the same one as featured in this video:

! No longer available



Jump to about 7:00 to hear his friend rightfully declare, "this is ---smurfing--- boring, dude" and urge him out of Emulation Station and get the video to the interesting part.



« Last Edit: January 20, 2017, 03:05:06 pm by pbj »
#RIP in piece, UCA.

pbj

  • Trade Count: (+3)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 5514
  • Obey.
    • The Chris Burke Band
Re: Modifying Pi .img
« Reply #28 on: January 31, 2017, 11:15:34 am »
Finally got to sit around and play with this setup last night.  I think the Pi may have finally displaced the original Xbox.  About the same level of emulation quality, but native HDMI and USB support pushes it over the edge.


#RIP in piece, UCA.

HaRuMaN

  • Supreme Solder King
  • Global Moderator
  • Trade Count: (+44)
  • Full Member
  • *****
  • Online Online
  • Posts: 9910
  • boom
    • Arcade Madness
Re: Modifying Pi .img
« Reply #29 on: January 31, 2017, 04:39:10 pm »
Finally got to sit around and play with this setup last night.  I think the Pi may have finally displaced the original Xbox.  About the same level of emulation quality, but native HDMI and USB support pushes it over the edge.

I've been playing with a Pi too.  Being able to plug it into most of the TV's in my house is a definite plus. 

  
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31