[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to install Debian on a diskless NFS client?



Urs Thuermann wrote:
> A second way would be not to run the installation on the client, but
> prepare the directory to be exported to the client directly on the
> server.  I think this is what debootsrap is for, but I haven't found
> any good documentation how to use it.  The Debian Installation Guide
> doesn't describe it.  According to the man page I have run
>
>    ARCH=i386 debootstrap etch /tftpboot/client-dir
>
> which populates the target directory with a minimal system but don't
> know how to proceed from here.  I could probably tweak the result by
> some editing in /etc, installing/building a kernel and initrd, but I
> hope there is an easier way.
>
> Can anyone give me a hint on this?

I recently did something similar (biggest difference being that I used
pxe) for my "home entertainment system" (media-box). I think what you
want to do now is something like this:
mount -t proc none /tftpboot/client-dir
chroot /tftpboot/client-dir bin/bash

Then do basic tasks like;
 passwd - set a root password (and perhaps adduser a new user)
 /etc/hostname - set up the hosts name

Install initramfs-tools (apt-get install initramfs-tools), install a
kernel (which one depends on what you need) using apt-get, edit
/etc/mkinitramfs/initramfs.conf - set BOOT=nfs.
Then you use mkinitramfs to generate a initrd-image

Add a new entry to the chroots /etc/fstab, something like this:
/dev/nfs                        /               nfs        defaults
                   1       1
(this makes it "understand" that / is mounted using nfs), and perhaps
install other nfs-related packages for more options regarding nfs.
(apt-get install nfs-common portmap nfs-client)
You should make sure /etc/network/interfaces does *NOT* have an entry
for your interface - at least using the dhcp/pxe-boot process, it was
configured before this file was read, so one would lose
network-connectivity while setting up the "new" interface settings.

I hope this was understandable and helpful. I didn't write anything of
it down, so this is mostly taken from memory and inspecting the already
set-up system. :-)

Good luck. :)



Reply to: