Partitioning issues

  • Hi, I am trying to make a nvme drive with a single partition with Libreelec on. I have tried using this software and some other image burning software but I can't seem to make it use all the drive.

  • LibreELEC images for ARM SoC devices (which typically boot from removable SD card media) have two partitions: a 512MB boot volume and a 32MB persistent storage area that will be resized to 100% of available space on first boot. LibreELEC images for Generic x86_64 devices are exactly the same layout but will run an installer app that allows you to select and install LE to an internal storage device. In both cases it is not possible to install and boot LE from a single partition and the Generic installer targets a whole disk not free space on an existing disk (it will nuke the content of the selected disk).

  • Thanks for that info I'll try again later today, where are the all the video and other folders kept, are they on that boot partition or on the storage partition? As the problem I was coming across was that whenever I tried to copy something to the SMB share it said there was no room.

  • Code
    umount /dev/nvme0n1p2
    parted -s -m /dev/nvme0n1 resizepart 2 100%
    umount /dev/nvme0n1p2
    e2fsck -f /dev/nvme0n1p2
    resize2fs /dev/mmcblk1p2
    sync
    shutdown

    Boot from an SD card or USB then run ^ and it should unmount the second partition, resize it to 100%, and then run a filesystem check. Please also run "cat /flash/fs-resize.log | paste" and share the URL so we can perhaps see why the first-boot resize failed?

    NB: I've deleted the second thread as one (here) is enough thanks.

  • Hi mate, I really appreciate your help,

    here is what I have tried. Installing Libreelec on a SD card and USB drive but it simply boots into the NVME partition, I tried to change the boot order but I cant get into raspi-config on ssh.

    I also tried rasberry pi os but it does not recognise unmount, e2fsck, or resize2fs.

    I am so sorry if this is obvious to you but can you help?

    NB: I started the new thread as I thought this is nothing to do with the installer software but if this is a good location for this chat then thanks,

  • Code
    mount -o remount,rw /flash
    cp /flash/cmdline.txt /flash/cmdline.original
    nano /flash/cmdline.txt

    Make /flash writeable then edit cmdline.txt ^ to use "boot=/dev/mmcblk0p1 disk=/dev/mmcblk0p2" and it will read boot instructions from the NVME drive but will then boot the KERNEL and userspace SYSTEM from SD card; which means the partitions on the NVME drive are not actively in use and can be unmounted to run commands against. Remember to copy cmdline.orginal to cmdline.txt before shutting down to remove the SD card else it will attempt to boot from the SD device which is no longer connected.

  • I'm having similar issues. I'm using a pimoroni NMVE hat with a crucial 2 tb drive. To install, I booted bookword, then used the RPi imager to install Libreelect on the NVME. The drive was partitioned during the install to have 512 mb for the /flash partition and 25.2mb for the /storage partition. Working in the libreelect ssh mode and limited command set was frustrating.

    I actually tried to boot into a SD card with bookworm. I was able to see the NVME when I did lsblk. I was when I tried to use the commands posted in #6, I had a silent response to the first resize command (line 2), but then ran into issues when I got to line 4. Is it possible line 3 should be mount, not umount ? When I tried line 4 I got a message that the device was not showing in /etc/fstab.

    Sort of stumped here. I'm not a noob, but still have my crash helmet on as I have much to learn in linux.

    Greatly appreciate any help you can provide here - and speaking for everyone - thanks for Chewitt's amazing contributions over the years !

  • /etc/fstab exists solely to stop some error messages from being shown. It's not actually used so you will never see content about drive mounts there. And I'm guessing the command sequence based on the "emmctool" script that's embedded in the Amlogic image. The general principle is that you shouldn't peform change operations on mounted partitions and filesystems and some commands result in auto-remount being triggered so you need to unmount things again before you run the next command. So unmount, grow the parition to 100%, then resize the filesystem to 100%. There's no need for crash helmets as the worst that happens is you mess up something that isn't being used and doesn't already work. You can always start over and have another go.

    NB: I'm wondering if an "nvmetool" script might be useful for RPi5 boards.

  • That did it ! Much thanks for the help and uber quick response. Feel free to reach out if the project needs someone to create/edit/update user docs - that's my strong suit.


    Much thanks !


    -Swanie