Re: [CentOS] How to update modules in iniramfs fastly
> -Original Messages- > From: "Leon Fauster" <leonfaus...@googlemail.com> > Sent Time: 2018-02-26 22:20:51 (Monday) > To: "CentOS mailing list" <centos@centos.org> > Cc: > Subject: Re: [CentOS] How to update modules in iniramfs fastly > > > > Am 26.02.2018 um 06:46 schrieb wuzhouhui <wuzhouhu...@mails.ucas.ac.cn>: > > > >> -Original Messages- > >> From: "Steven Tardy" <sjt5a...@gmail.com> > >> Sent Time: 2018-02-26 10:48:48 (Monday) > >> To: "CentOS mailing list" <centos@centos.org> > >> Cc: > >> Subject: Re: [CentOS] How to update modules in iniramfs fastly > >> > >> On Sun, Feb 25, 2018 at 8:29 PM wuzhouhui <wuzhouhu...@mails.ucas.ac.cn> > >> wrote: > >> > >>> I know dracut can update modules in initramfs, but I think it is too > >>> slow. So I'm wondering what is the fastest way to update modules in > >>> initramfs of CentOS 7? > >> > >> > >> `dracut` calls `mkinitrd` which rebuilds the initrd file. . . you could do > >> it manually but that is prone to errors ( > >> https://access.redhat.com/solutions/24029). > > This solution does not work in CentOS 7, because initramfs in CentOS 7 is > > not > > a gzipped cpio: > > [root@bogon a]# file /boot/initramfs-3.10.0-693.el7.x86_64.img > > /boot/initramfs-3.10.0-693.el7.x86_64.img: ASCII cpio archive (SVR4 with > > no CRC) > > If I use > > zcat /boot/initrd-2.6.18-164.6.1.el5.img | cpio -idmv > > to uncompress initramfs, it will report errors: > > [root@bogon a]# zcat /boot/initramfs-3.10.0-693.el7.x86_64.img | cpio > > -idmv > > > > gzip: /boot/initramfs-3.10.0-693.el7.x86_64.img: not in gzip format > > cpio: premature end of archive > > > > Maybe some ucode archive is in front of the initrd archive. > > Did you try to unpack it without uncompressing it? Whats the contents? [root@bogon a]# cpio -id < /boot/initramfs-3.10.0-693.el7.x86_64.img 28 blocks [root@bogon a]# ls -R .: early_cpio kernel ./kernel: x86 ./kernel/x86: microcode ./kernel/x86/microcode: GenuineIntel.bin Obviously, above is not what I want. In order to get full contents of initramfs, I have to use skipcpio to skip initial cpio of initramfs: [root@bogon a]# /usr/lib/dracut/skipcpio /boot/initramfs-3.10.0-693.el7.x86_64.img | zcat | cpio -id 85469 blocks [root@bogon a]# ls bin etc libproc run shutdown sysroot usr dev init lib64 root sbin sys tmp var I can use skipcpio to get full contents of initramfs, and then edit files in it. But the problem is how to recreate initramfs by extracted contents? > > -- > LF > > > > > > > > ___ > CentOS mailing list > CentOS@centos.org > https://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] How to update modules in iniramfs fastly
> Am 26.02.2018 um 06:46 schrieb wuzhouhui <wuzhouhu...@mails.ucas.ac.cn>: > >> -Original Messages- >> From: "Steven Tardy" <sjt5a...@gmail.com> >> Sent Time: 2018-02-26 10:48:48 (Monday) >> To: "CentOS mailing list" <centos@centos.org> >> Cc: >> Subject: Re: [CentOS] How to update modules in iniramfs fastly >> >> On Sun, Feb 25, 2018 at 8:29 PM wuzhouhui <wuzhouhu...@mails.ucas.ac.cn> >> wrote: >> >>> I know dracut can update modules in initramfs, but I think it is too >>> slow. So I'm wondering what is the fastest way to update modules in >>> initramfs of CentOS 7? >> >> >> `dracut` calls `mkinitrd` which rebuilds the initrd file. . . you could do >> it manually but that is prone to errors ( >> https://access.redhat.com/solutions/24029). > This solution does not work in CentOS 7, because initramfs in CentOS 7 is not > a gzipped cpio: > [root@bogon a]# file /boot/initramfs-3.10.0-693.el7.x86_64.img > /boot/initramfs-3.10.0-693.el7.x86_64.img: ASCII cpio archive (SVR4 with no > CRC) > If I use > zcat /boot/initrd-2.6.18-164.6.1.el5.img | cpio -idmv > to uncompress initramfs, it will report errors: > [root@bogon a]# zcat /boot/initramfs-3.10.0-693.el7.x86_64.img | cpio -idmv > > gzip: /boot/initramfs-3.10.0-693.el7.x86_64.img: not in gzip format > cpio: premature end of archive Maybe some ucode archive is in front of the initrd archive. Did you try to unpack it without uncompressing it? Whats the contents? -- LF ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] How to update modules in iniramfs fastly
So, in the end, we can't recreate initramfs of CentOS 7 manually just like https://access.redhat.com/solutions/24029 did in CentOS 6? > -Original Messages- > From: "Robert P. J. Day" <rpj...@crashcourse.ca> > Sent Time: 2018-02-26 14:05:24 (Monday) > To: "CentOS mailing list" <centos@centos.org> > Cc: > Subject: Re: [CentOS] How to update modules in iniramfs fastly > > On Mon, 26 Feb 2018, wuzhouhui wrote: > > > > -Original Messages- > > > From: "Steven Tardy" <sjt5a...@gmail.com> > > > Sent Time: 2018-02-26 10:48:48 (Monday) > > > To: "CentOS mailing list" <centos@centos.org> > > > Cc: > > > Subject: Re: [CentOS] How to update modules in iniramfs fastly > > > > > > On Sun, Feb 25, 2018 at 8:29 PM wuzhouhui <wuzhouhu...@mails.ucas.ac.cn> > > > wrote: > > > > > > > I know dracut can update modules in initramfs, but I think it is too > > > > slow. So I'm wondering what is the fastest way to update modules in > > > > initramfs of CentOS 7? > > > > > > > > > `dracut` calls `mkinitrd` which rebuilds the initrd file. . . you could do > > > it manually but that is prone to errors ( > > > https://access.redhat.com/solutions/24029). > > i think you have that backwards ... mkinitrd is simply a wrapper > around a call to dracut, which builds an initramfs. > > > This solution does not work in CentOS 7, because initramfs in CentOS > > 7 is not a gzipped cpio: > > it is, but to get to the content, you need to use "skipcpio" to jump > over the initial tiny cpio archive. see, for example: > > https://sites.google.com/site/syscookbook/rhel/rhel-kernel-rebuild > > rday > ___ > CentOS mailing list > CentOS@centos.org > https://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] How to update modules in iniramfs fastly
On Mon, 26 Feb 2018, wuzhouhui wrote: > > -Original Messages- > > From: "Steven Tardy" <sjt5a...@gmail.com> > > Sent Time: 2018-02-26 10:48:48 (Monday) > > To: "CentOS mailing list" <centos@centos.org> > > Cc: > > Subject: Re: [CentOS] How to update modules in iniramfs fastly > > > > On Sun, Feb 25, 2018 at 8:29 PM wuzhouhui <wuzhouhu...@mails.ucas.ac.cn> > > wrote: > > > > > I know dracut can update modules in initramfs, but I think it is too > > > slow. So I'm wondering what is the fastest way to update modules in > > > initramfs of CentOS 7? > > > > > > `dracut` calls `mkinitrd` which rebuilds the initrd file. . . you could do > > it manually but that is prone to errors ( > > https://access.redhat.com/solutions/24029). i think you have that backwards ... mkinitrd is simply a wrapper around a call to dracut, which builds an initramfs. > This solution does not work in CentOS 7, because initramfs in CentOS > 7 is not a gzipped cpio: it is, but to get to the content, you need to use "skipcpio" to jump over the initial tiny cpio archive. see, for example: https://sites.google.com/site/syscookbook/rhel/rhel-kernel-rebuild rday ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] How to update modules in iniramfs fastly
> -Original Messages- > From: "Steven Tardy" <sjt5a...@gmail.com> > Sent Time: 2018-02-26 10:48:48 (Monday) > To: "CentOS mailing list" <centos@centos.org> > Cc: > Subject: Re: [CentOS] How to update modules in iniramfs fastly > > On Sun, Feb 25, 2018 at 8:29 PM wuzhouhui <wuzhouhu...@mails.ucas.ac.cn> > wrote: > > > I know dracut can update modules in initramfs, but I think it is too > > slow. So I'm wondering what is the fastest way to update modules in > > initramfs of CentOS 7? > > > `dracut` calls `mkinitrd` which rebuilds the initrd file. . . you could do > it manually but that is prone to errors ( > https://access.redhat.com/solutions/24029). This solution does not work in CentOS 7, because initramfs in CentOS 7 is not a gzipped cpio: [root@bogon a]# file /boot/initramfs-3.10.0-693.el7.x86_64.img /boot/initramfs-3.10.0-693.el7.x86_64.img: ASCII cpio archive (SVR4 with no CRC) If I use zcat /boot/initrd-2.6.18-164.6.1.el5.img | cpio -idmv to uncompress initramfs, it will report errors: [root@bogon a]# zcat /boot/initramfs-3.10.0-693.el7.x86_64.img | cpio -idmv gzip: /boot/initramfs-3.10.0-693.el7.x86_64.img: not in gzip format cpio: premature end of archive > ___ > CentOS mailing list > CentOS@centos.org > https://lists.centos.org/mailman/listinfo/centos ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
Re: [CentOS] How to update modules in iniramfs fastly
On Sun, Feb 25, 2018 at 8:29 PM wuzhouhuiwrote: > I know dracut can update modules in initramfs, but I think it is too > slow. So I'm wondering what is the fastest way to update modules in > initramfs of CentOS 7? `dracut` calls `mkinitrd` which rebuilds the initrd file. . . you could do it manually but that is prone to errors ( https://access.redhat.com/solutions/24029). ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos
[CentOS] How to update modules in iniramfs fastly
I know dracut can update modules in initramfs, but I think it is too slow. So I'm wondering what is the fastest way to update modules in initramfs of CentOS 7? Thanks! ___ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos