[opensuse-factory] Decompressing TW initrd
Hi, It seems, that initrd in openSUSE TW is archived differently from earlier versions. How to extract content of initrd now? -- Regards -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tue, Feb 02, 2016 at 04:37:47PM +0200, opensuse.lietuviu.kalba wrote:
It seems, that initrd in openSUSE TW is archived differently from earlier versions. How to extract content of initrd now?
This puzzled me greatly a little while ago, until someone showed me the answer. What you expect to work: $ cpio -idv < initrd-4.4.0-2-default . early_cpio kernel kernel/x86 kernel/x86/microcode kernel/x86/microcode/GenuineIntel.bin 22 blocks But: $ /usr/lib/dracut/skipcpio initrd-4.4.0-2-default > initrd.xz $ xz -d initrd.xz Then $ cpio -idv < initrd does what you expect. -- ======================== Roger Whittaker roger@disruptive.org.uk http://disruptive.org.uk ======================== -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On 02/02/16 15:47, Roger Whittaker wrote:
On Tue, Feb 02, 2016 at 04:37:47PM +0200, opensuse.lietuviu.kalba wrote:
It seems, that initrd in openSUSE TW is archived differently from earlier versions. How to extract content of initrd now?
This puzzled me greatly a little while ago, until someone showed me the answer.
What you expect to work:
$ cpio -idv < initrd-4.4.0-2-default . early_cpio kernel kernel/x86 kernel/x86/microcode kernel/x86/microcode/GenuineIntel.bin 22 blocks
But:
$ /usr/lib/dracut/skipcpio initrd-4.4.0-2-default > initrd.xz
$ xz -d initrd.xz
Then
$ cpio -idv < initrd
does what you expect.
so as a one-liner it would be /usr/lib/dracut/skipcpio /boot/initrd-4.4.0-2-default |\ xz -cd |\ cpio -idv -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
2016.02.02 16:54, Bernhard M. Wiedemann rašė:
On 02/02/16 15:47, Roger Whittaker wrote:
On Tue, Feb 02, 2016 at 04:37:47PM +0200, opensuse.lietuviu.kalba wrote:
It seems, that initrd in openSUSE TW is archived differently from earlier versions. How to extract content of initrd now? This puzzled me greatly a little while ago, until someone showed me the answer.
What you expect to work:
$ cpio -idv < initrd-4.4.0-2-default . early_cpio kernel kernel/x86 kernel/x86/microcode kernel/x86/microcode/GenuineIntel.bin 22 blocks
But:
$ /usr/lib/dracut/skipcpio initrd-4.4.0-2-default > initrd.xz
$ xz -d initrd.xz
Then
$ cpio -idv < initrd
does what you expect. so as a one-liner it would be /usr/lib/dracut/skipcpio /boot/initrd-4.4.0-2-default |\ xz -cd |\ cpio -idv Thanks for suggestions!
Executing: /usr/lib/dracut/skipcpio /boot/initrd | xz -cd | cpio -idv Result: xz: (stdin): File format not recognized cpio: premature end of archive Maybe because I have not updated TW snapshot... For me worked with skip of `xz`: /usr/lib/dracut/skipcpio /boot/initrd | cpio -idv -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday 2016-02-02 16:09, opensuse.lietuviu.kalba wrote:
so as a one-liner it would be /usr/lib/dracut/skipcpio /boot/initrd-4.4.0-2-default |\ xz -cd |\ cpio -idv Thanks for suggestions!
Executing: /usr/lib/dracut/skipcpio /boot/initrd | xz -cd | cpio -idv Result: xz: (stdin): File format not recognized cpio: premature end of archive
Maybe because I have not updated TW snapshot...
The earlycpio image contains CPU firmware updates, and since not all CPUs support that, not all systems have an early cpio image that can be skipped. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Hi, Am Dienstag, 2. Februar 2016, 16:18:04 CET schrieb Jan Engelhardt:
On Tuesday 2016-02-02 16:09, opensuse.lietuviu.kalba wrote:
so as a one-liner it would be /usr/lib/dracut/skipcpio /boot/initrd-4.4.0-2-default |\ xz -cd |\ cpio -idv Thanks for suggestions!
Executing: /usr/lib/dracut/skipcpio /boot/initrd | xz -cd | cpio -idv Result: xz: (stdin): File format not recognized cpio: premature end of archive
Maybe because I have not updated TW snapshot...
The earlycpio image contains CPU firmware updates, and since not all CPUs support that, not all systems have an early cpio image that can be skipped.
skipcpio recognizes that and doesn't skip it in that case. The issue here is that the initrd is somehow not XZ-compressed. Cheers, Fabian Vogt ---------------------------------------------------------------------- Fabian Vogt SLE Core Team http://www.suse.de/ Maxfeldstr. 5 SUSE Linux GmbH, D-90409 Nuernberg, Germany, HRB 21284 (AG Nürnberg) GF: Felix Imendörffer, Jane Smithard, Graham Norton -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Am Dienstag, 2. Februar 2016, 16:18:04 CET schrieb Jan Engelhardt:
The earlycpio image contains CPU firmware updates, and since not all CPUs support that, not all systems have an early cpio image that can be skipped.
Is there any reason it cannot be part of initrd? As far as I understand, all individual parts are simply extracted by kernel onto initramfs anyway ... -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tuesday 2016-02-02 18:53, Andrei Borzenkov wrote:
Am Dienstag, 2. Februar 2016, 16:18:04 CET schrieb Jan Engelhardt:
The earlycpio image contains CPU firmware updates, and since not all CPUs support that, not all systems have an early cpio image that can be skipped.
Is there any reason it cannot be part of initrd? As far as I understand, all individual parts are simply extracted by kernel onto initramfs anyway ...
"""Kernel can update microcode in early phase of boot time. Loading microcode early can fix CPU issues before they are observed during kernel boot time. [...] During BSP boot (before SMP starts), if the kernel finds the microcode file in the initrd file, it parses the microcode and saves matching microcode in memory. If matching microcode is found, it will be uploaded in BSP and later on in all APs.[auxiliary processors]""" -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tue, Feb 2, 2016 at 9:15 PM, Jan Engelhardt
On Tuesday 2016-02-02 18:53, Andrei Borzenkov wrote:
Am Dienstag, 2. Februar 2016, 16:18:04 CET schrieb Jan Engelhardt:
The earlycpio image contains CPU firmware updates, and since not all CPUs support that, not all systems have an early cpio image that can be skipped.
Is there any reason it cannot be part of initrd? As far as I understand, all individual parts are simply extracted by kernel onto initramfs anyway ...
"""Kernel can update microcode in early phase of boot time. Loading microcode early can fix CPU issues before they are observed during kernel boot time. [...] During BSP boot (before SMP starts), if the kernel finds the microcode file in the initrd file,
So why it cannot be in initrd file? May be I was not clear. Distinction between "early cpio" and "initrd" is significant when "initrd" is not itself initramfs image. But dracut does create initramfs image which is unpacked into initramfs. There is no difference from "early cpio" - both are unpacked in one pass. So I still miss explanation why it must be separate archive except for legacy reasons.
it parses the microcode and saves matching microcode in memory. If matching microcode is found, it will be uploaded in BSP and later on in all APs.[auxiliary processors]""" -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Tue, Feb 2, 2016 at 2:53 PM, Andrei Borzenkov
Is there any reason it cannot be part of initrd? As far as I understand, all individual parts are simply extracted by kernel onto initramfs anyway ...
Then it is too late .. it has to be done very early..before the OS starts.usually it is done by the BIOS but people do not update that often.. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (7)
-
Andrei Borzenkov
-
Bernhard M. Wiedemann
-
Cristian Rodríguez
-
Fabian Vogt
-
Jan Engelhardt
-
opensuse.lietuviu.kalba
-
Roger Whittaker