QubesOS / qubes-issues

The Qubes OS Project issue tracker
https://www.qubes-os.org/doc/issue-tracking/
539 stars 48 forks source link

[R4.1] Dom0 won't boot after setting dom0_mem:max to lower than 2890M [EFI] #6772

Open SurFlurer opened 3 years ago

SurFlurer commented 3 years ago

Qubes OS version

R4.1

Which testing repositories are you using, if any?

None

Are you providing feedback about a specific package or packages in testing?

No

Affected component(s) or functionality

dom0, perhaps


Brief summary

After setting dom0-mem in grub to a lower value (from 4096M to 1536M, as described in https://forum.qubes-os.org/t/dom0-max-ram-low-memory-qubes-os-installations/4253), dom0 won't boot. I can see "load vmlinuz XXX load kernel XXX" after grub selection, however the window for luks password never shows up and the laptop automatically reboots.

How reproducible

Always

Steps to reproduce

1.sudo nano /etc/default/grub 2.change dom0_mem=max:4096M to dom0_mem=max:1536M 3.save the file and sudo grub2-mkconfig -o /boot/efi/EFI/qubes/grub.cfg 4.reboot

Expected behavior

dom0 will boot and I will be able to type in my luks password

Actual behavior

The screen remains black after grub(with backlight on), and it reboots.

Solutions you've tried

FAILED: change that value to 2048M, 2560M SUCCEEDED:change that value to 3072M I don't know what's the case between 2560 and 3072.

Additional context

I installed KDE as my desktop environment. It says dom0 only uses appro. 1G memory out of 4G assigned to it. So I'd like to shrink it to a smaller value. ~~When try to boot with advanced options in grub, one of the entries returned "Load xxx.....failed: you must load the kernel first." I'll try to get the exact output in a minute.~~(this is probably irrelevant to dom0_mem, since 3072M won't change this behaviour)


Relevant documentation you've consulted

None

Related, non-duplicate issues

None found

marmarek commented 3 years ago

Can you drop quiet and rhgb kernel options and see if you get more details?

SurFlurer commented 3 years ago

Sorry, but could you please tell me where to add it to grub? EDIT: Sorry , I see them.

SurFlurer commented 3 years ago

Nothing showed up. Nothing. Not a word. And I had trouble booting normally without quiet (though fixed it by editing grub entry)

faerbersteve commented 3 years ago

Which kernel version have you installed?

I was able to reduce dom0 memory to 1536MB. I have the kernel version 5.10.47-1 from the current-testing repo

SurFlurer commented 3 years ago

Hi @faerbersteve , my kernel is 5.10.43-1.fc32 from 20210626 R4.1 Alpha build. At least in my case, 5.10.46 doesn't work.

SurFlurer commented 3 years ago

After a careful experiment, I found that any value lower than 2890M is inappropriate and 2891M and above are OK. I don't know why.

faerbersteve commented 3 years ago

Kernel version 5.10.46 doesn't work on my side either. Even before changing the memory size. It just reboots without a message

Try to update to kernel 5.10.47

SurFlurer commented 3 years ago

Kernel version 5.10.46 doesn't work on my side either. Even before changing the memory size. It just reboots without a message

Try to update to kernel 5.10.47

5.10.47 isn't different to 5.10.43, because 2890M isn't working but 2891M is.

brendanhoar commented 3 years ago

What make, model, bios/uefi version and GPU?

This smells a little like a firmware or hardware problem, possibly with memory layout?

B

SurFlurer commented 3 years ago

Lenovo, thinkbook 14 Gen3 ACL, AMD Intergrated GPU.

ejose19 commented 3 years ago

If you selected LUKS2, then this may be related to Argon2i requiring a certain amount of memory (it was set when you encrypted the partition), so when you decrease dom0 memory lower than this amount, you won't be able to decrypt.

If it's your case, see: https://gitlab.com/cryptsetup/cryptsetup/-/issues/372 for solutions.

SurFlurer commented 3 years ago

Sounds reasonable! Is LUKS2 the default encryption method of 4.1? Thank you!

marmarek commented 3 years ago

Is LUKS2 the default encryption method of 4.1?

Yes, it is. But this sounds like a different issue - the default required memory is capped at 1GB, and that memory is needed after entering the passphrase, but in your case it fails before that.