Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.kernel > #52533
| From | Jose R R <Jose.r.r@metztli-it.com> |
|---|---|
| Newsgroups | linux.debian.kernel |
| Subject | Re: Booting uncompressed kernel images |
| Date | 2016-02-01 11:40 +0100 |
| Message-ID | <qXk3L-1dK-9@gated-at.bofh.it> (permalink) |
| References | <qXi1Z-8lp-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Feb 1, 2016 at 12:03 AM, Tiago Ilieve <tiago.myhro@gmail.com> wrote: > Hi, > > I have a scenario[1] where the default Linux kernel compressed with XZ > (from Jessie and up) cannot be booted. The first thing that I've tried > was to uncompress it using "extract-linux"[2] and it didn't worked by > the time, so I decided to rebuild the entire "linux-image-*" package > changing "CONFIG_KERNEL_XZ=y" to "CONFIG_KERNEL_GZIP=y". This, of > course, implies that it would be needed to recompile the kernel every > time a new version of the package is released, which is an overkill > for a such simple requirement. Does the kernel boot after after you rebuild it with GZIP=y? > > Yesterday, Ben Hutchings itself suggested[3] me to write a hook that > decompresses the kernel at package installation time, something which > I find a great idea. The problem is that, again, I couldn't boot a > machine (tried on VirtualBox and Xen) after uncompressing its > "/boot/vmlinuz-*" using "extract-linux". The script is not without its issues, apparently, but you can modify xxx[1] in script if that is causing your hang. > I can generate an initrd file > from this uncompressed image, "update-grub" detects it fine, but if I > reboot it the following error appears: > > Loading Linux 3.16.0-4-amd64 ... > error: invalid magic number. > Loading initial ramdisk ... > error: you need to load the kernel first. > > The same error happens if this uncompressed image is compressed again > with "gzip", for instance. > > Given this situation, I have two questions: > > - If a kernel is configured to be compressed at build time, it can't > be booted if uncompressed later? I have some doubts about this, > because there is more than one report of successfully booting > uncompressed kernels[4][5]. > - Is "extract-linux" stripping some essential information (the script > looks for an offset to start the decompression process) from the > kernel image that is needed to boot it later? If so, is there a way to > recover and insert it on the uncompressed image? In Google Cloud Engine (GCE) I have not experienced those issues as I have created several images in Jessie and Stretch -- manually at the moment. They are Debian vanilla except for Reiser4 -patched kernel and root (/) Reiser4 -formatted. Best Professional Regards. PS I have also found binwalk [2] useful when examining contents of compressed kernel apt-get install binwalk Was not aware that Oracle had such an outdated cloud infrastructure ;-) [1] http://stackoverflow.com/questions/12002315/extract-vmlinux-from-vmlinuz-or-bzimage [2] http://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel -- Jose R R http://metztli.it --------------------------------------------------------------------------------------------- Try at no charge http://b2evolution.net for http://OpenShift.com PaaS --------------------------------------------------------------------------------------------- from our GitHub http://Nepohualtzintzin.com repository. Cloud the easy way! ---------------------------------------------------------------------------------------------
Back to linux.debian.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Booting uncompressed kernel images Tiago Ilieve <tiago.myhro@gmail.com> - 2016-02-01 09:30 +0100
Re: Booting uncompressed kernel images Ian Campbell <ijc@debian.org> - 2016-02-01 11:10 +0100
Re: Booting uncompressed kernel images Ian Campbell <ijc@debian.org> - 2016-02-01 11:40 +0100
Re: Booting uncompressed kernel images Jose R R <Jose.r.r@metztli-it.com> - 2016-02-01 11:40 +0100
Re: Booting uncompressed kernel images Tiago Ilieve <tiago.myhro@gmail.com> - 2016-02-02 02:50 +0100
Re: Booting uncompressed kernel images Ian Campbell <ijc@debian.org> - 2016-02-02 12:30 +0100
Re: Booting uncompressed kernel images Tiago Ilieve <tiago.myhro@gmail.com> - 2016-02-02 18:40 +0100
Re: Booting uncompressed kernel images Ian Campbell <ijc@debian.org> - 2016-02-02 18:40 +0100
Re: Booting uncompressed kernel images Tiago Ilieve <tiago.myhro@gmail.com> - 2016-02-04 19:00 +0100
Re: Booting uncompressed kernel images Ian Campbell <ijc@debian.org> - 2016-02-05 12:10 +0100
Re: Booting uncompressed kernel images Ben Hutchings <ben@decadent.org.uk> - 2016-02-05 16:10 +0100
Re: Booting uncompressed kernel images Andreas Ziegler <ml2013@andreas-ziegler.de> - 2016-02-05 16:10 +0100
csiph-web