[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grub-mkimage ignores compression option
From: |
Daniel Kiper |
Subject: |
Re: grub-mkimage ignores compression option |
Date: |
Wed, 6 Jul 2022 14:59:46 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Wed, Jun 15, 2022 at 11:25:55AM +0200, Vladimir 'phcoder' Serbinenko wrote:
> Documentation states that it works only on some platforms. Currently only on
> MIPS. i386-pc always uses lzma
>
> Le mer. 15 juin 2022, 00:39, Eugene Bright via Grub-devel <grub-devel@gnu.org>
> a écrit :
> Option --compression doesn't affect the core image size.
> Does it work at all?
>
> Running it without compression `none`
> > # grub-mkimage -v -O i386-pc -p /boot btrfs -C none | wc -c
> > grub-mkimage: info: the total module size is 0x1a380.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/kernel.img.
> > grub-mkimage: info: locating the section .text at 0x0.
> > grub-mkimage: info: locating the section .rodata at 0x5d14.
> > grub-mkimage: info: locating the section .data at 0x6f40.
> > grub-mkimage: info: locating the section .module_license at
> 0x77c0.
> > grub-mkimage: info: locating the section .bss at 0x77e0.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/crypto.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/gcry_crc.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/gzio.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/diskfilter.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/raid6rec.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/lzopio.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/zstd.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/btrfs.mod.
> > grub-mkimage: info: kernel_img=0x7f5fb6bc1010, kernel_size=0x77cf.
> > grub-mkimage: info: the core size is 0x10092.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/
> lzma_decompress.img.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/diskboot.img.
> > grub-mkimage: info: writing 0x200 bytes.
> > grub-mkimage: info: writing 0x10ba2 bytes.
> > grub-mkimage: error: cannot sync `stdout': Invalid argument.
> > 69026
>
> Running it without compression `xz`
> > # grub-mkimage -v -O i386-pc -p /boot btrfs -C xz | wc -c
> > grub-mkimage: info: the total module size is 0x1a380.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/kernel.img.
> > grub-mkimage: info: locating the section .text at 0x0.
> > grub-mkimage: info: locating the section .rodata at 0x5d14.
> > grub-mkimage: info: locating the section .data at 0x6f40.
> > grub-mkimage: info: locating the section .module_license at
> 0x77c0.
> > grub-mkimage: info: locating the section .bss at 0x77e0.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/crypto.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/gcry_crc.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/gzio.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/diskfilter.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/raid6rec.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/lzopio.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/zstd.mod.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/btrfs.mod.
> > grub-mkimage: info: kernel_img=0x7f42a5b1d010, kernel_size=0x77cf.
> > grub-mkimage: info: the core size is 0x10092.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/
> lzma_decompress.img.
> > grub-mkimage: info: reading /usr/lib/grub/i386-pc/diskboot.img.
> > grub-mkimage: info: writing 0x200 bytes.
> > grub-mkimage: info: writing 0x10ba2 bytes.
> > grub-mkimage: error: cannot sync `stdout': Invalid argument.
> > 69026
>
> Is it a problem or am I missing something?
>
> Compression could alleviate `core.img is unusually large. It
> won't fit in the embedding area.` issue.
>
> https://lists.gnu.org/archive/html/grub-devel/2019-11/msg00057.html
I want to add we no longer support small MBR gaps. More you can find here [1].
However, if you use Btrfs then this patch should help [2].
Daniel
[1] https://www.gnu.org/software/grub/manual/grub/grub.html#BIOS-installation
[2]
http://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b0f06a81c6f31b6fa20be67a96b6683bba8210c9
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: grub-mkimage ignores compression option,
Daniel Kiper <=