Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#59991 - [linux] [mkinitcpio] Updating kernel without enough space in /tmp results in an unbootable system

Attached to Project: Arch Linux
Opened by Jacob (Kappa322) - Sunday, 09 September 2018, 01:14 GMT
Last edited by Eli Schwartz (eschwartz) - Sunday, 09 September 2018, 01:35 GMT
Task Type General Gripe
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version 5.1.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
Had a full /tmp (didn't notice it was) and did `pacman -Syyu`.
There were a lot of errors printed but I didn't really see them because I was doing other stuff on other monitors while updating. I saw only the last few errors about no space left on device. So I emptied out my /tmp and ran `pacman -Syyu` again. Pacman said nothing to update. After rebooting the system it printed a stack trace immediately after bootloader (and obviously didn't boot properly). To fix it I booted with live iso, chroot'ed into the system and force updated the linux package.

I would expect it to, after failing to create the image, not replace the old initramfs and instead mark the update as failed.

It does currently print this:
==> Creating gzip-compressed initcpio image: /boot/initramfs-linux-fallback.img
==> WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctly

Which sure, if you know what initramfs is that should concern you. If you're a mortal human then things like this shouldn't be able to brick your system.

Steps to Reproduce:
1. Fill your /tmp
2. Run pacman -Syu
3. Reboot
4. Read what the value of your rbp register was.

This task depends upon

Closed by  Eli Schwartz (eschwartz)
Sunday, 09 September 2018, 01:35 GMT
Reason for closing:  Not a bug
Additional comments about closing:  There is nothing we can do here except reinforce the advice to "read command output when provided". pacman is generally considered to be pretty good about not providing overly verbose, useless information: if we *do* print something, it's probably a good idea to read it.
Comment by Eli Schwartz (eschwartz) - Sunday, 09 September 2018, 01:33 GMT
  • Field changed: Attached to Project (Pacman → Arch Linux)
  • Field changed: Summary (Updating kernel without enough space in /tmp results in an unbootable system → [linux] [mkinitcpio] Updating kernel without enough space in /tmp results in an unbootable system)
This has absolutely, positively nothing to do with pacman. It has to do with the linux package, which provides a hook that runs mkinitcpio. This hook failed to run to completion.

Some points to note:

- Pacman correctly marked the hook as having failed.
- Users are expected to pay attention to pacman's output.
- the update was successful, but things that ran after the update were not. It doesn't matter, because pacman cannot roll back an update once it has started, whether it fails to extract the package files or whether it fails to run the install hooks or even whether it fails to run the post-transaction hooks as it did here -- if you want atomically revertable updates, implement this using the filesystem layer: pacman -S snap-pac, if your filesystem is btrfs.
- It's categorically impossible to say "don't replace the mkinitcpio if it couldn't build a new image". That wouldn't help. An old initcpio that doesn't match your *successfully* installed kernel, is just as broken as a new initcpio that is unsuccessfully generated. Neither one will work. If the old one worked, we wouldn't bother creating a new one.
- Many things can go wrong with a full /tmp, and mkinitcpio is one of them. Luckily it prints an error message, which unluckily you did not read, but if you had read it, this would be a sign that you should re-run mkinitcpio after fixing your /tmp issue.
- If you have error messages after running pacman -Syu and you don't know why, *DO NOT REBOOT* until you know what happened. For exactly the reason that prompted you to open this bug report. Note: This does not work, if you don't read the error message.

"There were a lot of errors printed but I didn't really see them because I was doing other stuff on other monitors while updating" ==> this means you did not scroll back to read the other errors, which was a big mistake. If you don't read the error messages we *do* provide, how exactly are we supposed to fix the problem in a way that you *will* read?

Loading...