Giter Site home page Giter Site logo

Comments (13)

HiassofT avatar HiassofT commented on August 17, 2024 1

We use udevil to auto-mount drives, the 95-udevil-mount.rules udev rules controls which drives/partition get auto-mounted.

You can either create an empty 95-udevil-mount.rules file in /storage/.config/udev-rules.d (that will disable auto-mounting completely) or copy the existing one from /usr/lib/udev/rules.d/ there and tweak it.

We already exclude some partitions from being auto-mounted, see here: https://github.com/LibreELEC/LibreELEC.tv/blob/libreelec-9.2/packages/sysutils/udevil/udev.d/95-udevil-mount.rules#L8-L10

# check for special partitions we dont want mount
IMPORT{builtin}="blkid"
ENV{ID_FS_LABEL}=="EFI|BOOT|Recovery|RECOVERY|SETTINGS|boot|root0|share0", GOTO="exit"

If you find out which partition / label is the problematic one we can probably extend that rule.

from libreelec.tv.

chewitt avatar chewitt commented on August 17, 2024

@MrChromebox any ideas? .. I'm wondering if the fsck in init touches anything? but then if it did, I'm sure we'd have seen lots more issues reported as Chromebox devices are fairly common.

see https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/sysutils/busybox/scripts/init#L36

from libreelec.tv.

chewitt avatar chewitt commented on August 17, 2024

nb: if you add nofsck to boot params, it will prevent this check

see https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/sysutils/busybox/scripts/init#L1018

from libreelec.tv.

MrChromebox avatar MrChromebox commented on August 17, 2024

@yds what do you mean "Install ChromeOS on the second drive of the same system." If you're using some hack to run ChromeOS on an unsupported device, all bets are off.

from libreelec.tv.

yds avatar yds commented on August 17, 2024

@yds what do you mean "Install ChromeOS on the second drive of the same system."
If you're using some hack to run ChromeOS on an unsupported device, all bets are off.

I'm using the NeverWare CloudReady USB installer to install ChromeOS
https://www.NeverWare.com/freedownload#home-edition-overview

it seems to me that LibreELEC finds random FAT32 partitions on the ChromeOS drive and mounts them and after that ChromeOS will no longer boot.

one of the partitions LibreELEC auto-magically mounts is the ChromeOS EFI partition.. not saying that the EFI partition is getting corrupted, but the reproducible part is if I install both NeverWare's ChromeOS and LibreELEC on two different drives on the same box ChromeOS will work like a charm so long as I never boot LibreELEC -- if I boot LibreELEC and allow it to auto-mount whatever it finds then ChromeOS will reboot loop until I stop it.

from libreelec.tv.

MrChromebox avatar MrChromebox commented on August 17, 2024

CloudReady is not ChromeOS, it's just derived from the same OSS project (ChromiumOS) but there are a ton of differences.

from libreelec.tv.

yds avatar yds commented on August 17, 2024

CloudReady is not ChromeOS, it's just derived from the same OSS project (ChromiumOS) but there are a ton of differences.

understood. However it is clearly LibreELEC causing corruption of another OS on another drive. The corruption happens while LibreELEC is running. installing and never running LibreELEC does not cause any corruption.

when I open the File Manager in LibreELEC I can see a bunch of drive partitions mounted which belong to the CloudReady drive.

I suspect that if LibreELEC did not auto-mount all those partitions then CloudReady would continue to function problem free.

from libreelec.tv.

MrChromebox avatar MrChromebox commented on August 17, 2024

I suspect that if LibreELEC did not auto-mount all those partitions then CloudReady would continue to function problem free.

probably, and I'm sure there's a way to blacklist the drive, or disable auto-mounting, just not sure what it is. Nor why simply mounting the partition would cause an issue.

from libreelec.tv.

yds avatar yds commented on August 17, 2024

I figure the auto-mounting is there to make it easier for users to get to their media on whatever they happen to plug into a LibreELEC box.

Seems like in this edge use case, LibreELEC is a little over zealous in the quest to make things easier for users.

If LibreELEC had a knob somewhere to exclude a drive from auto-mounting that would very likely solve the problem.

from libreelec.tv.

yds avatar yds commented on August 17, 2024

If you find out which partition / label is the problematic one we can probably extend that rule.

@HiassofT thx.. that's perfect. lemme see what I can figure out and I'll report back.

from libreelec.tv.

yds avatar yds commented on August 17, 2024

@HiassofT SOLVED! adding the labels in the diff below keeps LibreELEC from auto-mounting and corrupting any of the CloudReady ChromeOS partitions on the other drive.

--- /usr/lib/udev/rules.d/95-udevil-mount.rules 2020-10-25 10:59:44.000000000 -0400
+++ /storage/.config/udev.rules.d/95-udevil-mount.rules       2020-11-19 18:00:15.000000000 -0500
@@ -7,7 +7,7 @@

 # check for special partitions we dont want mount
 IMPORT{builtin}="blkid"
-ENV{ID_FS_LABEL}=="EFI|BOOT|Recovery|RECOVERY|SETTINGS|boot|root0|share0", GOTO="exit"
+ENV{ID_FS_LABEL}=="BOOT|EFI|EFI-SYSTEM|OEM|ROOT-A|H-STATE|STATE|Recovery|RECOVERY|SETTINGS|boot|root0|share0", GOTO="exit"

 # /dev/sd* and /dev/mmc* ith partitions/disk and filesystems only and /dev/sr* disks only
 KERNEL=="sd*|mmc*", ENV{DEVTYPE}=="partition|disk", ENV{ID_FS_USAGE}=="filesystem", GOTO="harddisk"

thx for pointing out where to fiddle with the settings.

from libreelec.tv.

HiassofT avatar HiassofT commented on August 17, 2024

Thanks a lot for reporting back!

"EFI-SYSTEM" sounds like it could be safe to add to the default list, but the other labels not so much - we have to keep that list as short as possible, otherwise users will complain that their drives don't mount.

I'm wondering a bit if this NeverWare CloudReady OS is maybe hibernating instead of doing a full shutdown, in that case mounting the partitions from LibreELEC (or any other OS) could have catastrophic effects.

from libreelec.tv.

yds avatar yds commented on August 17, 2024

I'm wondering a bit if this NeverWare CloudReady OS is maybe hibernating instead of doing a full shutdown,
in that case mounting the partitions from LibreELEC (or any other OS) could have catastrophic effects.

I doubt that's the case.. NeverWare CloudReady ChromeOS gets corrupted if LebreELEC auto-mounts any of the partitions when:

  1. CloudReady is installed first and the box shuts down.
  2. LibreELEC is installed on the other drive and booted after install.
  3. CloudReady will not boot even tho it was never booted in the first place and never had a chance to hibernate.

donno what it is, but now that I know the workaround, this is not a showstopper for this install on the LivaX2 box.

might be worth putting https://GitHub.com/LibreELEC/LibreELEC.tv/issues/4668#issuecomment-730495693 in the docs -- woulda taken me much longer to figure this out without getting clued in like that. thx again!

from libreelec.tv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.