Speeding up live cd boot through optimizing file layout

Jun Kobayashi fm4j-kbys at asahi-net.or.jp
Thu Jul 13 14:47:08 BST 2006


Hello,

Krzysztof Lichota wrote:
> I have taken a shot at optimizing boot speed of Kubuntu live CD by
> changing layout of files on CD (no changes to live CD contents).

I found 2 candidates of improvement for optimizing boot speed of live CD.

1. Adding files used in initrd.gz to rootfs.sort

With Krzysztof's instruction, the '/dev/.squash.log' dosen't include 
files used by scripts on initrd.gz. For instance, configuration 
scripts for xserver-xorg (e.g. /var/lib/dpkg/info/xserver-xorg.config) 
are kicked during boot up, but /dev/.squash.log dosen't include them.
These files found in '/dev/.static/dev/.squash.log'.
I merged these two .squash.log, generate my rootfs.sort, and make 
filesystem.squashfs with this sort file. This boots up 9 seconds faster 
with my PC.

2. Changing priority value in rootfs.sort

According to the manual and changelog of squashfs, highest priority files 
are now placed at the start of the filesystem and default priority is 0.
With Krzysztof's sort-files-by-first-access.py, priority value start with
10000 and going down. I think this makes files place at the start of the 
squashfs filesystem. So I changed priority values to -1, -2, -3 ... to 
place files at end of squashfs.
This comes good in my case - boots up 7 seconds faster.

I'll happy if Krzysztof and others verify these improvements.

Regards,
Jun Kobayashi



More information about the ubuntu-devel mailing list