WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: bzImage and tinycore.gz in one file?  (Read 3025 times)

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 377
bzImage and tinycore.gz in one file?
« 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?

Offline Iguleder

  • Newbie
  • *
  • Posts: 12
Re: bzImage and tinycore.gz in one file?
« Reply #1 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.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: bzImage and tinycore.gz in one file?
« Reply #2 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.
10+ Years Contributing to Linux Open Source Projects.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: bzImage and tinycore.gz in one file?
« Reply #3 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.

Offline neonix

  • Wiki Author
  • Sr. Member
  • *****
  • Posts: 377
Re: bzImage and tinycore.gz in one file?
« Reply #4 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.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: bzImage and tinycore.gz in one file?
« Reply #5 on: January 01, 2010, 10:05:39 AM »
Why the extra trouble? Just "gunzip /tmp/tinycore.gz" will create an uncompressed cpio archive.
The only barriers that can stop you are the ones you create yourself.

Offline ^thehatsrule^

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 1726
Re: bzImage and tinycore.gz in one file?
« Reply #6 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.