Main > Raspberry Pi & Dev Board

Modifying Pi .img

<< < (2/6) > >>

behrmr:
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:
Jesus.

:dizzy:

yotsuya:

--- Quote from: pbj on January 17, 2017, 03:26:31 pm ---Jesus.

:dizzy:

--- End quote ---
But the Pie rocks, d00d!!!

Malenko:
Try Partition manager, see if you can make the partition the correct size.
https://www.partitionwizard.com/free-partition-manager.html

BadMouth:
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?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version