# Error on Make World for Diskless Operation



## cybercoke (Mar 12, 2010)

Hi guys,

I'was following the guide of diskless operation from (NBER on Freebsd 7.1, and i got the following error:



```
--------------------------------------------------------------
>>> stage 1.2: bootstrap tools
--------------------------------------------------------------
cd /usr/src; MAKEOBJDIRPREFIX=/usr/obj/usr/src/tmp  INSTALL="sh /usr/src/tools/install.sh"  PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj
/usr/src/tmp/legacy/usr/bin:/usr/obj/usr/src/tmp/legacy/usr/games:/sbin:/bin:/usr/sbin:/usr/bin  WORLDTMP=/usr/obj/usr/src/tmp  
VERSION="FreeBSD 7.1-RELEASE i386 701000"  MAKEFLAGS="-m /usr/src/tools/build/mk  -m /usr/src/share/mk" make -f Makefile.inc1  DESTDIR=  
BOOTSTRAPPING=701000  -DWITHOUT_HTML -DWITHOUT_INFO -DNO_LINT -DWITHOUT_MAN  -DWITHOUT_NLS -DNO_PIC -DWITHOUT_PROFILE -DNO_SHARED  
-DNO_CPU_CFLAGS -DNO_WARNS -DNO_CTF bootstrap-tools
===> games/fortune/strfile (obj,depend,all,install)
make: don't know how to make bsd.README. Stop
*** Error code 2

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Stop in /usr/src.
```

Plese , could any one help out !:stud
Thks.


----------



## Nirbo (Mar 12, 2010)

Looks to me like DESTDIR= is blank. Don't know if that should be /pxeroot and you've accidentally just nulled it.

EDIT: Keep in mind that setenv and other methods of setting enviromental variables can be shell specific.


----------



## cybercoke (Mar 12, 2010)

Hi Nirbo,

I'm using the folowing scrip to do that process:


```
#!/bin/sh
export DESTDIR=/data/misc/diskless
mkdir -p ${DESTDIR}
cd /usr/src; make buildworld && make buildkernel
cd /usr/src/etc; make distribution
```

Thank You.


----------



## vbm (May 1, 2010)

cybercoke said:
			
		

> Hi Nirbo,
> 
> I'm using the folowing scrip to do that process:
> 
> ...



Hi I have the same problem. If you get it solved, please tell me how you did

thanks


----------



## SirDice (May 1, 2010)

This works, it's for a jail but it should work for you too:

```
#!/bin/sh

JNUM=2
HOST=build

IP=192.168.1.19$JNUM

D=/jail/j$JNUM

cd /usr/src
make installworld DESTDIR=$D SRCCONF=/etc/src.conf.$HOST
cd etc
make distribution DESTDIR=$D SRCCONF=/etc/src.conf.$HOST
cd $D
ln -sf dev/null kernel

touch $D/etc/fstab

cat > $D/etc/resolv.conf <<RESOLV
search dicelan.home.
nameserver 192.168.1.1
RESOLV

cat > $D/etc/rc.conf <<RCCONF
hostname="$HOST.dicelan.home"
interfaces=""
syslogd_flags="-ss"
sendmail_enable="NONE"
sshd_enable="NO"
RCCONF

cp /etc/make.conf.clean $D/etc/make.conf
cp /root/.cshrc $D/root/.cshrc

mkdir $D/usr/ports
mkdir $D/tmp/build
```

You'd need to add the installkernel though, should be similar to installworld.


----------



## vbm (May 1, 2010)

Two questions:

1) Can i put


```
D=/data/misc/diskless
```

instead of


```
D=/jail/j$JNUM ?
```


2) Do I need to change something else?


----------



## SirDice (May 1, 2010)

That should do it. You may want to remove/change the fstab, rc.conf and other files I create.


----------



## vbm (May 1, 2010)

Ok, but you have not answered my first question:



			
				vbm said:
			
		

> 1) Can i put
> 
> D=/data/misc/diskless
> 
> ...



thaks so much for the help.


----------



## SirDice (May 2, 2010)

vbm said:
			
		

> Ok, but you have not answered my first question:


I did. I said, that should do it.


----------



## vbm (May 2, 2010)

ok thaks so much.


----------

