Vince Greg wrote:
Thank you for all information:
If I choice to make the live cd from a build lfs it's because I compile with
optimization in order to have a light system, and I need some specific
applications.
The official LFS LiveCD is compiled with the following CFLAGS: -Os -s
-fno-strict-aliasing
You said it's a bad idea to begin from an lfs built but how the lfs_livecd
was build?
You never want to create LFS-only LiveCD, because LFS is just too
limited. You obviously want to add some software from BLFS, e.g.,
dhcpcd. LFS LiveCD was built from slightly modified LFS plus selected
BLFS and beyond-BLFS packages. You should really try to build it and to
read the buildscripts before asking.
I think created lfs as generic as possible (generic screen 800*600, ...) and
allow user to install specific drivers and save configuration file an a usb
key.
"generic screen 800x600" will not work well with NEC 20WGX2 monitor. It
needs 1680x1050, otherwise it nags the user with the "resolution not
optimal" box every 3 minutes (and the image is distorted because of the
wrong aspect ratio). So the correct approach, instead of going to the
lowest common denominator, is to detect what is detectable, and to ask
user about the rest. If the application wants too much configuration,
remove it.
But I had an other idea too make a live_usb?
Live USB is also doable. It just need a modified initramfs to find itself.
Since you keep asking about initramfs over and over, you should really
try it outside of the LiveCD context. The procedure is very easy.
Make a directory, say, /root/initramfs. I'll refer to this as $BASE
below (i.e, "export BASE=/root/initramfs"). Then execute the following
commands:
mkdir $BASE/{bin,dev,etc,lib,proc}
cp -av /dev/hd* /dev/sd* /dev/sr* /dev/null /dev/console $BASE/dev
cp -av /bin/bash /bin/sh /bin/mount /bin/umount /bin/ls /bin/dd
/usr/sbin/chroot $BASE/bin
ln -s /bin/bash $BASE/init
ldd /bin/*
Then copy all libraries that appear in the output to $BASE/lib
Test all programs in $BASE/bin by doing commands simialr to the following:
chroot $BASE /bin/bash --help
Once you have copied enough libraries to $BASE/lib that you no longer
get "file not found" errors, create the initramfs:
cd $BASE
find . | cpio -o -H newc | gzip -9 > ../initramfs_data.cpio.gz
Compile a new kernel with initrd/initramfs support. Make a new entry in
your boot loader configuration that loads your new kernel, and the
initramfs_data.cpio.gz file as an initrd image. Boot this new entry,
play with your initramfs.
Then, make /init a shell script instead of a link to /bin/bash. From
that script, print out labels of all CDs that are inserted. Post that
script to the list.
Once that's done (but not before that), I will answer your further
questions.
--
Alexander E. Patrakov
--
http://linuxfromscratch.org/mailman/listinfo/livecd
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page