Home / Community / Blog / Diskless computer using ReadyNAS and Gargoyle - part 2

Diskless computer using ReadyNAS and Gargoyle - part 2

Last time I've prepared Gargoyle as dhcp and tftp server.

Prepare tftp on ReadyNAS

To enable tftp on ReadyNAS I've installed Tftp Server for Readynas. All files have to be in tftpboot share, so I've created it.

I have to copy all syslinux files (can be copied from gargoyle) to this share, so it contains (full path):

/data/tftpboot/pxelinux.cfg
/data/tftpboot/pxelinux.cfg/default
/data/tftpboot/ldlinux.c32
/data/tftpboot/libutil.c32
/data/tftpboot/menu.c32
/data/tftpboot/pxelinux.0

Reconfigure DHCP

Now I have to change dhcp server configuration. On gargoyle, in file /etc/dnsmasq.conf:

dhcp-boot=pxelinux.0,,192.168.1.28

as you can see, now it has address of my ReadyNAS (192.168.1.28).

You can comment out lines

enable-tftp
tftp-root=/var/lib/misc/tftpboot

tftp on gargoyle is not need any more.

Now you should be able to boot any PC using PXE from ReadyNAS.

Boot to CentOS 7 (or any Linux) Installer

Now you can try to run Cent OS installer from network. You have to prepare FTP share and copy there files from installation image (CD/DVD). I've copied it to ReadyNAS to pub/CentOS7-1708 share .

If you use proftpd you have to create /etc/frontview/proftpd/proftpd.conf.overrides file to allow anonymous access:

UserAlias anonymous guest
<Anonymous /var/ftp/pub>

User guest
Group guest

  <Directory *>
    <Limit WRITE>
      DenyAll
    </Limit>
  </Directory>

  <Directory incoming>
    <Limit READ >
      DenyAll
    </Limit>
    <Limit STOR>
      AllowAll
    </Limit>
  </Directory>
</Anonymous>

Create /data/tftpboot/networkboot/CentOS7-1708 directory and copy there files:

/data/tftpboot/networkboot/CentOS7-1708/initrd.img
/data/tftpboot/networkboot/CentOS7-1708/vmlinuz

In /data/tftpboot/pxelinux.cfg/default file add lines:

LABEL InstallCentOS7
MENU DEFAULT
MENU LABEL Install CentOS 7
KERNEL /networkboot/CentOS7-1708/vmlinuz
APPEND initrd=/networkboot/CentOS7-1708/initrd.img inst.repo=ftp://192.168.1.28/CentOS7-1708-minimal

notice that ftp path is relative to pub share.

Now you should be able to boot to Cent OS installer.

Prepare NFS share

I've done it on ReadtNAS. You have to set in Settings - Network Access - NFS - Advanced settings: No Root Squash.

Be careful because you have to provide full path when mount share. My share is pub/root, so I have to mount as /data/pub/root:

mount -vt nfs 192.168.1.18:/data/pub/root /mnt/nfsroot/

As you can see, I've mounted this share in /mnt/nfsroot directory.

Install Cent OS

yum install --releasever=7 --installroot=/mnt/nfsroot \@base \@core

when You want to install another packages you can see error:

Wczytane wtyczki: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
 To enable Red Hat Subscription Management repositories:
     subscription-manager repos --enable <repo>
 To enable custom repositories:
     yum-config-manager --enable <repo>

you will have to

cp /etc/yum.repos.d/CentOS-Base.repo /mnt/nfsroot/etc/yum.repos.d/

Now you can add some GUI packages:

yum install --releasever=7 --installroot=/mnt/nfsroot \@fonts \@gnome-desktop \@x11

Based on: CentOS 7: Install PXE Boot server for thin client with NFS.

Comments

Log in or create a user account to comment.

Just my blog...

Mon Tue Wed Thu Fri Sat Sun
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31