2

I'm working for a school, and we're replacing our bloated LTSP system, which has proven to be unreliable and difficult to maintain. Rather than creating another LTSP server, we want to run Ubuntu off USB drives.

For practicality and maintenence, I'd like it to be a "full" install of ubuntu so I can clusterssh into the workstations to run updates.

Sitting there and installing Ubuntu on each of the computers would be wildly inefficent, so I want to create a prefab image to dd to the drives, much like an embedded OS.

Unfortunately, all the information I can find is about either a single install, or creating a live image.

The installation process will probably be a script that formats the drive, runs dd to copy the image, then runs grub-install to put a bootloader on it.

I've tried creating a chroot in a mounted raw ext3 image, but I can't seem to make it boot. I'm assuming I'm going to have to do some hacky solutions with the kernel and initrd, but I'm not sure where to look.

These are the resources I've been pulling from:

Live CD Customization

Debian QEMU Image

The Ubuntu OEM Install seems close to what I'm looking for, but I'm looking for a preconfigured image with a guest account to be used by the end user.

2 Answers2

0

The Ubuntu OEM Install is the way to go, at least if the target computers are rather similar (so that the system is portable between them). Do the preconfiguring in a prototype system. Ubuntu has a guest account.

When you are happy with it, create an image either with dd|xz or maybe better with clonezilla. Then you can clone from that image to the target computers. There is a server version of Clonezilla, that might fit your purpose.

clonezilla.org

sudodus
  • 46,324
  • 5
  • 88
  • 152
0

Why not build your USB just how you like it and then use dd or clonezilla to clone it to multiple drives?

dd will clone the bootloader along with everything else.

Installing to a USB drive is just like installing to internal drive, a flash drive is just another hard drive to Ubuntu.

It is best to remove the internal drive before proceeding, this protects it and results in a clean grub menu.

When you get to partitioning, select "Something else" and confirm the disk for the bootloader,

Perhaps make the first partition NTFS if the drives will ever be used for data on a Windows machine.

If ability to hibernate is required, provide at least as much swap as there is RAM on the computers they will be used on, .

For cloning I usually just use:

sudo -i
dd if=/dev/sda of=/dev/sdb

with no modifiers.

Cloning can be a slow process.

The cloned drives will all have the same UUID, but this can be changed if required.

Edit: Alternately an image can be taken of the prototype drive using dd:

sudo -i
dd if=/dev/sdb of=/home/clone.img

The image can be written to the new USB drives using Win32DiskImager in Windows or mkusb in Ubuntu.

C.S.Cameron
  • 19,519