The problem is that I AM moving the mounts. I am moving the mounts
into the tmpfs union. To help the cause, I will post the init script
here, in its entirety. Note: this is script works perfectly with
aufs-base1, but does not with aufs-base3 (I did not try base2, do you
want me to try base2??):

mount -t proc proc /proc
mount -t sysfs sysfs /sys

echo 0 > /proc/sys/kernel/printk
mdev -s

. /liblinuxlive
header "starting Linux Live scripts <http://www.linux-live.org/>"

DEVICEMOUNT=$(device_mountdir $DEVICE)
mkdir -p $DEVICEMOUNT
mount $DEVICE $DEVICEMOUNT || fatal "could not mount device $DEVICE!"

DATA="$DEVICEMOUNT/$LIVECDNAME"
if [ ! -d "$DATA" ]; then fatal "$LIVECDNAME does not exist in
$DEVICEMOUNT!"; fi

echolog "using $LIVECDNAME data from $DATA"

mkdir -p $UNION
mkdir -p $MEMORY

mount -t tmpfs -o "size=$RAMSIZE" tmpfs $MEMORY

# $UNION will be used as a root directory, livecd modules will be added soon
echolog "setup union directory (using aufs)"
mkdir -p $CHANGES
mkdir -p $IMAGES

mount -t aufs -o nowarn_perm,noplink,udba=none,br:$CHANGES=rw aufs
$UNION || fatal "can't setup union (aufs)"

union_insert_modules $UNION $DATA $IMAGES

mkdir -p "$UNION/$INITRAMDISK/$MEMORY"
mount --move $MEMORY "$UNION/$INITRAMDISK/$MEMORY"

mkdir -p "$UNION/$INITRAMDISK/$DATA"
mount --move $DEVICEMOUNT "$UNION/$INITRAMDISK/$DEVICEMOUNT"

umount /sys
umount /proc

echolog "changing root directory..."
cd $UNION

cp -fdR /dev . 2>/dev/null

if [ -x bin/init ]; then INIT=bin/init; fi
if [ -x sbin/init ]; then INIT=sbin/init; fi
if [ "$INIT" = "" ]; then fatal "Can't find executable init command"; fi

# time to end Linux Live scripts and start the distribution itself,
# using /sbin/init or whatever was found.
header "linux live end, starting the Linux distribution"

debug_shell

mount -n -o remount,ro aufs .

exec switch_root . $INIT

#script end

On Mon, Feb 9, 2009 at 4:09 PM,  <sf...@users.sourceforge.net> wrote:
>
> "James .":
>> The patch works in that it allows me to mount aufs again, however, it
>> leaves the union in a very unstable state. I am unable to take any
>> logs or even log in because after entering the union, many programs
>> will segfault, and my machine cannot run anymore. Again, switching
>> back to aufs-base1 solves the problem. I am certain that theres more
>> to this bug than just allowing aufs to mount tmpfs...
>
> Thank you for your tests.
> I am afraid that is due to the fact you are using initramfs instead of
> initrd. Because aufs2 has passed all of my tests as well as aufs1.
> As I wrote before, initramfs will be freed after the last command in the
> init script. In order to prevent the necessary resources from being
> freed, you need to MOVE the mount points which are related to the new
> root (your aufs).
> The SLAX init script is for initrd, I guess. But you are using initramfs
> actually. So I am afraid you freed some necessary resources.
>
> Try moving mount points as $AufsCVS/sample/diskless does or convert your
> initramfs into initrd.
>
>
> J. R. Okajima
>

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com

Reply via email to