Ubuntu local loopback device missing [SOLVED]

Jens Dreger jens.dreger at physik.fu-berlin.de
Fri Jun 22 15:37:28 CEST 2007


On Fri, Jun 22, 2007 at 02:25:52PM +0100, Henning Sprang wrote:
> Mario Fetka wrote:
> >my solution was remove the need for an extra var partition and put 
> >averything to / (modifie relevant disk_config)
> 
> This is no solution, but a workaround :)
> 
> I could not find the other thread where this is talked about.
> What solved it for me is add a script containing this to the Ubuntu class:
> 
> $ROOTCMD umount /var
> $ROOTCMD mkdir /var/run
> $ROOTCMD mount /var
> 
> I remember there is some strange comment in one of ubuntu's init scripts 
> that even says, that someone must create this directory, because they 
> use tmpfs for var run, but nobody actually does - it's somewhere in the 
> installer where this happens - and for me, also an upgrade from breezy 
> to dapper failed horribly, or gave me bad resulkts because of this.

We don't install Ubuntu with FAI anymore, but when we did, I fixed this
using a hook for class UBUNTU (instsoft.UBUNTU):

# fix for /var/{run,lock} not being there at initrd-time
if cut -f2 -d' ' /proc/mounts  | grep -q ^$target/var$; then
    [ "$verbose" ] && echo "DEBUG: creating /var/{run,lock} on / (\$FAI${0##$FAI})"
    _varmoved=$(mktemp -d $target/var.XXXXXX)
    mount --move $target/var $_varmoved
    mkdir -p $target/var/run $target/var/lock
    mount --move $_varmoved $target/var
    unset _varmoved
fi

Regards,

Jens.

-- 
Jens Dreger                      Freie Universitaet Berlin
dreger at physik.fu-berlin.de       Fachbereich Physik - ZEDV
Tel: +49 30 83854774             Arnimallee 14
Fax: +49 30 83855902	         14195 Berlin



More information about the linux-fai mailing list