Please revise the installer to add vmd to modules

true we can go to test it also first and it could be that it will get into the arch package too.
But I a do not fully get the logic of what is needed to detect and get it to be used as true false in the module…
i see this part:

    uses_btrfs = False

and here it seems to set to true if it finds the value:

 if partition["fs"] == "btrfs":
            uses_btrfs = True

what is used down here to add the module (in case for btrfs as an example):

    if uses_btrfs:
        modules.append("crc32c-intel" if cpuinfo().is_intel else "crc32c")
    else:
        hooks.append("fsck")

so there is something outside used / imported for the detection part. (GlobalStorage)

need to learn python first I think :crazy_face:)

In this case, is it possible to detect it? If it is, I can write the Python for you.

If not, and it is just being always added you don’t need anything except the single line I provided above.

Does it need to be detected or can it just be added so the module is there if needed? I don’t know the ramifications of that. I only know what happens when it’s not there and is required.

modules.append("vmd")

as afaik it is a module ?

Actually, it is probably better just to change:

modules = []

to

modules = ["vmd"]

That would be more consistent with what is already there.

1 Like

you mean on the local mkinitcpio.conf?
This will get overwritten by initcpio module in calamares… it does overwrite the lines where it adds entries.

No, here:

2 Likes

…wth is tuple?.. this: mytuple = (“apple”, “banana”, “cherry”) I learned some python now :fist:

Yes looks like this is used to overwrite the lines in the first place… and it looks like it accepting to have already entries…
now I do not understand why no one hints me on that before. Next time I will ask you directly :wink:
discourse already try to force me to do so before :space_invader:

b.t.w. is this somehow intended to be like that?
2021-10-23_22-14
original archshiped mkinitcpio has () and Calamares puts ""

2 Likes

It looks wrong to me but I haven’t read the initcpio code to know for sure.

What happens when you put something in the modules list, does Calamares add the () then?

Was it month of suffering…? :laughing:
Yeah, next time you should ask @dalto :upside_down_face:

Yes, looks like a calamares ”bug”. Also FILES has empty quotes. Those bash variables should be arrays with (), not quotes. But bash understands both…
As far as I know, they used to be just strings with quotes, but changed them to arrays because bash supports arrays.

2 Likes

hooks look like this…
HOOKS="base udev autodetect modconf block keyboard keymap consolefont filesystems fsck"
I think to remember that arch changed that some time ago… and has ""before

Yes now syntax is () but as @manuel said it still understand both…
Perhaps Calamares does it with quotes still for legacy support, like Debian or Ubuntu LTS distros?

this would be it…

is it here?

If the variables have values, they seems to be in () by calamares…

1 Like

All in all, what @dalto showed looks like the correct place. But I don’t really know calamares code much.

sed 's/ modules = []/ modules = ["vmd"]/g' $_reponame/src/modules/initcpiocfg/main.py
Will it work? :wink: I feel lost on sed everytime… patching is easier. :roll_eyes:

Now that you mention it, I do seem to remember it changing. It was a few years ago though, right?

yes … not that long ago… as i change more than one line I go for patch. :yum:

1 Like

To be honest I’m only barely intermediate Linux person, if there’s any way you could copy paste commands that I need to enter I get stuck at the black screen with not being able to read the system at all I believe I should boot in the live ISO, Chroot and and make some commands but I’m very unsure about it any help is appreciated!