Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

can the initramfs image be compressed by a method other than gzip, such as lzma?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Yes. I use in-kernel initrd and it offers at least the following methods:

  • None (as it is compressed with kernel)
  • GZip
  • BZip
  • LZMA (possibly zen-only)

EDIT: You can use it on external file and with LZMA (at least on ubuntu).

EDIT 2: Wikipedia states that Linux kernel supports gzip, bzip and lzma (depending, of course, what algorithms are compiled in).

share|improve this answer
    
does it must be "in-kernel" initrd (and what do you actually means by in-kernel) ? what if I have external file of initrd? –  uray Sep 18 '10 at 22:00
    
I would be very surprised if it used different files. As in what it actually means - you can build-in initrd in kernel just as you can build-in modules. I have / on LVM so I need to have initrd script - and the easiest way for me is to build it into kernel. –  Maciej Piechotka Sep 18 '10 at 22:04
    
sorry but the 'initrd' in this question is actually an initramfs file or a filesystem that initially loaded by kernel, or the file which usually pointed by grub like this initrd /boot/initramfs-2.6.33.3-85.fc13.i686.img, maybe I used wrong term (I edited the question)? –  uray Sep 18 '10 at 23:04
    
As I stated in edit - yes at least in Ubuntu. I'd be very surprised if it hadn't work. You haven't used the wrong term but I said what 1) I have experience with 2) what I found (that Ubuntu do support it) 3) what I expect. Anyway - why not just try it. –  Maciej Piechotka Sep 19 '10 at 0:29
    
ok I tried it, it confirmed the kernel can load initramfs with lzma compression, I must compile the kernel using CONFIG_RD_LZMA=y. but it will KP if the compression parameter is other than default, for example if i try lzma -e -9 -z for initramfs image it will leads to KP. –  uray Sep 19 '10 at 6:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.