External HD (USB3) not mounted

  • I take it the external drive is spinning at the time LibreELEC is booting? Normally all connected drives are mounted when possible.

    Linux can be picky when mounting disks. Disks that have errors on them, or are still in suspend or hibernation mode, will not be mounted.

  • I tried this:

    /storage/.config/autostart.sh:

    #!/bin/sh

    sleep 5;

    mount /dev/sda2 /var/media/"Seagate Backup Plus"

    but it does not work on restart, just on start.

    After restart the mount command gives:

    mount: mounting /dev/sda2 on /var/media/Seagate Backup Plus failed: No such file or directory

    HD spinning and LEDS are on.

    mount does not list /dev/sda2.

    Plugging USB out and in will mount the HD.

  • External Seagate drives have a bit of a history of not mounting.

    I'd say disable the mount in the autostart.sh file, and reboot your Kodi device (whatever that is).

    Then get us the URLs of the following commands:

    Code
    blkid | paste
    mount | paste
    dmesg | paste

    and we'll take it from there.

  • but it does not work on restart, just on start.

    If restart = cold start then autostart.sh will be run. If restart = wake from suspend it will not be run, because autostart is a boot script and waking a suspended system is not boot. Your current script forces the entire boot process to stall for 5 secs. It would be better to (background)& the mount task so that boot can continue normally. You can look at using systemd .power functions in /storage/.config/system.d/ to schedule actions around system suspend and wake events.

  • Would it be easier to make sure the drive has stopped spinning on shut down? I have the same problem with my drive not mounting on restart, but fine from a cold boot.

  • If restart = cold start then autostart.sh will be run. If restart = wake from suspend it will not be run, because autostart is a boot script and waking a suspended system is not boot. Your current script forces the entire boot process to stall for 5 secs. It would be better to (background)& the mount task so that boot can continue normally. You can look at using systemd .power functions in /storage/.config/system.d/ to schedule actions around system suspend and wake events.

    Hi chewitt, thanks a lot for explaining. Did not know that restart is not shutdown and start. Sometimes things are not as they look like...

    I will try the system. d solution or just not use restart.