Wiki.TinyCoreLinux.Com
Location : Tiny Core Linux >
Netbooting
Tinycore has a native capability to be netbooted. It can also act as the host for itself.
A typical use case would be two computers, one with a cd-drive or usb-boot capability, and the other one without any easy means to boot. Another case could be the need to have TC on several computers, easily.
This section can be used as a reference to using another host, or just for curiosity.
In Tinycore the initrd is the OS. This in turn creates a lot of possibilities.
So, in netbooting, we first set up a DHCP server, authoritative, to deal out some IP addresses and to tell the clients where to get their boot fix.
Then, we set up the pxelinux bootloader, and a suitable tftpd server. Busybox is used for all the servers.
It is assumed you have now booted Tinycore on one machine, and that your boot media is still connected to that computer. All the clients are expected to be in the same wired LAN as the host.
TC terminal server is similar to the Knoppix' one, only differing in one major point. TC does not depend on the server at all after booting, so you are free to shut the host down after booting all wanted clients.
Now, fire the wizard up from the menu (TC terminal server).
The first question is about your boot device; this is to copy the kernel and initrd to RAM, in order to have as smooth operation as possible. Note the device does not have to be the actual boot device you used, if you want your clients to boot a different edition/remaster of TC.
After a short while the files are copied. Then you are asked some questions for the DHCP server:
If you have no need for an internet connection on the clients, you can accept the defaults. If you do need to connect, you'll need to give the proper details for your network.
The last question is for additional boot parameters.
Now, the server is fully operational, only waiting for your clients to connect.
To boot your client(s) from the network, go to their BIOS, and select "Boot order". From there, put the correct option as the first. "Boot from LAN", "PXE boot", "Network boot" or another name.
Save, and reboot. You should first see a few seconds of the BIOS preparing the PXE stack, and then sending a DHCP discovery.
In a LAN the server should respond to that instantly.
Unless you now hold alt or shift, the client will boot automatically to TC from the network. If you do hold the button, you will get a boot prompt similar to the Tinycore CD, where you can type additional boot options (if you need more, or forgot to specify them in the config phase).
http://tinycorelinux.com/forum/index.php?topic=2705.0
Core Version 2.8 adds the ability to load extensions via HTTP.
Core Version 2.6 and above do not need tftplist or httplist to be able to use nfsmount.
The boot option is:
tftplist=server:path/list
On my system:
The tftp server is openvz. My tftp server expects all file names to be relative to /tftpboot.
The extension to load is /tftpboot/nfs/mc2/tftp/nfs-utils.tcz.
The list is /tftpboot/nfs/tftp/tcz.
This file contains:
So my boot option is tftplist=openvz:/nfs/tftp/tcz.lst.
The boot option is:
httplist=server:path/list
The http server is openvz.
The extension to load is http://openvz/TCL/2.x/tcz/nfs-utils.tcz
The list is http://openvz/TCL/nfs.lst.
This file contains:
So my boot option is httplist=openvz:TCL/nfs.lst.
nfsmount=server:share
The NFS server is openvz.
The exported share is /tftpboot/nfs/tc2-music.
The boot option is nfsmount=openvz:/tftpboot/nfs/tc2-music.
We are going to setup workstation1. It is going to have a /mnt/nfs that corresponds to /tftpboot/nfs/ws1.
On the server myserver:
When you select ws1 from the PXE boot menu, the workstation does the following:
When you run the Backup-Restore utility, set the Device to nfs or nfs/tce.
Netbooting
Table of contents
Netbooting
Tinycore has a native capability to be netbooted. It can also act as the host for itself.
A typical use case would be two computers, one with a cd-drive or usb-boot capability, and the other one without any easy means to boot. Another case could be the need to have TC on several computers, easily.
How it works
This section can be used as a reference to using another host, or just for curiosity.
In Tinycore the initrd is the OS. This in turn creates a lot of possibilities.
So, in netbooting, we first set up a DHCP server, authoritative, to deal out some IP addresses and to tell the clients where to get their boot fix.
Then, we set up the pxelinux bootloader, and a suitable tftpd server. Busybox is used for all the servers.
Doing the act
It is assumed you have now booted Tinycore on one machine, and that your boot media is still connected to that computer. All the clients are expected to be in the same wired LAN as the host.
Terminal server
TC terminal server is similar to the Knoppix' one, only differing in one major point. TC does not depend on the server at all after booting, so you are free to shut the host down after booting all wanted clients.
Now, fire the wizard up from the menu (TC terminal server).
The first question is about your boot device; this is to copy the kernel and initrd to RAM, in order to have as smooth operation as possible. Note the device does not have to be the actual boot device you used, if you want your clients to boot a different edition/remaster of TC.
After a short while the files are copied. Then you are asked some questions for the DHCP server:
- the first IP address to share
- the last IP address to share
- the network card to use
- DNS server(s) to share
- subnet
- gateway
If you have no need for an internet connection on the clients, you can accept the defaults. If you do need to connect, you'll need to give the proper details for your network.
The last question is for additional boot parameters.
Now, the server is fully operational, only waiting for your clients to connect.
Booting the client
To boot your client(s) from the network, go to their BIOS, and select "Boot order". From there, put the correct option as the first. "Boot from LAN", "PXE boot", "Network boot" or another name.
Save, and reboot. You should first see a few seconds of the BIOS preparing the PXE stack, and then sending a DHCP discovery.
In a LAN the server should respond to that instantly.
Unless you now hold alt or shift, the client will boot automatically to TC from the network. If you do hold the button, you will get a boot prompt similar to the Tinycore CD, where you can type additional boot options (if you need more, or forgot to specify them in the config phase).
PXE and PPR/TCZ on an NFS share
What this is for
A machine that PXE boots TCL can have its PPR on an NFS Share. This will allow you to have a diskless workstation that can load its extensions just like a workstation with a disk or USB thumbdrive.What you will need
If you are running TC or MC prior to Version 2.5 you will need to patch two files in tinycore.gz or microcore.gz. The two patches can be found athttp://tinycorelinux.com/forum/index.php?topic=2705.0
What is added
These patches add two new boot options. These options add the ability to load tcz extensions via TFTP and NFS.Core Version 2.8 adds the ability to load extensions via HTTP.
Core Version 2.6 and above do not need tftplist or httplist to be able to use nfsmount.
tftplist
tftplist allows you to load tcz extensions via TFTP. This can be used to load the nfs-utils.tcz from the network.The boot option is:
tftplist=server:path/list
- server is the tftp server name or IP address.
- path is the tftp path to the list file.
- list is a file that contains a list of tcz extensions to load.
On my system:
The tftp server is openvz. My tftp server expects all file names to be relative to /tftpboot.
The extension to load is /tftpboot/nfs/mc2/tftp/nfs-utils.tcz.
The list is /tftpboot/nfs/tftp/tcz.
This file contains:
/nfs/mc2/tftp/nfs-utils.tcz
So my boot option is tftplist=openvz:/nfs/tftp/tcz.lst.
httplist ( Version 2.8 )
httplist allows you to load tcz extensions via HTTP. It is similar to the tftplist option above.The boot option is:
httplist=server:path/list
- server is the web server name or IP address.
- path is the path to the list file.
- list is a file that contains a list of tcz extensions to load.
The http server is openvz.
The extension to load is http://openvz/TCL/2.x/tcz/nfs-utils.tcz
The list is http://openvz/TCL/nfs.lst.
This file contains:
TCL/2.x/tcz/nfs-utils.tcz
So my boot option is httplist=openvz:TCL/nfs.lst.
nfsmount
nfsmount defines the nfs share that will be mounted to /mnt/nfs on the workstation. The boot option is:nfsmount=server:share
- server is the nfs server name or IP address
- share is the exported share.
The NFS server is openvz.
The exported share is /tftpboot/nfs/tc2-music.
The boot option is nfsmount=openvz:/tftpboot/nfs/tc2-music.
Putting it all together
The tftp server is sourced at /tftpboot.We are going to setup workstation1. It is going to have a /mnt/nfs that corresponds to /tftpboot/nfs/ws1.
On the server myserver:
- mkdir -p /tftpboot/nfs/ws1/tce
- copy nfs-utils.tcz to /tftpboot/nfs/ws1/tce
- create the file /tftpboot/nfs/ws1/nfs.list that contains: /nfs/ws1/nfs-utils.tcz
- Copy tinycore.gz and bzImage to /tftpboot/nfs/ws1
- add "/tftpboot/nfs/ws1 *(rw,no_root_squash)" to /etc/exports, and "exportfs -a".
- Create a PXE config file that contains the following:
label ws1 MENU LABEL WS1 kernel /nfs/ws1/bzImage append initrd=/nfs/ws1/tinycore.gz nfsmount=myserver:/tftpboot/nfs/ws1 tcplist=myserver:/nfs/ws1/nfs.list tce=nfs/tce
When you select ws1 from the PXE boot menu, the workstation does the following:
- Loads TCL.
- TFTP gets /nfs/ws1/nfs.list from myserver.
- TFTP gets each file listed in nfs.list and places it in /opt/tce.
- Mounts all applications in /opt/tce.
- Mounts myserver:/tftpboot/nfs/ws1 onto /mnt/nfs.
When you run the Backup-Restore utility, set the Device to nfs or nfs/tce.
Putting it all together another way.
If you are using pxelinux version 3.71 or greater, you can load the nfs-utils with initrd instead of using tftplist. To do this you need to create another cpio archive that contains /opt/tce/nfs-utils.tgz.- mkdir -p /tmp/opt/tce
- copy nfs-utils.tcz to this directory
- cd /tmp
- find opt | cpio -o -H newc | gzip -9 > /tmp/nfs-utils.cpio.gz
- copy nfs-utils.cpio.gz to the directory containing tinycore.gz.
label ws1 MENU LABEL ws1 kernel /nfs/ws1/bzImage append initrd=/nfs/ws1/tinycore.gz,/nfs/ws1/nfs-utils.cpio.gz nfsmount=myserver:/tftpboot/nfs/ws1
Contributors to this page: gerald_clark
and
curaga
.
Page last modified on Thursday 21 of January, 2010 16:27:46 MST by gerald_clark.