Using LiveCD boot to build a new LiveCD...
zmerch at 30below.com
Thu Aug 11 12:10:31 PDT 2005
Rumor has it that Jeremy Huntwork may have mentioned these words:
>On Thu, Aug 11, 2005 at 01:39:44PM -0400, Roger Merchberger wrote:
> > Has anyone actually ever done this?
>Building the LiveCD on the LiveCD? No... but I've built several LFS
>systems from it and the livecd scripts don't do anything that bizarre that
>you should have so much trouble.
>Here's what you should be doing:
>mount /dev/[hdwhatever] /mnt/lfs
>svn co svn://linuxfromscratch.org/livecd/x86/tags/6.1-2 lfs-livecd
>It should go smoothly from there.
It doesn't... but here's why...
>the CD has a /sources directory you'll either need to rm it or change
>/sources in the Makefile to something else along with your
>/mnt/lfs/sources directory. That should be the extent of your troubles.
That's it. For some reason, I thought it was going to /tmp first... it was
going to /sources, which is still on the unionfs-based root filesystem. /
was getting filled (as there's not a lot of space available (relatively) on
the / filesystem).
> > 0.5) On the LiveCD, only /mnt exists - not /mnt/lfs, so before one can
> > mount a drive to /mnt/lfs, one must mkdir /mnt/lfs. Certainly not a big
> > bug, but it could be confusing to some. Should I bugzilla that?
>I don't think so. That was intentional. A system is not expected normally
>to have a /mnt/lfs directory, and if following the book *exactly* the
>command to create that directory would fail. Don't want to confuse the
>newbies too much. ;)
OK, that makes sense.
> > 1) The virtual drive I was mounting was used to build LFS, the symbolic
> > link from /tools to /mnt/lfs/tools still existed. The problem was, the
> > drive was mounted on /mnt/lfs... so the symbolic link pointed to itself,
> > and it was giving me a 'link too deep' error... which would subsequently
> > b0rk unionfs (for some reason) and I would need to reset the virtual
> > machine.
>Hrm? This doesn't make sense to me.
Here's the scenario: Originally, /dev/hda1 was used to make an LFS build,
and there was a symbolic link from /tools -> /mnt/lfs/tools. This link was
Once I booted to the LFS LiveCD, I then mounted /dev/hda1 to /mnt/lfs. This
symbolic link was still there, but now (technically) the link looked like
this: /mnt/lfs/tools -> /mnt/lfs/tools.
Needless to say, trying to cd /mnt/lfs/tools, which was a symbolic link
pointing to itself, confused the filesystem immensely. Once I deleted the
link, all was good there.
> > 2) The /tmp directory is still mapped to unionfs... and (I'm guessing)
> > fills / when you run 'make' as I belive the downloads are held in /tmp...
>Sorry what? The last two points just don't sound right.
That's because they weren't. After starting the build, the root filesystem
was filling (rather quickly, too!) I incorrectly thought that the files
were downloaded to /tmp (which was on the unionfs root filesystem) but
instead they were being downloaded to /sources (which was also on the
unionfs root filesystem). Once I issued a rm /sources and then it could be
linked it to /mnt/lfs/sources, all is good. It's building now.
>Just try doing it as I've outlined above. Let me know if you have any
>troubles with that.
All seems to be progressing well now. It'll prolly go all nite, so I'll
check on 'er tomorrow and see ho it goes... ;-)
Roger "Merch" Merchberger
Roger "Merch" Merchberger -- SysAdmin, Iceberg Computers
zmerch at 30below.com
Hi! I am a .signature virus. Copy me into your .signature to join in!
More information about the livecd