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.

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

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