<div dir="ltr">Marvelous!  Working together, we are going to get this figured out!  Thanks! <br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Apr 13, 2015 at 4:30 PM, P Ganthavorn <span dir="ltr"><<a href="mailto:pganthavorn@gmail.com" target="_blank">pganthavorn@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:large">Hello Michael, Christian. I don't have much experience with PXE boot on Lubuntu but I am creating a testing environment at home to try it out. (Unfortunately, my schedule this week is tight but I will see what I can do.) I  will also try to put together an old PC and turn it into a working ubuntu station.<br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Apr 12, 2015 at 8:30 PM, Michael Paoli <span dir="ltr"><<a href="mailto:Michael.Paoli@cal.berkeley.edu" target="_blank">Michael.Paoli@cal.berkeley.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't think I'd be inclined to jump quite so far ahead.<br>
<br>
I think I'd be more inclined to presume, at least approximately, that if<br>
Tai and other new invitee to this list (Peter Ganthavorn) hadn't already<br>
worked out how to get a PXE boot server working on Lubuntu before I made<br>
that posting to this list, that they likely will reasonably shortly<br>
after reading it, and perhaps after some bit of testing/implementing it;<br>
and for the latter of those two folks, presuming he was subscribed to<br>
this list by the time that posting was sent out to the list (or might<br>
pick it up from referenced inclusion on this posting, since DreamHost<br>
list archiving continues to be relatively broken).<br>
<br>
There's lots more to do than *just* create (and/or "fix"/update) PXE<br>
boot server.  E.g., at least approximately, and for Partimus' particular<br>
use scenario and for this school installation:<br>
o aformentioned server also needs to serve as caching transparent proxy<br>
  server<br>
o need to better work out the, as near as feasible, automated<br>
  configuration and installation to target host(s), notably specific<br>
  desired software and configurations, etc.<br>
o custom bootable optical media - need to work out / validate that the<br>
  custom bootable optical media - that we have quite reproducible<br>
  process to create such media, and that it can be used to boot and at<br>
  least start the install process, quite like PXE boot, but without need<br>
  for client host computers to themselves do direct PXE boot from<br>
  BIOS/CMOS<br>
o and probably some other bits that are desired, or even important, that<br>
  aren't immediately jumping to mind.<br>
<br>
Anyway, that's why I generally recommend well documenting the process,<br>
steps, setup, etc. - so it will be quite reproducible, and most anyone<br>
with reasonably sufficient skill set can jump in, understand what the<br>
setup is, why it's set up as it is, how it's desired to be set up and<br>
why, and can maintain, support, and improve it ... without having to<br>
start again from close to ground zero on figuring out why things are<br>
being done certain ways, and not others, and have to redo much of that<br>
whole discovery process yet again.<br>
<br>
Also, and especially, if multiple folks are working on it - and/or<br>
backing each other up for support, having the stuff well documented<br>
makes it much more feasible to coordinate and work towards a common<br>
goal, and help ensure we're all, at least approximately, "on the same<br>
page".<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
From: "Christian Einfeldt" <<a href="mailto:einfeldt@gmail.com" target="_blank">einfeldt@gmail.com</a>><br>
Subject: Re: [Tech] example PXE boot setup on Lubuntu<br>
Date: Sun, 12 Apr 2015 13:34:21 -0700<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Michael,<br>
<br>
Thanks for this.  What status are we at?  Does Michael's work mean that we<br>
are now ready to go over to the Ascend school and configure a server?  Thx.<br>
<br>
On Sun, Apr 12, 2015 at 9:21 AM, Michael Paoli <<br>
<a href="mailto:Michael.Paoli@cal.berkeley.edu" target="_blank">Michael.Paoli@cal.berkeley.edu</a><u></u>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Creating Lubntu PXE boot server<br>
<br>
This doesn't cover all that may be desired of Partimus PXE boot, etc.<br>
server, but should illustrate what's needed to at least get a<br>
functioning PXE boot server built and configured on Lubuntu.<br>
For a "real" installation, and for as desired by Partimus, we'd apply<br>
the updates, set up server as transparent caching proxy server, etc.  I<br>
mostly just show the (non-default) steps to set up operational DHCP/PXE<br>
Lubuntu boot server, and then also test installation to PXE client host.<br>
For a "real" installation, of course also the relevant actual network<br>
configuration details would be used, in the demonstration, I have and<br>
used:<br>
network is <a href="http://192.168.155.0/24" target="_blank">192.168.155.0/24</a><br>
network's router/gateway is 192.168.155.1 (NATed access to Internet)<br>
network's DNS server is 192.168.155.1 (NATed to resolve Internet, etc.)<br>
For a "real" installation, after more suitably setting up the<br>
server, we'd make the client host more dependent upon that server,<br>
notably also using it as gateway, DNS server, etc.<br>
Initially the network already has a DHCP server, which we used to<br>
initially build our PXE server, but after that has DHCP server<br>
installed, we disable the DHCP server that was already on the network.<br>
<br>
In this example, I'm presently doing this on virtual machine (qemu-kvm<br>
presently on<br>
Debian GNU/Linux 7.8 (wheezy) x86_64<br>
), but should work quite as well on physical, or VirtualBox, etc.<br>
<br>
I specifically adjust my virtual machine configuration, notably:<br>
going for relatively low-spec Partimus host:<br>
i586 (Pentium)<br>
512 MiB RAM<br>
8 GiB hard drive<br>
installing from CD ISO:<br>
Lubuntu 14.04.2 LTS "Trusty Tahr" - Release i386 (20150218.1)<br>
starting creation and install with:<br>
# virt-install --name=lubuntupxesi386 \<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--cdrom=/var/tmp/ISOs/lubuntu-<u></u>14.04.2-desktop-i386.iso \<br>
--disk=/var/tmp/lubuntu/<u></u>lubuntupxesi386-sda \<br>
--network=network=pxenet,mac=<u></u>52:54:00:7b:51:5d --ram=512 --wait=-1 \<br>
--os-type=linux --os-variant=debianwheezy --arch=i586 --virt-type kvm \<br>
--hvm<br>
<br>
</blockquote>
Setting specific Ethernet MAC address wasn't necessary, but I did that<br>
for my convenience so I could use same MAC address later when<br>
reconfiguring Network Manager to use static IPv4 address.<br>
<br>
Installation ... non-default bits:<br>
Mostly go just with defaults for simplicity ... non-defaults shown:<br>
<br>
English (before the timeout)<br>
Install Lubuntu<br>
Continue<br>
Your name: Michael Paoli<br>
Your computer's name: lubuntupxesi386<br>
Your login name: michael<br>
Choose a password: [not shown]<br>
Confirm your password: [not shown]<br>
Installation is complete. ... [Restart Now]<br>
... it hung on shutdown<br>
(virtually) power cycled<br>
(virtually) eject optical media<br>
<<Control>-<Alt>-<F1>><br>
logged in<br>
$ sudo su -<br>
And for my convenience to also allow login via (virtual) serial:<br>
# (cd /etc/init &&<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
cp -p tty1.conf ttyS0.conf &&<br>
< tty1.conf > ttyS0.conf sed -e 's/tty1/ttyS0/g')<br>
<br>
</blockquote>
# start ttyS0<br>
# apt-get update<br>
<br>
And to keep vim and nano from generally annoying me:<br>
# apt-get install nvi &&<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
update-alternatives --set editor /usr/bin/nvi &&<br>
update-alternatives --set ex /usr/bin/nex &&<br>
update-alternatives --set vi /usr/bin/nvi &&<br>
update-alternatives --set view /usr/bin/nview<br>
<br>
</blockquote>
#<br>
<br>
# apt-get install isc-dhcp-server tftpd-hpa<br>
reconfigure Network Manager for static IPv4 address:<br>
# stop network-manager<br>
# ex /etc/NetworkManager/<u></u>NetworkManager.conf<br>
4a<br>
no-auto-default=52:54:00:7B:<u></u>51:5D,<br>
<br>
.<br>
w<br>
q<br>
# (<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
umask 077 &&<br>
uuid="$(uuidgen -r)" &&<br>
timestamp="$(date +'%s')" &&<br>
> '/etc/NetworkManager/system-<u></u>connections/Wired connection 1' \<br>
echo '[802-3-ethernet]<br>
duplex=full<br>
mac-address=52:54:00:7B:51:5D<br>
<br>
[connection]<br>
id=Wired connection 1<br>
uuid='"$uuid"'<br>
type=802-3-ethernet<br>
timestamp='"$timestamp"'<br>
<br>
[ipv6]<br>
method=auto<br>
<br>
[ipv4]<br>
method=manual<br>
dns=192.168.155.1;<br>
address1=<a href="http://192.168.155.2/24,192.168.155.1" target="_blank">192.168.155.2/24,192.<u></u>168.155.1</a>'<br>
)<br>
<br>
</blockquote>
# start network-manager<br>
<br>
I then reconfigured the existing DHCP server on / forwarded via<br>
192.168.155.1 to not handle or respond to the 192.168.155/24<br>
subnet/VLAN for DHCP/bootp requests, and then continued:<br>
# ex /etc/dhcp/dhcpd.conf<br>
%s/^option domain-name "/#&<br>
%s/^\(option domain-name-servers \).*$/\1 192.168.155.1;/<br>
$a<br>
next-server 192.168.155.2;<br>
subnet 192.168.155.0 netmask 255.255.255.0 {<br>
  range 192.168.155.100 192.168.155.200;<br>
  option routers 192.168.155.1;<br>
  filename "pxelinux.0";<br>
}<br>
.<br>
w<br>
q<br>
(virtually) inserted optical media:<br>
lubuntu-14.04.1-alternate-<u></u>i386.iso<br>
Lubuntu 14.04.1 LTS "Trusty Tahr" - Release i386 (20140722.2)<br>
Ideally I'd use:<br>
lubuntu-14.04.2-alternate-<u></u>i386.iso<br>
Lubuntu 14.04.2 LTS "Trusty Tahr" - Release i386<br>
but that appears to not (yet) be available<br>
>From the GUI as mere mortal user michael, did:<br>
Click Lubuntu icon in lower left, then:<br>
Accessories<br>
File Manager PCManFM<br>
That then causes the CD-ROM to mount,<br>
(for a "real" server, I'd copy the ISO on the host and loop mount it)<br>
then ...<br>
# mount -o bind,ro,nosuid,nodev \<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
'/media/michael/Lubuntu 14.04.1 LTS i386'/install/netboot \<br>
/var/lib/tftpboot<br>
<br>
</blockquote>
# restart tftpd-hpa<br>
# start isc-dhcp-server<br>
I then boot my PXE client<br>
For virtual, I'm doing:<br>
# virt-install --name=lubuntupxeci386 --pxe \<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
--disk=/var/tmp/lubuntu/<u></u>lubuntupxeci386-sda --network=network=pxenet \<br>
--ram=512 --wait=-1 --os-type=linux --os-variant=debianwheezy \<br>
--arch=i586 --virt-type kvm --hvm<br>
<br>
</blockquote>
Again, similarly, I do that host as a low-spec Partimus machine:<br>
i586 (Pentium)<br>
512 MiB RAM<br>
8 GiB hard drive<br>
>From our PXE client, again, just showing non-defaults, and generally<br>
going with defaults for simplicity:<br>
Hostname: lubuntupxeci386<br>
Full name for the new user: Michael Paoli<br>
Username for your account: michael<br>
Choose a password for the new user: [not shown]<br>
Re-enter password to verify: [not shown]<br>
Write the changes to disks? <Yes><br>
Continue<br>
... and our PXE client installs successfully (did rather minimal software<br>
installation in this demo run, but could install more at installation time<br>
or after).<br>
<br>
And, ... just for informational purposes, since I did these as virtual<br>
machines and with their virtual hard drives on filesystem that uses<br>
deduplication and compression (and also did those files as sparse<br>
files), the actual on-drive storage used is rather minimal:<br>
$ (cd /var/tmp/lubuntu && ls -onsh lubuntupxe[cs]i386-sda)<br>
574M -rw------- 1 0 8.0G Apr 12 08:29 lubuntupxeci386-sda<br>
939M -rw------- 1 0 8.0G Apr 12 08:30 lubuntupxesi386-sda<br>
$<br>
# zfs get -o all all |<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
egrep '^lubuntu/lubuntu .* (compress|dedup|mountpoint|<u></u>used )'<br>
<br>
</blockquote>
lubuntu/lubuntu  used                  1.48G                  -         -<br>
lubuntu/lubuntu  compressratio         2.94x                  -         -<br>
lubuntu/lubuntu  mountpoint            /var/tmp/lubuntu       -<br>
 local<br>
lubuntu/lubuntu  compression           gzip-9                 -<br>
 local<br>
lubuntu/lubuntu  dedup                 verify                 -<br>
 local<br>
#<br>
<br>
 From: "Michael Paoli" <<a href="mailto:Michael.Paoli@cal.berkeley.edu" target="_blank">Michael.Paoli@cal.berkeley.<u></u>edu</a>><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Subject: example PXE boot setup on Debian (Ubuntu/Lubuntu should be<br>
relatively similar)<br>
Date: Thu, 02 Apr 2015 03:58:33 -0700<br>
<br>
 From: "Tai Kedzierski" <<a href="mailto:dch.tai@gmail.com" target="_blank">dch.tai@gmail.com</a>><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Subject: Re: [Tech] Partimus (PXE?) (nearly?) unattended install<br>
solution(s?)<br>
Date: Thu, 2 Apr 2015 11:26:53 +0100<br>
<br>
* Yeah I'm still stuck on PXE - I've had some pointers from Rab in EdLUG<br>
(basically, first, don't test using VirtualBox!) and Charlie's notes<br>
still<br>
to review. And Michael's notes when he has a moment :-)<br>
<br>
</blockquote>
<br>
Shouldn't be too hard with virtual (e.g. qemu-kvm, virtualbox, etc.),<br>
but key bits to be aware of there: They typically give a NATed network<br>
by default and including a built-in provided DHCP server on that network.<br>
Such generally conflicts with doing PXE boot - so one typically wants<br>
to place the virtual host on a different network/subnet/VLAN, where<br>
there isn't some conflicting DHCP/bootp server/service.  The only other<br>
slightly tricky bit with virtual and PXE - at least that I'm aware of<br>
so far, is that non-intuitive bit on VirtualBox - where some interface<br>
types don't support PXE boot (or need additional software or packages<br>
for such interfaces - that seemed to be implied from some of what I<br>
read about folks installing direct from Oracle rather than a linux<br>
distribution's packaging thereof ... probably proprietary and/or non-<br>
distribution restrictions on some extra bits for certain interface types<br>
to be able to PXE boot under VirtualBox - found no such issue with<br>
qemu-kvm).<br>
<br>
This is example I have on my<br>
Debian GNU/Linux 7.8 (wheezy) x86_64<br>
"server" <cough, cough> (laptop) at home.<br>
Looks like I mostly/initially based it upon:<br>
<a href="https://wiki.debian.org/PXEBootInstall" target="_blank">https://wiki.debian.org/<u></u>PXEBootInstall</a><br>
(and probably from around 2012-03-11, as I made a few corrective edits<br>
to that wiki page around then).<br>
<br>
I was also interested in, as feasible, being<br>
able to PXE boot and then be able to select and install various<br>
distributions - so as I'd left it off, it could be used to PXE boot<br>
and install any of:<br>
Debian GNU/Linux 7.8 (wheezy) x86_64<br>
Debian GNU/Linux 7.8 (wheezy) i386<br>
Ubuntu-Server 14.04.1 LTS amd64<br>
<br>
>From the wee bit of notes I made of it regarding my<br>
installation/configuration:<br>
$ cat /srv/tftp/NOTES<br>
<a href="http://http.debian.net/debian/dists/wheezy/main/installer-" target="_blank">http://http.debian.net/debian/<u></u>dists/wheezy/main/installer-</a><br>
i386/current/images/netboot/<u></u>netboot.tar.gz<br>
and:<br>
<a href="http://http.debian.net/debian/dists/wheezy/main/installer-" target="_blank">http://http.debian.net/debian/<u></u>dists/wheezy/main/installer-</a><br>
amd64/current/images/netboot/<u></u>netboot.tar.gz<br>
mostly extracted to:<br>
/srv/tftp<br>
except for the differing:<br>
lrwxrwxrwx 1 root root 35 2014-04-24 07:45:30.000000000 +0000<br>
pxelinux.cfg -> debian-installer/amd64/<u></u>pxelinux.cfg<br>
lrwxrwxrwx 1 root root 34 2014-04-24 07:46:21.000000000 +0000<br>
pxelinux.cfg -> debian-installer/i386/<u></u>pxelinux.cfg<br>
and also:<br>
lrwxrwxrwx 1 root root 33 2014-04-24 07:45:30.000000000 +0000 pxelinux.0<br>
-> debian-installer/amd64/<u></u>pxelinux.0<br>
lrwxrwxrwx 1 root root 32 2014-04-24 07:46:21.000000000 +0000 pxelinux.0<br>
-> debian-installer/i386/<u></u>pxelinux.0<br>
but in the case of pxelinux.0, the ordinary files are identical, so<br>
replaced the symbolic link with a hard link<br>
<br>
also from:<br>
Ubuntu-Server 14.04 LTS "Trusty Tahr" - Release amd64 (20140416.2)<br>
contents under:<br>
install/netboot<br>
mostly also placed here, except:<br>
renamed <a href="http://version.info" target="_blank">version.info</a> to version.info.ubuntu<br>
renamed pxelinux.cfg to pxelinux.cfg:ubuntu-server:<u></u>amd64<br>
and left out symbolic links: pxelinux.0<br>
<br>
And further examining what I'd left in place in terms of mounts and<br>
configuration files and such (other than or in addition to that noted<br>
above, and mostly covered on:<br>
<a href="https://wiki.debian.org/PXEBootInstall" target="_blank">https://wiki.debian.org/<u></u>PXEBootInstall</a><br>
)<br>
<br>
The relevant bits of data I have in /etc/fstab:<br>
/dev/tigger/tftp /srv/tftp ext3 ro,nosuid,nodev,noatime 0 2<br>
/var/tmp/ISOs/ubuntu-14.04.1-<u></u>server-amd64.iso<br>
/var/tmp/ISOs/ubuntu-14.04.1-<u></u>server-amd64 iso9660 loop,ro,nosuid,nodev 0<br>
<br>
/var/tmp/ISOs/ubuntu-14.04.1-<u></u>server-amd64/install/netboot/<u></u>ubuntu-installer<br>
/srv/tftp/ubuntu-installer none bind,ro,nosuid,nodev 0 0<br>
/var/tmp/ISOs/ubuntu-14.04.1-<u></u>server-amd64/install/netboot/<a href="http://version.info" target="_blank">v<u></u>ersion.info</a><br>
/srv/tftp/version.info.ubuntu none bind,ro,nosuid,nodev 0 0<br>
Probably better to use location other than /var/tmp for things intended<br>
to be there "permanently" or more longer term, but in any case ...<br>
Also, those last two bind mounts shown above, next to last is directory<br>
bind mounted atop directory, and the last one file mounted atop (empty)<br>
file.<br>
My "NOTES" from above covers much of it, but in addition (not covered by<br>
that, and installed/configured under /srv/tftp/) we have:<br>
$ < /srv/tftp/pxelinux.cfg/default expand<br>
serial 0 9600<br>
default debian-installer/i386/boot-<u></u>screens/vesamenu.c32<br>
timeout 0<br>
label debian-i386<br>
        menu label debian-i386<br>
        config  pxelinux.cfg:i386/default<br>
label debian-amd64<br>
        menu label debian-amd64<br>
        config  pxelinux.cfg:amd64/default<br>
label ubuntu-server-amd64<br>
        menu label ubuntu-server-amd64<br>
        config pxelinux.cfg:ubuntu-server:<u></u>amd64/default<br>
That works as my default PXE boot menu that comes up, allowing<br>
selections of:<br>
debian-i386<br>
debian-amd64<br>
ubuntu-server-amd64<br>
Each of which, when selected, then just chain loads the corresponding<br>
stock menu from that flavor's PXE boot menu.<br>
The<br>
serial 0 9600<br>
Allows that menu choice to also be made via the first (legacy) serial<br>
port (if present), so serial console may be used to launch/control the<br>
PXE boot and installation (can be quite handy for serial console<br>
install, virtual machines, IPMI, etc., and doesn't particularly hurt to<br>
include that, even if it's not being used).<br>
<br>
That's mostly it ... except the IP addresses and network configuration I<br>
have is different than the example given on the referenced wiki page.<br>
<br>
And, comparing what I earlier noted to actual files under /srv/tftp ...<br>
What doesn't seem to be quite covered in those earlier NOTES:<br>
$ ls -ld /srv/tftp/pxelinux.cfg /srv/tftp/pxelinux.cfg:[ai]*<br>
drwxr-xr-x 2 root root 1024 Apr 28  2014 /srv/tftp/pxelinux.cfg<br>
lrwxrwxrwx 1 root root   35 Apr 27  2014 /srv/tftp/pxelinux.cfg:amd64 -><br>
debian-installer/amd64/<u></u>pxelinux.cfg<br>
lrwxrwxrwx 1 root root   34 Apr 27  2014 /srv/tftp/pxelinux.cfg:i386 -><br>
debian-installer/i386/<u></u>pxelinux.cfg<br>
$<br>
</blockquote></blockquote></blockquote>
<br>
______________________________<u></u>_________________<br>
Tech mailing list<br>
<a href="mailto:Tech@lists.partimus.org" target="_blank">Tech@lists.partimus.org</a><br>
<a href="http://lists.partimus.org/listinfo.cgi/tech-partimus.org" target="_blank">http://lists.partimus.org/<u></u>listinfo.cgi/tech-partimus.org</a><br>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Tech mailing list<br>
<a href="mailto:Tech@lists.partimus.org">Tech@lists.partimus.org</a><br>
<a href="http://lists.partimus.org/listinfo.cgi/tech-partimus.org" target="_blank">http://lists.partimus.org/listinfo.cgi/tech-partimus.org</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature">Christian Einfeldt</div>
</div>