FS#29699 - [linux] [linux-lts] please make new kernel install a transaction

Attached to Project: Arch Linux
Opened by Brian Olsen (bnolsen) - Tuesday, 01 May 2012, 20:00 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 02 May 2012, 11:27 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Tobias Powalowski (tpowa)
Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: had a driver (wifi) wig out on me. started kernel downgrade. during initramfs creation the kernel panicked hard. during system reboot the initramfs is detected as corrupt and the system stops booting.

Suggestion: please create the kernel and the initramfs with other names, then overwrite the existing ones when the kernel/initramfs creation is successful. A possible issue with available space on the boot partition (but the transaction would fail).

Steps to reproduce:
run pacman to install the kernel. while the initramfs image is being created reboot the machine simulating hard crash. that kernel won't boot anymore.
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 02 May 2012, 11:27 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#16702 
Comment by Dave Reisner (falconindy) - Tuesday, 01 May 2012, 20:16 GMT
Install linux-lts if you want a fallback option.
Comment by Jelle van der Waa (jelly) - Tuesday, 01 May 2012, 20:25 GMT
oh dear, this smells like a duplicate of https://bugs.archlinux.org/task/16702 and nobody has ever showed interest to implement it ... sadly
Comment by Brian Olsen (bnolsen) - Wednesday, 02 May 2012, 03:34 GMT
  • Field changed: Percent Complete (100% → 0%)
It is *NOT* a duplicate. It just requests using temporary names for the kernel and initramfs images, make sure those 2 files are successfully created before renaming them to the *final* install name. How you can guarantee all blocks are written to disk first I don't know (last update where linux-lts and linux both updated the kernel panic corrupted all copies of initramfs)
Comment by Evangelos Foutras (foutrelis) - Wednesday, 02 May 2012, 03:39 GMT
Easier said than done. I have my doubts about whether it's possible to do what you're describing, but on the other hand I'm not familiar with pacman's internals and the way it replaces files. :)
Comment by Dave Reisner (falconindy) - Wednesday, 02 May 2012, 03:45 GMT
No, this is bullshit. You can't guarantee that something doesn't go wrong when you're renaming the files if you aren't sure that writing the files to disk is kosher. Your "solution" is absurdly hacky and leaves you in a totally inconsistent state given that pacman will remove the currently installed package before installing the new one.

This is:

a) Insane
b) An uneducated guess at an unreasonable solution to a long standing request
c) Unintentionally a dupe of  FS#16702 
d) a cry for using linux-lts as a backup if you're going to be paranoid.
Comment by Dave Reisner (falconindy) - Wednesday, 02 May 2012, 03:50 GMT
Other _reasonable_ solutions include:

a) transactional filesystems
b) since a) doesn't exist in linux, backups and snapshots (via LVM or btrfs).
Comment by Tobias Powalowski (tpowa) - Wednesday, 02 May 2012, 07:18 GMT
So can we close this?

Loading...