Max2Play Home › Forums › SD-Card Imaging and getting started › Hidden partition on SD-kaart
- This topic has 10 replies, 6 voices, and was last updated 4 years, 3 months ago by MarioM Moderator.
-
Posted in: SD-Card Imaging and getting started
-
2. Februar 2019 at 14:19 #44319
I have this hardware: Raspberry Pi 3B + HiFiBerry Sound Card: HiFiBerry DAC – RCA+, up and running with m2p.
When I access my SD-card with e.g. GParted, I see that, besides a boot and a data partition, there is a 3rd partition with unknown filesystem:
I made a image of my working SD-card (with configured/tuned M2P) for later use in case my SD-card gets corrupt. I want to shrink this image so it will fit on any SD-cart. (not al SD-cards of the same nominal MB have the same number of blocks available, so the new one could be slightly smaller and the unshriked image would not fit.)
Normal way is to make the partitions smaller with e.g. GParted, move all the partitions to the ‚left‘ and than truncate the image.
Hoever, the 3rd partition cannot be moved.
After some investigations I found that this 3rd partition is not in the original image (m2p_stretch_rpi_v247.img), but is is created after the first boot.
How can I cope with this? I like to have a usable, small image of my working SD-card.3. Februar 2019 at 16:38 #44327Hi geert56
First of!! that’s easy!! next leave the first 4mb alone do as following:
1 click on the ext4 /29GB partition (just mark it)
2 click on the white arrow shaped icon (3ed from the left in the top bar)
3 in the pop up you can either move the slider in the pictogram or set „new Sitze to max hight
4 click „ok“ (verlichten)
5 click on the green marker in the top bar
that’s it!! your 195,31mb is now part of the the ext4 partitionPeter
15. Juli 2019 at 16:38 #46320Hi,
unfortunately the screenshot is gone but nevertheless, did you manage to shrink the image this way?
I’m also looking for a possibility to shrink the images for backup purposes.
I tried shrinking the main partition within the image, but when rebuilding the image on an SD, the boot
fails like:
cma: cma_alloc: alloc failed, req-size:2025 pages, ret: -12
Of course it would be nice if m2p would come with a backup plugin, but I understand it is a lot of work
and as far as it’s concerning me, I’m fine with manually editing the image but then it should work in the end.
I also played with the piCorePlayer image. The resizing of that image works as expected.
I think at least a short „how-to“ should be available for m2p.16. Juli 2019 at 11:53 #46329Hi guys,
The max2play image expands the filesystem automatically during the first boot. To stop max2play from doing this, you can access the SD card with image manually, access the config.txt in the filesystem with an advanced editor like Notepad++ and change the value AUTORESIZE=1 to AUTORESIZE=0. Afterwards, the system will stay unexpanded unless you manually expand it in Settings/Reboot.
16. Juli 2019 at 16:05 #46333@Heiner
Good to know, maybe next time I set things up but what about an existing, already expanded System.
SD card size is 32GB and the backup image is maybe 29GB compressed. Effectively used maybe 4GB…
Why is it so hard to shrink it?
Is it because of the hidden partition?18. Juli 2019 at 10:44 #46357It’s because of the expansion, the space is expanded to have the room for your data. If you create a copy of it before the expansion, you have ca 2 gb of space, after the expansion you have all of the card’s storage taken advantage of.
19. Juli 2019 at 13:26 #46416I’ve been digging further on this issue, as my system is expanded already.
It seems the shrinking how-to’s and scripts are working for the standard 2 partition images only.
M2P has 3 partitions on the SD, probably because it is based on the NOOBS framework?!
I’m not sure why this approach was chosen. Is it necessary to have NOOBS underneath?I found a thread how to get rid of the NOOBS, but I wonder if that will
affect other M2P functionality somehow (updates, configs, etc.)
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=1065292. August 2020 at 17:09 #49486I get this error now
cma: cma_alloc: alloc failed, req-size:2025 pages, ret: -12
On a 16GB or 32GB sd card. Changing autoresize=0 makes no difference. cannot boot – using latest image 249….
2. August 2020 at 17:51 #49487Just tried 244; same problem I think but the screen scrolls to fast before it just keeps rebooting
Downloading 237 – will try that
4. August 2020 at 12:19 #49498Hi pocster,
What hardware do you use? With a Pi 3 and the Stretch Image 2.49 there should be no problems with booting. The file system should also expand automatically.
-
You must be logged in to reply to this topic.