Hidden partition on SD-kaart

Max2Play Home Forums SD-Card Imaging and getting started Hidden partition on SD-kaart

Viewing 11 posts - 1 through 11 (of 11 total)
  • 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:
    Screendump GParted
    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 #44327

    Hi 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 partition


    15. Juli 2019 at 16:38 #46320

    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 #46329

    Hi 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 11:59 #46330

    I did not manage in Februari. Maybe with the reaction of Heiner you will manage.
    After another crash of my SD I had to configure again, and I tried piCorePlayer. Works fine for me until now.
    Maybe I will switch to M2P in the future.

    16. Juli 2019 at 16:05 #46333

    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 #46357

    It’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 #46416

    I’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.)

    2. August 2020 at 17:09 #49486

    I 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 #49487

    Just 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 #49498

    Hi 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.

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.

Register here