extlinux.conf: LABEL is not unique and should be replaced by UUID

  • I‘m running a htpc with two hard drives. Both hard drives have libreelec tv installed. I switch boot order via bios.

    The production system is on 7.90.010 on /dev/sda. newer version have issues with artefacts on TV.

    Now I tried to install a blank new 8.2 on /dev/sdb. Everything installed properly, but when it boots up it fails and tells me the boot file is broken. Bullshit - i have not touched it.

    After some searching I found the root cause. extlinux.conf references partions by label. Stupid - i have two „system“ and two „storage“ volumes! The extlinux should use UUID like other distributions e.g. Debian 9 to make the disk reference unique.

    Original extlinux.conf:

    1. DEFAULT linux
    2. PROMPT 0
    3. LABEL linux
    5.  APPEND boot=LABEL=System disk=LABEL=Storage  quiet

    This fixes the issue (replace append line):

    1. APPEND boot=UUID=[put id here] disk=UUID=[put id here]  quiet

    The guids can be found at /dev/disk/by-uuid

  • Using labels works perfectly as long as you use different labels for each storage partition. Using uuids causes problems if you want to clone to a new drive / card / stick - which I'd guess affects more people than the multiple storage scenario.

    Personally I much prefer the 'label' approach, but obviously it's up to the devs. Neither way is 'stupid'.

  • Labels are extreme risky. This can destroy a system. It boots from sdb1 and mounts sda2 with userdata, but needs sdb2.

    If the big linux distributions use UUID than I think there are good reasons for this. However i‘m not aware of all the reason, but the issue I faced is a clear prove.

  • Either change the partition labels so the two (or four, or any other multiple of two) sets of partitions are labelled distinctly, or switch to using UUID. It will not work in an OOB config as it is using labels and you have duplicate labels (something will boot, but, roll dice to guess what).

  • Sure, so you changed labels. Nothing I can do in setup or that is done automatically by setup if a conflicting label has been found.

    The UUID would be much safer and is the defacto standard.

  • As libreelec developer this may be acceptable for you personally as you are aware of all these details.

    As end user who just do standard installs - this is more than unexpected and difficult to impossible to solve.

    I’m doing system administration for about 30 years, but I’m not a libreelec developer and this is unexpected behaviour, too. The boot error message is also clearly wrong and points into a wrong direction. If you personally already rename every label it should be no extra challenge to manage the uuid references. If there is any other solution I‘m also fine with it, but it need to be a unique identifier per volume to prevent such things to happen. I’ve only pointed out that the current setup has a design flaw that should be fixed.

  • If you re-read what I've written it should be perfectly clear that I'm a user, not a dev.

    As a user I don't see there's a problem - in fact I much prefer the current (via label) implementation. But rest assured if the devs do decide to switch to uuid's I'll just deal with it.