Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: neonix on December 04, 2009, 06:10:15 AM

Title: bzImage and tinycore.gz in one file?
Post by: neonix on December 04, 2009, 06:10:15 AM
I noticed that xPUD Linux distribution use only one file while booting. I am using gPXE to boot my remastered Tinycore and I assume that it could speed up booting time for about 1 second, :) if I will use only 1 file. Is it possible to create something like this without difficult kernel compilation?
Title: Re: bzImage and tinycore.gz in one file?
Post by: Iguleder on December 04, 2009, 01:24:53 PM
I think it's impossible. It's an option in the kernel configuration.  :P

It's not that hard to do that, anyway, just get the sources and gunzip the initramfs. Then configure it with the path and compile.
Title: Re: bzImage and tinycore.gz in one file?
Post by: roberts on December 04, 2009, 01:28:55 PM
Very true. Fine if you are a turnkey desktop, not so much when you are dynamic like Tiny Core and therefore desire easy remastering.
Title: Re: bzImage and tinycore.gz in one file?
Post by: ^thehatsrule^ on December 11, 2009, 07:22:07 PM
I know of bootloaders that support combining both images to a bootloader-specific wrapped file... maybe there's an option for that in your setup.
Title: Re: bzImage and tinycore.gz in one file?
Post by: neonix on January 01, 2010, 09:29:47 AM
If someone wants to create kernel and initramfs in one file, here is solution.

1. You have to unpack tinycore.gz (for example) to /tmp/a directory
zcat /tmp/tinycore.gz | sudo cpio -i -H newc -d

2. Go to directory
cd /tmp/a

3. Create uncompressed cpio file.
find | sudo cpio -o -H newc > ../tinycore.cpio

4. Add directory to your cpio file in .config
CONFIG_INITRAMFS_SOURCE="/tmp/tinycore.cpio"

5. Simply, compile kernel using make bzImage command.
Title: Re: bzImage and tinycore.gz in one file?
Post by: curaga on January 01, 2010, 10:05:39 AM
Why the extra trouble? Just "gunzip /tmp/tinycore.gz" will create an uncompressed cpio archive.
Title: Re: bzImage and tinycore.gz in one file?
Post by: ^thehatsrule^ on January 02, 2010, 04:32:01 PM
Keep in mind that that still requires kernel compilation (thought the goal was not to have one) whereas a bootloader wrapper method is typically simpler/quicker.