Using local hard drives

  • I'm a complete newbie to Librelec. And I don;t know linux at all.

    I just want to install LE on an old PC I happen to have - I want to have all my media on a local hard drive rather than venturing into NAS territory.

    Will LE just recognise the HDD as present, or do I have to go ito some sort menu to add it? Hopefull it WON'T involved typign in a string of linux commands?

    What about formatting? Should I attach the drive to my Windows machine and pre-format it, or does LE contain the necessary tools? I notice that LE does contain Samba, so I guess once the drive is there, as it were, I can just copy across the media files over network. I'm assuming that LE does contain the bits so you can configure the wifi network connection


    Also, can anyone recommend a "just plug it in and it will work" remote? Liek a WeChip airmouse?

  • LE will auto-mount a USB drive under /var/media/<disklabel> if the disk has a lable, or /var/media/<UUID> if not. If you plan to copy files over the network via SMB or SFTP we would strongly recommend using a Linux native filesystem like EXT4.

    You cannot format an EXT4 drive from Windows because it doesn't understand Linux partitions, but the Linux commands to run from the SSH console are not complicated. Assuming the USB drive is /dev/sdb and USBDRIVE is the label to set:

    Code
    parted -s /dev/sdb mklabel gpt
    parted -s /dev/sdb -a min unit s mkpart USBDRIVE ext4 34 100%
    mkfs.ext4 /dev/sdb1
    e2label /dev/sdb1 USBDRIVE

    This will nuke the existing contents of /dev/sdb so you need to check the drive is /dev/sdb first. If the PC has one internal SATA drive with LE installed this will normally mount first and be /dev/sda, so /dev/sdb is an educated guess.

    If you need the option to connect and add files directly from Windows then it must be formatted as exFAT or NTFS; both of which have occasional challenges as Linux currently lacks tools for performing filesystem checks on boot to clear things like a dirty filesystem state; typically caused by not ejecting the drive cleanly under Windows or sudden power-loss events on Linux when power is pulled. So if that state occurs and the drive doesn't mount, the state can only be cleared under Windows using chkdsk.exe. This issue will go away with Linux 7.1 in future LE releases when Linux gains the missing tools.

  • Thanks.

    First, to be clear, it's an internal hdd using SATA connection. It will be permanently resident in the Libreelec box.

    I wouldn;t be connecting it to the Windows machine, except via the network.

    I assume this means I could format the drive as EXT4 on the Libreelec machine by accessing the command interface?

    Would I need to mouny it or would Libreelec do this automatically on next boot?

    Then after that I can set up Samba and copy files over through the network

    It's the only thing that puts me off about this. You need to know Linux to some extent. I worked in IT so I know Windows of all flavours (and before that VAX/VMS!) but not Linux.

    A quick google starts talking about having to edit fstab to contain the mount command etc. I'm retired and don;t fancy learning a bunch of arcane and frankly unfriendly commands.

    It's why I' also considering just buying a commercial media box.

  • You worked on a VAX! You got this. You don't need a "commercial" box.

    Forget about Windows. Learn Linux - this is a great way to get acquainted with Linux. Use a "live" boot drive as suggested by VLouis.

    For the remote use Kore - a smartphone app created by the Kodi Team. Works on everything. It's the only remote I've used for over 12 years now.

    Also listen to chewitt - he is the expert.


    Welcome to LibreELEC and Kodi!!