Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Feb 2006 21:28:24 +0100
From:      "Guido Van Hoecke" <guido@vanhoecke.org>
To:        "f.questions" <freebsd-questions@freebsd.org>
Subject:   Diskless boot troubles
Message-ID:  <op.s5ne5mco3hhxga@beastie.vanhoecke.org>

next in thread | raw e-mail | index | archive | help
The harddisk of mdesktop machine is no longer detected by my beastie  
server (both are FreeBSD RELEASE 6.0 GENERIC).

So I want to perform a diskless boot. I've come to the point where I am  
successfully booting by means of pxeboot and the isc-dhcp3-server: it  
loads the kernel, shows the menu, I see the normal boot messages rolling  
off the screen, it detects my local cd drive and then logs the mounting of  
the root file system:
....<snip>....
Trying to mount root from ufs:/dev/ads1a
Trying to mount root from nfs:
NFS ROOT: 192.168.1.10:/diskless_root
sis0: link state changed to UP
Interface sis0 IP-address 192.168.1.2 Broadcast 192.168.1.255

Mon Feb 27 20:11:30 UTC 2006

And this is where it stops. Nothing happens any more. I have no idea where  
I could dig up some additional info.

Any suggestion or help would be most welcome.

BTW, I had to make some modifications to /usr/share/examples/clone_root to  
create the diskless root file system.

1) The 3 'tar cvf | tar xvf constructs' caused an error messages  
complaining about the differences in treatment of the -1 option between  
bsd tar and gnu tar. Executing the script with -x and -v did not clarify  
this situation: there is no such option used in this script; so I replaced  
the tar constructs with 'find | cpio' constructs.

2) The 'TOCOPY' variable does omit the 'lib' and 'libexec' directories.  
When these are absent in the diskless directory structure, the boot  
process is interrupted as /bin/sh doesn't find some shared libraries. So I  
added both dirs to the TOCOPY variable.

Here's the diff:
21:11:55 beastie:/usr/share/examples/diskless# diff clone_root.orig   
clone_root
1a2
> # $File: clone_root 2006-02-27 18:33 +0100 root@beastie.vanhoecke.org $
80c81,82
< TOCOPY="bin boot compat etc modules sbin stand sys"
---
> #TOCOPY="bin boot compat etc modules sbin stand sys"
> TOCOPY="bin boot compat etc lib libexec modules sbin stand sys"
90c92,93
< 	(cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - )
---
> 	#(cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - )
>         (cd / ; find -d ${TOCOPY} | cpio -pudm $DEST)
100c103,104
< 	(cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - )
---
> 	#(cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - )
>         (cd / ; find -d conf | cpio -pudm $DEST)
102c106,110
< 	(cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - )
---
> 	#(cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - )
>         for i in ${PWFILES}
>         do           (cd /etc ; find  $i | cpio -pudm $DEST/etc)
>         done
138a147
> # $File: clone_root 2006-02-27 18:33 +0100 root@beastie.vanhoecke.org $
21:12:55 beastie:/usr/share/examples/diskless#

(Forget about the 2 # $File:... lines, they are for local use only)

I am not sure whether these modifications should be officialised, so I  
just submit them here to the user community for validation and/or comments.

But I'd be so happy to read any advice about how I could proceed with  
diskless booting...

Guido



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.s5ne5mco3hhxga>