On Wed, Jun 01, 2016 at 08:37:33PM -0300, Jamenson Ferreira Espindula de Almeida Melo wrote: > > Hi everyone. > > I wish to build a LiveCD from a fresh Linux From Scratch (LFS) 7.9 > installation. Several considerations leads to that decision, like > having a rescue disk updated.
I have no recent experience of building Live CDs, and the experience I had was on ppc (that damned AmigaOne) using a prepared uclibc rootfs. But, a few comments - > > I had an idea: produce a file to hold the root filesystem: > > dd if=/dev/zero of=root.ext4 bs=1G count=10 > This is 10GB ? On a CD ? > Create the root filesystem in that file: > > /sbin/mke2fs -v -t ext4 root.ext4 > > Mount the root filesystem: > > su -c 'mount -v -o loop root.ext4 /home/jamenson/lfslivecd/root/' > > Go on with the LFS 7.9 build, following book instructions. The book assumes /mnt/lfs. Using a different mountpoint might cause problems. Also, why would you want to mount it at /root within lfslivecd ? > > What do you think about this method? Am I on the right way? If not, what > should the correct method? Do you recommend any site or documentation > about LiveCD building (I do not want to build the LiveCD with that > automatic tools. I want to do everything manually)? Is there detailed > documentation about the official LFS LiveCD building? > Is this 'CD' (inverted commas because it is 10GB big if I followed correctly) only for rescue, i.e. you have a separate pre-installed LFS which you wish to chroot ? Also, ISTR you might require _some_ writable filesystem space , even if the content gets destroyed when you shutdown. Putting that in a tmpfs is probably fine, but that depends in part on how much real memory the machine has. If you wish to explore building bootable CDs/DVDs/USB-sticks that's fine and I hope you find the process fun and/or interesting. But for many of us, building / updating our systems is enough work - so I now use systemrescuecd: it uses systemd-style ethernet names (instead of eth0) and for me it reports a failure to start networkmanager - those initially made me believe I had no ethernet (bad : that is where my backups live) but in fact it had come up fine. On that flavour of rescue CD, zsh is the shell so the chroot command in the book does not work - from memory, SHELL=/bin/bash in front of the chroot command fixes that. I will note that what is in the book for a rescue CD works (I tried it just before 7.9), but it stopped working once I had installed a distro on another partition for testing (and I let that overwrite the bootloader, in fact I did not get the option to do otherwise). So, it is only effective in a limited situation and therefore something else *is* required in some circumstances. Whatever you do, enjoy the learning, and I hope it works out well. And if it really is a CD, I hope you don't waste too many while experimenting (rewritable CDs might be a good idea). Final thought: once you understand how the build works, doing it all manually sounds like a bad idea (unless you only ever intend to do it once). But scripting it implies that you need to understand *how* your own buildscripts can fail - welcome to the "hmm, this used to work" club ;-) ĸen -- I had to walk fifteen miles to school, barefoot in the snow. Uphill both ways. -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
