New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel-qubes-vm uninstall scripts problems #849

Closed
marmarek opened this Issue Mar 8, 2015 · 2 comments

Comments

Projects
None yet
1 participant
@marmarek
Member

marmarek commented Mar 8, 2015

Reported by joanna on 7 May 2014 10:11 UTC
qvm-prefs shows available kernels based only on the existence of a directory, even if it's empty:

[~](joanna@dom0)$ qvm-prefs -s vault kernel
Missing kernel version argument!
Possible values:
1) default
2) none (kernels subdir in VM)
3) <kernel version>, one of:
  - 3.11.1-2
  - 3.12.18-1
  - 3.11.10-2
  - 3.12.14-4
  - 3.12.14-3
[~](joanna@dom0)$ tree -L 2 /var/lib/qubes/vm-kernels/
/var/lib/qubes/vm-kernels/
 3.11.10-2
  initramfs
  modules
  modules.img
  vmlinuz
 3.11.1-2
 3.12.14-3
 3.12.14-4
  initramfs
  modules
  modules.img
  vmlinuz
 3.12.18-1
     initramfs
     modules
     modules.img
     vmlinuz

8 directories, 9 files

It seems to me like a problem with qubes-kernel-vm RPM deinstallation script, i.e. it should also be removing this directory, not only its contest.

Ah, there is a bigger problem: when the user removes qubes-kernel-vm (perhaps unintentionally, as a result of reaching the limit of max 3 kernel packages, see #848) the package will successfully remove itself even if there are VMs which explicitly use this kernel!

Migrated-From: https://wiki.qubes-os.org/ticket/849

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Modified by marmarek on 12 May 2014 15:40 UTC

Member

marmarek commented Mar 8, 2015

Modified by marmarek on 12 May 2014 15:40 UTC

@marmarek marmarek added this to the Release 2 milestone Mar 8, 2015

@marmarek marmarek self-assigned this Mar 8, 2015

@marmarek

This comment has been minimized.

Show comment
Hide comment
@marmarek

marmarek Mar 8, 2015

Member

Comment by marmarek on 12 May 2014 19:29 UTC
http://git.qubes-os.org/?p=marmarek/linux-kernel.git;a=commit;h=590e9b48b8955ef2c0c2603133c2e68a7af7a108
Note that this will work only for newly built packages.
But in addition implemented more thorough check for kernel setter (verifies no only directory name, but also its content):
http://git.qubes-os.org/?p=marmarek/core-admin.git;a=commit;h=86bae8d27634266a38b0e6e0600b5b3926c3120b

Member

marmarek commented Mar 8, 2015

Comment by marmarek on 12 May 2014 19:29 UTC
http://git.qubes-os.org/?p=marmarek/linux-kernel.git;a=commit;h=590e9b48b8955ef2c0c2603133c2e68a7af7a108
Note that this will work only for newly built packages.
But in addition implemented more thorough check for kernel setter (verifies no only directory name, but also its content):
http://git.qubes-os.org/?p=marmarek/core-admin.git;a=commit;h=86bae8d27634266a38b0e6e0600b5b3926c3120b

@marmarek marmarek closed this Mar 8, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment