WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Xlibs in initrd?  (Read 2237 times)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Xlibs in initrd?
« on: September 04, 2014, 05:34:25 PM »
From a newbie point of view (rather):
So, just recently, for some reason, I extractrd an initrd from ubuntu and had a blind look at what's there. It contains some X related libs / apps. I was thinking, when I use Tiny Core, and not just Core, I could add some TCZs to the initrd to reduce boot time, right?

What shouldn't be included and what can be included without messing things up?
Download a copy and keep it handy: Core book ;)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Xlibs in initrd?
« Reply #1 on: September 04, 2014, 11:07:11 PM »
Just adding the content of tcz to initrd one issue is the startup script which is not executed by the system automatically, you must care it. Other issue is loosing update.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Xlibs in initrd?
« Reply #2 on: September 05, 2014, 01:15:47 AM »
It may or may not reduce boot time, depending on many factors. A bigger initrd:
- will take longer to read from disk, and bootloaders generally read at much slower speeds than Linux can (direct BIOS calls)
- everything in it will need to be decompressed, while mounting extensions will only decompress a small part, the index in squashfs
- no symlinking or copying, yes, which speeds that part up

It depends on your media, cpu and bootloader on whether the slower initial read + slower decompression add more than saving the symlinking/copying would remove.

Quote
What shouldn't be included and what can be included without messing things up?

Everything can be included if you're careful, read what the startup scripts do, and take appropriate action ;)
The only barriers that can stop you are the ones you create yourself.

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Xlibs in initrd?
« Reply #3 on: September 05, 2014, 03:31:00 AM »
Thanks you two.
I'll just try then and see how it goes.
Download a copy and keep it handy: Core book ;)

Offline Misalf

  • Hero Member
  • *****
  • Posts: 1702
Re: Xlibs in initrd?
« Reply #4 on: September 05, 2014, 08:34:31 AM »
I created a X-3d.gz. ~30 MB . I notice a delay of about 2 seconds before TC starts booting.
But in the end, the complete boot takes at least 5 seconds less than before. Yay.

However, mouse and keyboard input doesn't work. I need to Alt+SysReq+B to reboot. Yikes.
Could this be caused by wrong file permissions?

I have created  /etc/sysconfig/Xserver  containing the word  Xorg  as the start script of  xorg-server.tcz  would do.
/etc is root:root
/etc/sysconfig is root:staff
/etc/sysconfig/Xserver is root:root

It did work when I forgot to add  xorg-server.tcz  into the initrd and manually loaded it but it didn't load any additional deps so I think the initrd has it all.

« Last Edit: September 05, 2014, 08:36:21 AM by Misalf »
Download a copy and keep it handy: Core book ;)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10957
Re: Xlibs in initrd?
« Reply #5 on: September 05, 2014, 11:29:50 AM »
Try to SSH in and check Xorg logs.
The only barriers that can stop you are the ones you create yourself.