Package: fai Version: 3.1.8 Severity: normal Tags: patch I've been asked on linux-fai-devel to file this as bug against FAI.
RAMRUM/RAMLOCK expect mount points /var/run and /var/lock to exist very early, i.e. before /var (if on a separate file system) gets mounted. So this fails if the root fs lacks mount points var/run and var/lock. Petter Reinholdtsen <[EMAIL PROTECTED]> commented on this as follows: To avoid this, some effort is taken to make sure the root file system include /var/run/ on the file system, to allow it to be mounted before /var/ is mounted, and then moved to the new /var/run/ when /var/ is mounted. An interesting question is why this is not the case for your machine. It should have been created when initscripts was installed or upgraded. So I've added an option to the disk configuration file to create such mount points (more generally, arbitrary directories). I already elaborated on the list on how this works. Patches included -- works for us. -- System Information: Debian Release: 4.0 Architecture: i386 (i686) Kernel: Linux 2.6.18-4-686 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages fai depends on: ii libapt-pkg-perl 0.1.20 Perl interface to libapt-pkg ii perl 5.8.8-7 Larry Wall's Practical Extraction -- no debconf information
Index: setup_harddisks/4240-mib/setup_harddisks =================================================================== --- setup_harddisks/4240-mib/setup_harddisks (.../4240-mib/setup_harddisks) (revision 337) +++ setup_harddisks/4240-mib/setup_harddisks (.../4240/setup_harddisks) (revision 334) @@ -1,6 +1,6 @@ #!/usr/bin/perl -# $Id: setup_harddisks 4240-mib $ +# $Id: setup_harddisks 4240 2007-03-07 13:50:11Z lange $ #********************************************************************* # # setup_harddisks -- create partitions and filesystems on harddisk @@ -141,9 +141,6 @@ # -h <hash> : set reiserfs hash # -v <ver> : set reiserfs version # -# mkdir=dir1,dir2,... -# : write entries to fstab.mkdir filee - use strict; # getopts variables: our ($opt_X, $opt_f, $opt_c, $opt_d); @@ -155,7 +152,7 @@ # Variables #**************************************************** -my $Version = "version 0.42fai-mib"; +my $Version = "version 0.42fai"; my $megabyte = 1024 * 1024; # guess # $gigabyte = 1024 * $megabyte; @@ -246,7 +243,6 @@ &PartitionPersfdisk; &FormatDisks; &WriteFSTab; -&WriteMkdir; &WriteFAIVariables; exit 0; #**************************************************** @@ -931,28 +927,6 @@ } #**************************************************** -# Optionally build mkdir file and write it to <root>/etc/fstab.mkdir -#**************************************************** -sub WriteMkdir{ - my ($MkdirTab, $filename); - foreach my $mountpoint (%PartMountpoint){ - if ($MPOptions{$mountpoint} =~ /\bmkdir=(\S+)/){ - $MkdirTab .= ($mountpoint . " " . join(' ',split(/[,;:]/,$1)) . "\n"); - } - } - return if !defined($MkdirTab); - # write it - $filename = "$ENV{LOGDIR}/fstab.mkdir"; -# print $MkdirTab; - print "Write mkdir file to $filename\n" if $verbose; - if($test != 1){ - open(FILE, ">$filename") || die "unable to write mkdir file $filename\n"; - print FILE $MkdirTab; - close(FILE); - } -} - -#**************************************************** # Build fstab line #**************************************************** sub BuildfstabLine{
Index: mount2dir/4230-mib/mount2dir =================================================================== --- mount2dir/4230-mib/mount2dir (.../4230-mib/mount2dir) (revision 337) +++ mount2dir/4230-mib/mount2dir (.../4230/mount2dir) (revision 334) @@ -1,6 +1,6 @@ #! /bin/bash -# $Id: mount2dir 4230-mib $ +# $Id: mount2dir 4230 2007-02-07 21:36:53Z lange $ #********************************************************************* # # mount2dir -- mount partitions to a directory using a fstab file @@ -35,10 +35,6 @@ # the remaining partitons # mount2dir $target $target/etc/fstab 0 ro # -# if a file having the same name as the fstab file plus a suffix .mkdir exists, -# it contains lines giving a mount point and a space-separated list of -# directories to create under that mount point. -# # TODO: option parsing with getopts, option for also mounting nfs directories # matching a certain server name @@ -59,9 +55,6 @@ exit 2 } -mkdir=${fstab}.mkdir -[ -f $mkdir ] || mkdir="" - ( while read device mountpoint fstype mopt dummy; do @@ -94,14 +87,6 @@ # should we fsck the partition first? [ "$fscheck" = 1 ] && fsck -nt $fstype $device mount -t $fstype -o noatime $mopt $device $target$mountpoint - # create any directories specified in the mkdir file - if [ -n "$mkdir" ]; then - dirs=$(grep "^${mountpoint}[[:space:]]" "$mkdir") && { - for dir in ${dirs#$mountpoint}; do - mkdir -p $target$mountpoint/$dir - done - } - fi esac done