Mkinitcpio.conf correct hooks and syntax

Ah okay. :slight_smile: Didn’t see that.

@craywolf

Thanks for testing immediately and reporting here. :slight_smile:

Is this another Calamares issue? (Not talking about the quote mark syntax but rather the missing ‘kms’) I’m relieved it’s not just me but rather something wrong with the installation in general.

1 Like

Thanks for the feedback. Apparently Calamares is behind as kms has been default since last October with v33.

I’ll let @philm know.

@mkb @craywolf
We actually already cleared that. The default hooks on install are the calamares hooks. From time to time (every couple of months for example), there is a pacnew, esp. On mkinitcpio package update. If you installed after that of if you switch branches, you may miss the pacnew with the arch hooks.

I find that approach pretty messy, but it is up to manjaro developers to change it and unify the hooks among all the userbase by modifying calamares. So far they do not really care, judging by this thread.

As for kms, i removed it (i have no discrete graphics). There was no difference in log text size, the only visible difference is the timing, with kms the screen switches modes (blinks) very early, after the first couple of line of text appear (i use nosplash), without it - right before the login screen appears.

Gee, thanks @Teo . I really appreciate your feedback. Obviously complaining and blaming others solves issues. :roll_eyes:

Just to clarify, it’s not a complaint from my end. I’m honestly just happy to know it’s not my fault and that I understand why ‘kms’ is missing. :smiley:

I think I have another thread you’ll like guys…

1 Like

I was replying to @Teo, not you. :wink:

1 Like

Joining the band for one set only; there’s no pacnew with these lyrics, also composed today:

# vim:set ft=sh
# MODULES
...
#     MODULES=(usbhid xhci_hcd)
MODULES=""

# BINARIES
...
BINARIES=()

# FILES
...
FILES=""

# HOOKS
...
##   This setup specifies all modules in the MODULES setting above.
##   No RAID, lvm2, or encrypted root is needed.
#    HOOKS=(base)
#
##   This setup will autodetect all modules for your system and should
##   work as a sane default
#    HOOKS=(base udev autodetect modconf block filesystems fsck)
#
##   This setup will generate a 'full' image which supports most systems.
##   No autodetection is done.
#    HOOKS=(base udev modconf block filesystems fsck)
#
##   This setup assembles a mdadm array with an encrypted root file system.
##   Note: See 'mkinitcpio -H mdadm_udev' for more information on RAID devices.
#    HOOKS=(base udev modconf keyboard keymap consolefont block mdadm_udev encrypt filesystems fsck)
#
##   This setup loads an lvm2 volume group.
#    HOOKS=(base udev modconf block lvm2 filesystems fsck)
#
##   NOTE: If you have /usr on a separate partition, you MUST include the
#    usr and fsck hooks.
HOOKS="base udev autodetect modconf block keyboard keymap consolefont plymouth filesystems fsck"

# COMPRESSION
...
#COMPRESSION_OPTIONS=()

# MODULES_DECOMPRESS
...
#MODULES_DECOMPRESS="yes"

Just in case y’all missed it.

Even though mkinitcpio has defined the arrays using () → Calamares installer rewrites using “”

That has now changed upstream - with this commit to the v3.3 development branch.

We only have to wait for this to be included with Manjaro Calamares.

Which hooks is correct is a matter of system configuration - it is impossible to cater for each and every end user which may install Manjaro.

Manjaro uses a sane set of defaults - if your system and your preference is another - then change them.

2 Likes

That is a nice beginning, but only affecting new installations and we are still not talking about the hooks, only about the brackets?

You mean calamares. There are no manjaro defaults. There are calamares defaults and manjaro pacnews (from time to time).

Make sure amd-ucode is installed or you won’t be able to boot, no matter if ‘amdgpu’ in the modules line is actually needed or not. Found out when cleaning up the system after an initially problem-free move of an ssd from Athlon/radeon to Intel/nvidia hardware…

1 Like

Sharing some trivia: Years ago, I typically installed both amd-ucode and intel-ucode (or their equivilents) when wanting a certain amount of portability with a Linux installation (the OS was in a removable caddy).

I doubt I’d recommend that anymore though, especially with a rolling release such as Manjaro.

Because the hooks can be tweaked to any user’s preference.

I wonder why you think there is a one-size-fits-all? I am beginning to think that you lesser about the packing than you pretend … please check before rambling on subjects you know little of.

Let me rephrase - Arch provides some sane defaults

And calamares rewrites the defaults from Arch with choices during installation

But I very much against modifying installations backwards - there is absolutely no reason to do that.

Worst case scenario - some one sees the pacnew and due ignorance implements the details and system breaks - who’s now to blame - I know who will get it …

And Manjaro Linux has backported the brackets patch

I will see myself out :man_shrugging:

2 Likes

Because if a user request support and has never touched the file, you have to know what the defaults are to provide support. That is exactly why there are limited number of supported kernels, DEs and no aur support.

Let me paraphrase: there are no arch defaults on a manjaro installation. They come with a pacnew.

And yet that is exactly what happens now. A pacnew with the arch defaults comes from time to time and rewrites the calamares defaults if the user deals with the pacnew at all.

Generally, only someone that has never provided support to masses of customers can say that mixing different configurations among the userbase is not a support hell. That is exactly why your ISP is not giving access to your home router and controlling it remotely and updating it for everybody at the same time in the night.

Thanks for the heads-up. Those are the helpful nuggets of information I’m looking for. I wouldn’t have any idea to look out for this. I just checked and amd-ucode is installed. :smiley:

I’ve decided to not add ‘amdgpu’ to MODULES for now though but try my luck with ‘kms’ in the hooks.

EDIT - 02/12/23

Forgot to ask about the plymouth hook. mkinitcpio (Arch Wiki) doesn’t specifically mention this one. It’s been added by Calamares when it detects that Plymouth is installed.

Almost none of the listed HOOKS variables listed in this discussion (except for the ‘calamares’ standard one) list ‘plymouth’. Is it a) not needed anymore, b) covered by another hook like ‘kms’ or c) deliberately removed by all the more experienced users because it’s considered a useless gimmick?

I have been following this with interest, I thought my config was in order, and it probably is.

I read the links provided and about the btrfs hook it is stated;

Sets the required modules to enable Btrfs for using multiple devices with Btrfs. You need to have btrfs-progs installed to use this. This hook is not required for using Btrfs on a single device where the filesystems hook suffices.

What do they mean by that?
I have multiple devices, my home is on a separate partition and not a subvolume.
I do NOT have this hook, and it works.
Do they mean if I were to have multiple btrfs installations or something?

Probably because what is said right next to what you quoted:

Runs btrfs device scan to assemble a multi-device Btrfs root file system when udev hook or systemd hook is not present.

There is also this:

mkinitcpio -H btrfs
==> Help for hook 'btrfs':
This hook provides support for multi-device btrfs volumes. This hook
is only needed for initramfs images which do not use udev.

==> This hook has runtime scripts:
-> pre-mount hook
1 Like

I have NEVER done that.

I DO have multiple devices with btrfs.
I have NEVER scanned anything with btrfs device scan.

So question again:
Do they mean that the btrfs hook is needed if there are multiple btrfs installations? (multiple btrfs root systems)
Or do they mean if at least one btrfs system is CREATED using multiple devices?
Or WHEN is it ever needed?

Who said you should do it? Read the page, we are talking about hooks.

My guess multiple devices means multiple disks. Anyway, if you want to know what they mean you are welcome to go on irc.libera.chat:#archlinux and ask there.

This means that a btrfs volume consists of more than ONE device.

Device must be seen in context of command btrfs device

btrfs device --help
usage: btrfs device <command> [<args>]

    btrfs device add [options] <device> [<device>...] <path>
        Add one or more devices to a mounted filesystem.
    btrfs device delete <device>|<devid> [<device>|<devid>...] <path>
    btrfs device remove <device>|<devid> [<device>|<devid>...] <path>
        Remove a device from a filesystem
    btrfs device replace <command> [...]
    	Replace a device (alias of "btrfs replace")
    btrfs device scan [-d|--all-devices] <device> [<device>...]
    btrfs device scan -u|--forget [<device>...]
        Scan or forget (unregister) devices of btrfs filesystems
    btrfs device ready <device>
        Check and wait until a group of devices of a filesystem is ready for mount
    btrfs device stats [options] <path>|<device>
        Show device IO error statistics
    btrfs device usage [options] <path> [<path>..]
        Show detailed information about internal allocations in devices.

manage and query devices in the filesystem

:footprints:
P.S.:
A device in linux is a thing under /dev :wink: but btrfs only uses partitions and disks from there.

1 Like