public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] LiveCD fs root creation
@ 2007-11-19 12:06 lurker
  2007-11-24 15:35 ` Chris Gianelloni
  0 siblings, 1 reply; 2+ messages in thread
From: lurker @ 2007-11-19 12:06 UTC (permalink / raw
  To: gentoo-catalyst

Hi,

How/when/where is the LiveCD's filesystem root "created"? With this I'm
referring to the actual fs root ("/") when running the CD, not the root
found in the squashfs image that is created during build time. For some
reason, these are not the same. It appears that only some directories
from the image appears on the LiveCD root, where some symlinks not
present in the image root also get created.

In my case I need /media to have KDED media manager automounting through
HAL. I explicitly create /media in my fsscript and have verified that it
indeed is created (by mounting the image) but it still doesn't appear on
the LiveCD root. This is also the case for the Gentoo LiveCD's. The
obvious solution is to create /media in local.start at every LiveCD boot
up but I would nonetheless like to know the procedure of how the LiveCD
root is set up from the contents of the image and if and how I can
modify it.

Peace.

-- 
gentoo-catalyst@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [gentoo-catalyst] LiveCD fs root creation
  2007-11-19 12:06 [gentoo-catalyst] LiveCD fs root creation lurker
@ 2007-11-24 15:35 ` Chris Gianelloni
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Gianelloni @ 2007-11-24 15:35 UTC (permalink / raw
  To: gentoo-catalyst

[-- Attachment #1: Type: text/plain, Size: 2683 bytes --]

On Mon, 2007-11-19 at 13:06 +0100, lurker wrote:
> How/when/where is the LiveCD's filesystem root "created"? With this I'm
> referring to the actual fs root ("/") when running the CD, not the root
> found in the squashfs image that is created during build time. For some
> reason, these are not the same. It appears that only some directories
> from the image appears on the LiveCD root, where some symlinks not
> present in the image root also get created.

A typical squashfs-enabled LiveCD built with catalyst has 3 different
places that could be considered "root" on the CD at different times.
The first is the "outside" root, what you see when you mount the CD and
browse it.  The second is the intramfs "root" which houses the splash
themes, drivers, busybox, lvm/evms, etc. from genkernel.  The last, is
the tmpfs created at boot, which genkernel runs one of switch_root,
pivot_root, or chroot.  This tmpfs consists of certain directories from
within the squashfs image, like /etc and /tmp, so they're writable.  It
also symlinks certain other directories, like /usr.

> In my case I need /media to have KDED media manager automounting through
> HAL. I explicitly create /media in my fsscript and have verified that it
> indeed is created (by mounting the image) but it still doesn't appear on
> the LiveCD root. This is also the case for the Gentoo LiveCD's. The
> obvious solution is to create /media in local.start at every LiveCD boot
> up but I would nonetheless like to know the procedure of how the LiveCD
> root is set up from the contents of the image and if and how I can
> modify it.

You could modify it, but you would need to modify genkernel to do so.
There are two ways that I can think of to resolve this.  Using
local.start is one way of doing it, and how we have done some things in
the past.  We're trying to move away from that in the official media,
but it's still a viable solution.  The second is to use a feature of
genkernel that very few people know exists.  When booting a CD,
genkernel will search for ${NEW_ROOT}/mnt/cdrom/cdupdate.sh, which is
the "outside" root of the CD.  When genkernel finds this, it executes
it.  This is done in the "second" root above, the initramfs, immediately
prior to the chroot/pivot_root/switch_root.  Since it runs in busybox,
it needs to run in the minimal busybox shell correctly.  In your case,
it could simply say:

#!/bin/sh
mkdir -p ${NEW_ROOT}/media

Make sure the file is executable, or genkernel won't run it.

-- 
Chris Gianelloni
Release Engineering Strategic Lead
Alpha/AMD64/x86 Architecture Teams
Games Developer/Foundation Trustee
Gentoo Foundation

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-24 15:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-19 12:06 [gentoo-catalyst] LiveCD fs root creation lurker
2007-11-24 15:35 ` Chris Gianelloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox