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#48020 - [mkinitcpio] upgrading lvm2 corrupt the initramfs-linux.img

Attached to Project: Arch Linux
Opened by dummys (dummys) - Wednesday, 03 February 2016, 19:08 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 13 February 2016, 19:44 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Thomas Bächler (brain0)
Evangelos Foutras (foutrelis)
Dave Reisner (falconindy)
Architecture All
Severity Critical
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After doing 1day of test it appears that this is the lvm2 package that corrupt the initramfs and cause an error at boot: https://imgur.com/ZU2T26R
Downgrading to lvm2-2.02.138-1-x86_64.pkg.tar.xz, deleting initramfs/fallback, mkinitcpio -p linux solved the problem.


Additional info:

latest kernel, computer Macbookpro62
/dev/sda4 -> luks -> lvm

content of my mkinitcpio.conf
What did you need more ?

Steps to reproduce:

install lvm2-2.02.141-1-x86_64.pkg.tar.xz
recreate mkinitcpio -p linux
reboot

This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 13 February 2016, 19:44 GMT
Reason for closing:  Not a bug
Comment by dummys (dummys) - Wednesday, 03 February 2016, 20:03 GMT
Same problem after trying to update device-mapper 2.02.138-1 -> 2.02.141-1. Downgraded it, mkinitcpio -p linux -> initramfs bugged no boot, deleting /boot/initramfs*, then mkinitcpio -p linux, reboot initramfs working again

Same with mkinitcpio: mkinitcpio 18-2 -> 19-1

content of df -h just to say that /boot is not full and is mounted:

-> $ df -h
Filesystem Size Used Avail Use% Mounted on
dev 3.9G 0 3.9G 0% /dev
run 3.9G 864K 3.9G 1% /run
/dev/mapper/vgcrypt-root 24G 19G 3.7G 84% /
tmpfs 3.9G 8.1M 3.9G 1% /dev/shm
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/vgcrypt-home 192G 151G 32G 83% /home
/dev/sda1 197M 108M 90M 55% /boot
tmpfs 3.9G 5.4M 3.9G 1% /tmp
/dev/mapper/data 408G 349G 38G 91% /data
Comment by dummys (dummys) - Wednesday, 03 February 2016, 21:45 GMT
UPDATE: I think the problem at the end is not lvm2. In fact if my initramfs-linux.img is booting, whenever I update it with mkinitcpio -p linux, then it's not booting anymore. The size of the binary grow everytime I type sudo mkinitcpio -p linux. Yes my /boot is mounted and yes my /boot has plenty of space. my / has also like 4G free as well.
What can I do ? Did I need to open an other bug ? I'm really lost with this issue, I'm trying to solve it since 00h00 yesterday. I tested ton of solution with help of #archlinux and I'm really stuck.

The only way to get back a sain system is: downgrade kernel-4.3.3-1/headers/linux-firmware/virtualbox-host-modules/lvm2/devmapper/mkinicpio, then rm /boot/initramfs*, removing "intel_agp i915" in .conf, mkinitcpio -p linux, adding back intel+i915, mkinitcpio -p linux, then initramfs is booting I'm lost. please Help
Comment by dummys (dummys) - Wednesday, 03 February 2016, 22:01 GMT
When doing a lsinitcpio -x with old and new, diffing it, they are the same. When doing stat on it, they new grows at each new mkinitcpio -p linux command. So could be the compression of the initrmafs that goes wrong and that's why I get this problem of initramfs bloated ?
Comment by dummys (dummys) - Wednesday, 03 February 2016, 22:41 GMT
So further research shows that with one initramfs that didn't work and one that did work, after lsinitcpio -x, and diff -r, they are exactly the same. So something resides in the compression...
Comment by dummys (dummys) - Wednesday, 03 February 2016, 22:45 GMT
I tested with compression=cat, same issue
Comment by Dave Reisner (falconindy) - Wednesday, 03 February 2016, 23:19 GMT
I can't reproduce the growing image size -- it just varies:

$ while true; do mkinitcpio --config ./mkinitcpio.conf -g foo.img &>/dev/null && stat -c %s foo.img; done
8658585
8658813
8658803
8658857
8658761
8658928
8658833
8658743
8658819
...

The above implies gzip, but this is true of other compression methods that I tried: lz4, xz, lzop, and bzip2

Without compression, the image size remains constant between runs.

> I tested with compression=cat, same issue
There's now a lot of context in this bug report -- what precisely do you mean by this?
Comment by dummys (dummys) - Wednesday, 03 February 2016, 23:28 GMT
I mean even with cat, so no compression right ?, the only way to make a initramfs bootable is: downgrade kernel-4.3.3-1/headers/linux-firmware/virtualbox-host-modules/lvm2/devmapper/mkinicpio, then rm /boot/initramfs*, mkinicpio -p linux, removing "intel_agp i915" in .conf, mkinitcpio -p linux, adding back intel+i915, mkinitcpio -p linux, then initramfs is booting.
Comment by dummys (dummys) - Wednesday, 03 February 2016, 23:30 GMT
After this, if I retype mkinitcpio -p linux, then initramfs is not booting anymore. After lsinitcpio -x both old and new initramfs, diffing, they are the same.
Comment by dummys (dummys) - Wednesday, 03 February 2016, 23:32 GMT
Sometimes I get even stranger error for initramfs: https://imgur.com/m1Jaab0
Comment by dummys (dummys) - Wednesday, 03 February 2016, 23:34 GMT
I'm sorry because their is many, many information, but I tested almost everything, like fsck of all the fs, removing the noauto,x-systemd.autumount for the /boot, pacman -Syu but everything is a dead end until now.
Comment by Dave Reisner (falconindy) - Thursday, 04 February 2016, 00:02 GMT
"Premature end of file /vmlinuz-linux" <-- this can't possibly be something which mkinitcpio is responsible for.

Is this some aging hard drive?
Comment by dummys (dummys) - Thursday, 04 February 2016, 06:57 GMT
You are right. The latest imgur happend after upgrading the kernel. To be honest I can't really remember, I get so much error at boot with this mkinitcpio story.

Not so aging,less than 1 year. It's a Samsung 850pro SSD 256GB.

smartctl output attached

Trim is enable with systemd fstrim timer.
Comment by dummys (dummys) - Thursday, 04 February 2016, 20:59 GMT
Dave Which other info can I give to you to help me understand what's going wrong ?
Comment by Dave Reisner (falconindy) - Thursday, 04 February 2016, 21:06 GMT
If you can reproduce this without compression enabled, then please do a bytewise comparison (cmp might be a good place to start) of a working and non-working image. If there's a difference, please make both images available for download.
Comment by dummys (dummys) - Thursday, 04 February 2016, 21:59 GMT
Ok will do this tomorrow and keep you posted.
Comment by dummys (dummys) - Friday, 05 February 2016, 20:58 GMT
Ok I solved it finally.
I formated my /boot and recopying my stuff. Then it was booting, then pacman -Syu and all is ok. You can close all my bug.
Thanks for help anyway Dave :D

Loading...