ich bastel gerade in einer virtuellen Maschine herum und komm nicht weiter. Folgendes Szenario:
Rechner bootet von CD auf der nur Kernel und Initrd sind. Root-LW soll die virtuelle Festplatte sein, die aber nur readonly gemountet ist. Auf einem Ordner der Festplatte soll ein tmpfs mit Schreibrechten gemountet werden, dann mit aufs (http://de.wikipedia.org/wiki/Aufs) das Root-FS und das schreibbare FS zusammengebracht werden. Danach soll ganz normal weiter gebootet werden mit aufs als Root-FS.
So schön simpel die Theorie, aber ich komm in der Praxis nicht weiter, das sind die letzten Ausgaben:
Code: Alles auswählen
[...] tmpfs on /write mounten
mount: mounting tmpfs on /write failed: No such file or directory
mount ro
Usage: /bin/mount [-r] [-w] [-o options] [-t type] [-f] [-i] [-n] device directory
[...]
create directory /read
mount: mounting /write/read on /root/read failed: No such file or directory
[...]
run-init: nuking initramfs contents: Directory not empty
Kernel panic - not syncing: Attempted to kill init!
Code: Alles auswählen
#!/bin/sh
PREREQ=""
prereqs()
{
echo "$PREREQ"
}
case $1 in
prereqs)
prereqs
exit 0
;;
esac
# . /usr/share/initramfs-tools/hook-functions
# Begin real processing below this line
export PATH=/bin:/sbin
CMDLINE=`cat /proc/cmdline`
echo "initrd wird gestartet!"
# / mounten
echo "AuFS-Modul einfügen"
/sbin/modprobe aufs
echo "tmpfs on /write mounten"
# Needs an existing directory "/write"
mount -t tmpfs -o size=32m tmpfs /write #> /dev/null 2>&1
union=/write/union
changes=/write/changes
read=/write/read
/bin/mkdir -p $changes $read $union
echo "mount ro"
/bin/mount -o ro ${ROOT} /write/read # -t ${FSTYPE}
echo "mount aufs darüber"
/bin/mount -t aufs -o dirs=$changes=rw:$read=ro none /write/union #${rootmnt} #$union #> /dev/null 2>&1
echo "create directory ${rootfs}/read"
mount /write/read -o move ${rootmnt}/read
Kann mal bitte jemand drübergucken und mir mitteilen, an was es haken könnte ?
Zusammengetragen hab ich das Skript übrigens aus Schnipseln hier aus dem Forum und Wiki.
Danke

Gruß
Tintom