simple straightforward tool for mainaining small networked of imaged linux boxes

Hi, Over at Free Geek Toronto <http://www.freegeektoronto.org/>, we have a small computer classroom of desktop boxes that run Linux Mint. Every couple of weeks we re-install clean images by hand. The process is pretty labourious and time-consuming, and we would much rather automate it somehow. However, none of us is a real sysadmin, and the tools I know a tiny bit about (landscape, puppet) are non-free and relatively complex. We have very limited financial resources and our volunteer capacity is also a bit strained right now. Does anyone have suggestions for a simple, easy way to automate the flashing of images in a small network? Thanks as always -- this is my first post on the new list! Matt

On Mon, Oct 06, 2014 at 07:29:59PM -0400, Matt Price wrote:
Over at Free Geek Toronto <http://www.freegeektoronto.org/>, we have a small computer classroom of desktop boxes that run Linux Mint. Every couple of weeks we re-install clean images by hand. The process is pretty labourious and time-consuming, and we would much rather automate it somehow. However, none of us is a real sysadmin, and the tools I know a tiny bit about (landscape, puppet) are non-free and relatively complex. We have very limited financial resources and our volunteer capacity is also a bit strained right now. Does anyone have suggestions for a simple, easy way to automate the flashing of images in a small network?
Thanks as always -- this is my first post on the new list!
Can the machines PXE boot? If so, you could perhaps have normal boot enabled all the time, except when you want to reflash when you change the PXE boot server to instead boot an automatic imaging tool instead. -- Len Sorensen

Can you do a basic install with / ( including /root, and /usr ) on /dev/sda1 (approx 6 to 8 gigabytes)? *IMPORTANT*... include sshd as part of the basic install, and have it start automatically at boot. - "dd" the / partition to a USB key. Assuming the key is mounted as /media/key dd -bs=1M -if=/dev/sda1 -of=/media/key/imagefile To copy the partition back - boot the machine to be installed, using any linux install ISO or USB key, then insert the USB key and "dd" the other way... dd -bs=1M -if=/media/key/imagefile -of=/dev/sda1 Final customization - remove the linux boot ISO/key and the data key and reboot the machine - assuming sshd works, you can now do scripted final customization over the net, including running apt-get for updates, and copying user home dirs, etc, etc. -- Walter Dnes <waltdnes@waltdnes.org>

Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from? Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines. On Tue, Oct 7, 2014 at 12:31 AM, Walter Dnes <waltdnes@waltdnes.org> wrote:
Can you do a basic install with / ( including /root, and /usr ) on /dev/sda1 (approx 6 to 8 gigabytes)? *IMPORTANT*... include sshd as part of the basic install, and have it start automatically at boot. - "dd" the / partition to a USB key. Assuming the key is mounted as /media/key dd -bs=1M -if=/dev/sda1 -of=/media/key/imagefile
To copy the partition back - boot the machine to be installed, using any linux install ISO or USB key, then insert the USB key and "dd" the other way... dd -bs=1M -if=/media/key/imagefile -of=/dev/sda1
Final customization - remove the linux boot ISO/key and the data key and reboot the machine - assuming sshd works, you can now do scripted final customization over the net, including running apt-get for updates, and copying user home dirs, etc, etc.
-- Walter Dnes <waltdnes@waltdnes.org>
--- GTALUG Talk Mailing List - talk@gtalug.org http://gtalug.org/mailman/listinfo/talk

On Tue, Oct 07, 2014 at 07:01:42AM -0400, Matt Price wrote:
Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from?
Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines.
If the BIOS has an option for network boot, then you could enable that. Then the server would have to have 'pxe' (pxe boot daemon) running to send the boot files to the client when it powers on. This would then provide the boot menu and such for the client, which could normally be to load the kernel and ramdisk from the local disk, or to network boot a kernel and ramdisk that reflash the local disk, perhaps using partimage to transfer the image from the server to the client. You might even set up wake on lan if supported so you could remotely turn the machines on when you want them to do the reimaging of the disk. In fact a lot of machines can have a different boot order for normal boot versus wake on lan boot making some parts even simpler. -- Len Sorensen

I haven't used it, but I'm told it's good and it's meant to address exactly the problem you've explained: http://sourceforge.net/projects/g4l/ (Ghost for Linux) That said, using PXE booting may be a better solution. On 7 October 2014 13:18, Lennart Sorensen <lsorense@csclub.uwaterloo.ca> wrote:
On Tue, Oct 07, 2014 at 07:01:42AM -0400, Matt Price wrote:
Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from?
Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines.
If the BIOS has an option for network boot, then you could enable that. Then the server would have to have 'pxe' (pxe boot daemon) running to send the boot files to the client when it powers on. This would then provide the boot menu and such for the client, which could normally be to load the kernel and ramdisk from the local disk, or to network boot a kernel and ramdisk that reflash the local disk, perhaps using partimage to transfer the image from the server to the client.
You might even set up wake on lan if supported so you could remotely turn the machines on when you want them to do the reimaging of the disk. In fact a lot of machines can have a different boot order for normal boot versus wake on lan boot making some parts even simpler.
-- Len Sorensen
--- GTALUG Talk Mailing List - talk@gtalug.org http://gtalug.org/mailman/listinfo/talk
-- Giles http://www.gilesorr.com/ gilesorr@gmail.com

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Similarly, I've used Clonezilla to create a reference image, and then distribute that image to 32 computers in two separate classrooms. It involved starting each computer from a bootable Clonezilla USB, then pulling the image from a network-connected computer. http://clonezilla.org/ When a DRBL server was added, it made things even easier. Normally the PCs were set to PXE boot, but it would fail and they'd boot from the hard drive. When the DRBL server was turned on it would respond to the PXE boot, and re-image the PCs. No bootable USBs required. http://clonezilla.org/clonezilla-SE/ - --Bob. On 07/10/14 01:27 PM, Giles Orr wrote:
I haven't used it, but I'm told it's good and it's meant to address exactly the problem you've explained:
http://sourceforge.net/projects/g4l/ (Ghost for Linux)
That said, using PXE booting may be a better solution.
On 7 October 2014 13:18, Lennart Sorensen <lsorense@csclub.uwaterloo.ca> wrote:
On Tue, Oct 07, 2014 at 07:01:42AM -0400, Matt Price wrote:
Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from?
Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines.
If the BIOS has an option for network boot, then you could enable that. Then the server would have to have 'pxe' (pxe boot daemon) running to send the boot files to the client when it powers on. This would then provide the boot menu and such for the client, which could normally be to load the kernel and ramdisk from the local disk, or to network boot a kernel and ramdisk that reflash the local disk, perhaps using partimage to transfer the image from the server to the client.
You might even set up wake on lan if supported so you could remotely turn the machines on when you want them to do the reimaging of the disk. In fact a lot of machines can have a different boot order for normal boot versus wake on lan boot making some parts even simpler.
-- Len Sorensen
--- GTALUG Talk Mailing List - talk@gtalug.org http://gtalug.org/mailman/listinfo/talk
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Ensure confidentiality, authenticity, non-repudiability iEYEARECAAYFAlQ5btQACgkQuRKJsNLM5erXzQCbB8XCo5AP3+EEu/lyQecXUNsZ 140AoOwwb7+e9EnHUEtIIndl6N1dg4pP =x7v4 -----END PGP SIGNATURE-----

This is a pretty good hint. Thanks, Bob Sent from my mobile Original Message From: Bob Jonkman Sent: Saturday, October 11, 2014 1:54 PM To: GTALUG Talk Reply To: GTALUG Talk Subject: Re: [GTALUG] simple straightforward tool for mainaining small networked of imaged linux boxes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Similarly, I've used Clonezilla to create a reference image, and then distribute that image to 32 computers in two separate classrooms. It involved starting each computer from a bootable Clonezilla USB, then pulling the image from a network-connected computer. http://clonezilla.org/ When a DRBL server was added, it made things even easier. Normally the PCs were set to PXE boot, but it would fail and they'd boot from the hard drive. When the DRBL server was turned on it would respond to the PXE boot, and re-image the PCs. No bootable USBs required. http://clonezilla.org/clonezilla-SE/ - --Bob. On 07/10/14 01:27 PM, Giles Orr wrote:
I haven't used it, but I'm told it's good and it's meant to address exactly the problem you've explained:
http://sourceforge.net/projects/g4l/ (Ghost for Linux)
That said, using PXE booting may be a better solution.
On 7 October 2014 13:18, Lennart Sorensen <lsorense@csclub.uwaterloo.ca> wrote:
On Tue, Oct 07, 2014 at 07:01:42AM -0400, Matt Price wrote:
Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from?
Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines.
If the BIOS has an option for network boot, then you could enable that. Then the server would have to have 'pxe' (pxe boot daemon) running to send the boot files to the client when it powers on. This would then provide the boot menu and such for the client, which could normally be to load the kernel and ramdisk from the local disk, or to network boot a kernel and ramdisk that reflash the local disk, perhaps using partimage to transfer the image from the server to the client.
You might even set up wake on lan if supported so you could remotely turn the machines on when you want them to do the reimaging of the disk. In fact a lot of machines can have a different boot order for normal boot versus wake on lan boot making some parts even simpler.
-- Len Sorensen
--- GTALUG Talk Mailing List - talk@gtalug.org http://gtalug.org/mailman/listinfo/talk
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Ensure confidentiality, authenticity, non-repudiability iEYEARECAAYFAlQ5btQACgkQuRKJsNLM5erXzQCbB8XCo5AP3+EEu/lyQecXUNsZ 140AoOwwb7+e9EnHUEtIIndl6N1dg4pP =x7v4 -----END PGP SIGNATURE----- --- GTALUG Talk Mailing List - talk@gtalug.org http://gtalug.org/mailman/listinfo/talk

On 7 October 2014 13:18, Lennart Sorensen <lsorense@csclub.uwaterloo.ca> wrote:
On Tue, Oct 07, 2014 at 07:01:42AM -0400, Matt Price wrote:
Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from?
Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines.
If the BIOS has an option for network boot, then you could enable that. Then the server would have to have 'pxe' (pxe boot daemon) running to send the boot files to the client when it powers on. This would then provide the boot menu and such for the client, which could normally be to load the kernel and ramdisk from the local disk, or to network boot a kernel and ramdisk that reflash the local disk, perhaps using partimage to transfer the image from the server to the client.
You might even set up wake on lan if supported so you could remotely turn the machines on when you want them to do the reimaging of the disk. In fact a lot of machines can have a different boot order for normal boot versus wake on lan boot making some parts even simpler.
Scott Sullivan did a talk on setting up PXE boot a couple of years ago. I recently pointed back to the memories when I put in a new media machine (Zotac ID-88), and found it wasn't recognizing bootable CDs, only to realize that some of the messages in the failing boot indicated a "looking for PXE" step. I was keen on putting Debian in place, so the following instructions were relevant to that: https://wiki.debian.org/PXEBootInstall The somewhat oversimplifcation is that you need to set up several things on a central server: a) Modify DHCP to indicate the offering of PXE boot b) Install tftp on the server, and put install files in a suitable place so clients may pull them The "most magical" part, which is open-ended as to how sophisticated it can get, is the part of controlling what gets installed. In my "wanna install Debian" case, it was simple enough; I grabbed a stock Debian netboot install and threw that into place. I didn't much care how time-consuming later steps were. Presumably this means I'll not likely be pulling many Debian CD images anymore; using PXE is about as easy, and simpler as it consumes no CDs/DVDs. If you want to have a bunch of MINT machines with extensive common configuration, then it's worth jumping through some hoops to customize the net install so it needs little work later. There are some instructions on this for MINT: http://forums.linuxmint.com/viewtopic.php?f=197&t=96322 It's worth your while to look into some automation tools for installing common things that need to be on each machine. My answer is cfengine2 (I haven't migrated to v3); others like Chef/Puppet/Ansible. My sense is that it's likely preferable to have a fairly simple installation, and use tools to do system management afterwards. I know Scott has gone through the notion of having scripting designed to customize Fedora/CentOS installations; that's a different approach, but certainly valid. If you wanted MINT, then his scripts are likely useless to you, alas. -- When confronted by a difficult problem, solve it by reducing it to the question, "How would the Lone Ranger handle this?"

On Tue, Oct 07, 2014 at 07:01:42AM -0400, Matt Price wrote
Lennart, can you explain that process in more detail? I mean, what tool would one PXE boot from?
Walter, that is helpful but still sounds pretty time-consuming -- I would like to find a way to have an unattended re-imaging that can run more-or-less simultaneously on all the machines.
The idea is to make one "reference install" and then copy it to several USB keys. Then boot-and-dd from 1 key to 1 machine. Question... can your LAN handle several machines installing several gigabytes of OS simultaneously? -- Walter Dnes <waltdnes@waltdnes.org>
participants (7)
-
Bob Jonkman
-
Christopher Browne
-
Giles Orr
-
Lennart Sorensen
-
Matt Price
-
self_same_self@yahoo.com
-
Walter Dnes