splash_geninitramfs corrupts genkernel-generated initramfs when its compression is not gzip. The outcome is an unbootable system in most cases, due to initramfs not being loaded by the kernel. Steps to reproduce: 1. build an initramfs using xz compression using genkernel >3.4.24 2. run: splash_geninitramfs -a <initramfs> <theme name> printv "o Creating initramfs image.." if [ "$mode" == "g" ] || [ "$mode" == "a" ]; then (cd "${imgdir}" ; find . | cpio --quiet -o -H newc \ | gzip -9>../img.cpio.gz) mv "${workdir}/img.cpio.gz" "${img}" fi This above is smelly.
Created attachment 316259 [details, diff] Add lzma/xz compression support
From my local overlay: splashutils-1.5.4.4-r1.ebuild,v 1.2 #Add xz/lzma support grep -q "${PF}.ebuild,v 1.2" "${PORTDIR}"/media-gfx/splashutils/${PF}.ebuild \ || die RDEPEND+=app-arch/xz-utils src_prepare() { ... +epatch "${FILESDIR}"/1.5.4.4-xz.patch rm -f m4/* eautoreconf }
Created attachment 316271 [details, diff] 1.5.4.4-all-kernel-compressors.patch Here i add bzip2 and lzo compression support. The 1.5 half later i downgrade zlib to stable 1.2.5.1-r2 ver. Now my @system and all deps are stable (x86): gcc-4.5.3-r2, glibc-2.14.1-r3. After revdep-rebuild i rebuild deps of splashutils: emerge --oneshot gpm freetype bzip2 libpng lcms libmng baselayout cpio xz-utils fbgrab libjpeg-turbo klibc pkgconfig ahd, then: emerge --oneshot splashutils with new patch. RDEPEND+=app-arch/lzop src_prepare() { -epatch "${FILESDIR}"/1.5.4.4-xz.patch +epatch "${FILESDIR}/1.5.4.4-all-kernel-compressors.patch" } P.S.: I don't use genkernel
*** Bug 453034 has been marked as a duplicate of this bug. ***
Shameless self-promo: nice but my patch reuses Genkernel's approach, minimizing the number of possible arguments on the command line ;-) .
[[[ Poorly translated in Google thought (Плохо переведённые в гугле мысли) (and then edit by me) ]]] No problem here. Projects genkernel and splashutils differently understand the purpose initrd and are independent of each other. genkernel initramfs creates all modules to load a specific kernel configuration. And, if necessary, with a splash. splash_geninitramfs includes into initramfs only splash. And i think they do not have to edit the files initrd - only to create new ones. PS: About dracut i do not know anything. Don't use. [[[ Orig thinks (Оригинальные мысли) ]]] Проблемы здесь вообще нет. Проекты genkernel и splashutils по разному понимают назначение initrd и не зависят друг от друга. genkernel создаёт initramfs со всеми модулями для загрузки конкретной конфигурации ядра. И, если надо, со сплешем. splash_geninitramfs включает в initramfs только сплеш. И я думаю они не обязаны редактировать файлы initrd - только создавать новые. PS: Про dracut я вообще ничего не знаю. Не пробовал.
(In reply to comment #6) ... > And I think they do not have to edit the files initrd - only to create new > ones. Indeed. Both are intended for different purposes but they're complementary. However I think there's no need to make splashutils ebuild depend on app-arch/lzop. Or at least, add a USE flag (e.g. "lzo") and make the dependency conditional to it. Just my 2¢.
(In reply to comment #7) ... > However I think there's no need to make splashutils ebuild depend on > app-arch/lzop. Or at least, add a USE flag (e.g. "lzo") and make the > dependency conditional to it. MMMM... may be. gentoo-sources (& other kernel sources) don't have this DEP's. Simply i support my local lzma-patch from splashutils-1.5.4.3 and i add to my local ebuild version app-arch/lzma-utils --> app-arch/xz-utils --> app-arch/lzop without more thinks. And this my 'grep' call in the top of local ebiuld it's NOT good idea, but i more years do so. Vince C. I find your patch interesting too for try. Please, put it here as alternative and the time will decide what to do next. (NOT need some themes for one bug) PS: Patch for /usr/sbin/splash_geninitramfs it's bad idea (but may be good only for pkg_postinst() ). Rewrite your patch for splashutils-1.5.4.4/scripts/splash_geninitramfs.in
Created attachment 351190 [details, diff] Patch on splashutils-1.5.4.4/scripts/splash_geninitramfs.in > Vince C. I find your patch interesting too for try. > Please, put it here as alternative and the time will decide what to do next. > (NOT need some themes for one bug) > > PS: Patch for /usr/sbin/splash_geninitramfs it's bad idea (but may be good > only for pkg_postinst() ). > Rewrite your patch for splashutils-1.5.4.4/scripts/splash_geninitramfs.in Sorry for taking such a long time. I've just adapted my patch for splashutils-1.5.4.4/scripts/splash_geninitramfs.in as suggested. All I did was change the path name in the diff header. Hope this helps. I haven't tested it yet and I guess the ebuild should be modified to apply this patch accordingly.
Okay, tested it, works as expected. I copied splashutils-1.5.4.4-r1 ebuild to my local overlay and added the following @ line 87: epatch "${FILESDIR}/${P}-bzip2.patch" + epatch "${FILESDIR}/${P}-splash_geninitramfs-compress.patch" Then I re-emerged splashutils.
@Asaf: Your opinion on this?
I will take a look at the patches and test them. It will take me a few days...
Ping, reminder.
no genkernel changes needed for this, but I would suggest that spashutils detect what is being done and match it, so that the entire initramfs has consistent compression.
(In reply to Robin Johnson from comment #14) > no genkernel changes needed for this, but I would suggest that spashutils > detect what is being done and match it, so that the entire initramfs has > consistent compression. I don't get it. How would one expect splashutils to "guess" the compression type if the latter is not given as an argument, for instance?
*** Bug 488524 has been marked as a duplicate of this bug. ***
Package removed.