Post-initial boot issue with filesystem corruption

  • Hi,

    I'd like to use 2TB external drive for running LE on RPi4 8GB RAM, but after post-initial boot I'm getting error that filesystem is corrupted,

    I have performed netinstall of LE 10.0.3 with rpi-imager and I've noticed that "Resizing file system... " is taking quite long via USB3 port.
    Once it is done and RPi reboots I see error "file system corruption has been detected, press any key or shutdown RPi within 2 minutes to avoid fs check"

    Partition table of HDD is "msdos".

    Any idea what went wrong pls?

    Thx

  • Thanks for quick reply Da Flex. However, formatting external 2TB drive to ExFAT didn't help.

    What I'm doing:

    1. Removed all previous partitions from 2TB external drive

    2. Formatted to NTFS (clean drive)

    3. Drive plugged into RPi4 (no SD card or other USB drive attched) USB3 port.

    4. After power-on Shift key is used for netboot

    5. boot.img is downloaded and rpi-imager is used to write LE to attached external drive

    6. After reboot I see PARTITION RESIZING IN PROGRESS screen

    Resizing partition... done

    Checking file system... done

    Resizing file system... done (this step takes very long time)

    Shutting down in... <countdown>

    8. After reboot I see

    Filesystem corruption has been detected!

    To prevent an automatic repair attempt continuing,

    press any key or power off your system within the next 120 seconds

    When I power off RPi4 and check drive in "parted" I see error:

    Corrupt group descriptor: bad block for for block bitmap

    My 64GB USB key used for running LE is working just fine on RPi4, I wanted to switch to 2TB external drive so I can run LE from it and hold more data along.

    PS: I'm not native EN speaker so maybe I've missed something in the thread you've shared.

  • It seems like netinstall can deal with 64GB, but 2TB is too large. That's probably a bug.

    As a workaround...

    1. install LE on 64GB key
    2. clone the generated partitions (LIBREELEC, STORAGE) to your 2TB drive
    3. resize the STORAGE partition to the max by using GParted
  • mrfatboy

    As you've spotted I don't think the problem I had and your's are the same. My first suggestion would be to try the latest nightly and see if things work with that. There have been a lot of changes (including my favourite of samba now works).

    As Da Flex says it could be a bug in netinstall or it could be the port - I have one of the USB3 ports on my Windows PC that will not read anything over 1TB - the other two are fine. So next suggestion would be to try all four ports.

    I'm using a 128GB SSD to boot the Pi and have a 6TB HDD for storage but I'm going to switch back to a 128GB MicroSD for LibreElec - seems to be neater, lower power needs and strangely enough faster than SSD or HDD. So final suggestion (if Da Flex's suggestion doesn't work) would be to use the 2TB for storage but put LibreElec on a MIcroSD.

  • The two most common issues with USB drives are power consumption and dodgy USB controllers/bridges in the USB drive.

    First make sure the drive is powered properly (RPi can only supply a very limited amount of power). If you are using a drive with it's own power supply then you should be fine. If you are using a bus-powered drive and connect it to a powered USB hub.

    If your drive has some dodgy USB controller then first try with the current LE11 nightly build. It comes with a lot newer linux kernel and might already have workarounds for the dodgy controller in place.

    If this doesn't help and/or you want to run LE10 then first try booting from a SD card (or your USB key), plug in the drive and post a full log (run "pastekodi" via ssh or use the log upload function) - this will give us some information about your drive.

    You can also check dmesg/journal or lsusb output yourself.

    The info you/we need are the manufacturer and model of the drive and the USB vendor and product id.

    Searching for that eg on the RPi forum https://forums.raspberrypi.com/ might already give you the info you need - usually some usb quirks that you need to add to cmdline.txt.

    The most common issue is broken UAS support in the drive, in that case you need to add something like usb_storage.quirks=1234:5678:u to /flash/cmdline.txt (where 1234:5678 need to be changed to the USB vendor/product ID of your drive).

    so long,

    Hias

  • So here are my findings:

    If I clone USB drive to ExtDrive the only way to boot ExtDrive is from USB2 port on RPi4, which is no-go for me due to speed limits (I tested all 4 ports on RPi4).

    ExtDrive is only booting from USB3 port when I "dd" LE img file to ExtDrive or use netinstall followed with initial boot but that ends with corrupted FS in both cases.

    So I think there is a bug for resizing partitions during initial boot after placing LE img to bigger drives.

    Or, LE has limit for the size for external drives that can run LE from (worth documenting I guess).

    I can share drive info later on.