10

I am new to linux, but had a question. I am getting in the business of buying old computers, putting Linux on them, then donating them to students who don't have their own computer at home. I have gone through and installed Xubuntu on my system, installed/uninstalled all the software that I want/need, and now want to know if there is a way that I could make an ISO of my system, and put it onto ANOTHER computer, and still have all of my tweaks, and programs ready to go after the ISO has installed. That way I don't need to go through and spend an hour or two on every computer.

What programs would you recommend for creating an ISO like this?

Thanks, Tobin

5

Parts of this answer comes from: How to move Ubuntu installation from one hdd to another?

I can't say an exact answer for the creation of an ISO as you say in your question but if you wish to reduce the amount of time for creating identical copies of an operating system in different computers, the Cloning process can be useful for your case, of which I suggest you the usage of Clonezilla which can be useful for cloning hard disk drives even for those situations on which you need to do it with different size disks as mentioned here: http://www.tuxradar.com/content/how-clone-hard-drives-clonezilla

enter image description here

Moving to a bigger disk

It's easy to ensure that a clone of a SCSI disk is restored to a SCSI disk, but you'll have a tough time finding an exact replica size-wise. The good news is you don't have to restore a disk on another disk of the same size. The even better news is that you can in fact restore the image to a much larger disk.

When restoring a disk, Clonezilla enables you to resize the filesystem and create partitions on the new disk proportionally. But even if you are moving to a bigger disk, you might prefer to keep the partitions as they are. In that case you can ask Clonezilla to create the partition table as its listed in the image.

There is documentation about moving to a larger disk but I am not sure that you can do it the opposite (cloning to a smaller disk). That's why I should suggest you to use just the amount of hard disk drive space needed for the install or check which is the smallest hard disk drive of your equipment in order to create the install based on that disk. Let's say: If you have 9 hard disk drives, 2x100GB, 4x80GB 2x40GB and 1x20GB, let's use the smallest one to install and to be the source for cloning so you can clone it in the largest ones. Remember to expand the partitions as needed in order to use the full hard disk drive after cloning.

Clonezilla offers several Live CD's and bootable USB images and there is also documented that you can resize the free space on the disk after the copy, in which case the suggestion to use gparted is also a good idea.

You don't need to worry about drivers and possible failures related to these things. Ubuntu will install whatever drivers as needed for the new computer, except the proprietary drivers of certain video cards (ATI/nVidia) or more specific hardware. Based on that I suggest you to check every cloned system in order to make sure that everything is running fine after the cloning.

By using a cloning procedure you can do as many customization as you wish to the system and be sure that all the cloned hard disk drives will have the same software that you include on the original.

Good luck!

2

There is extensive documentation on how to create custom installation CDs. Relevant to your question is this excerpt from that page:

Probably the prime motivation to build your own install CDs is to modify which packages are installed; in particular you may want to add some packages to the CD.

The easiest way to do this is to build an 'extras' repository structure, containing only your extra .debs, and merge these into the CD file hierarchy before rebuilding the .ISO image. This guide will step you through how to do this.

I would caution against doing too much customization, preferring to copy /home/tobin/.config and similar files using a simple rsync once the machines are bootstrapped. This suggestion is largely based on the introduction on the instruction page:

The process of customizing or "remastering" Ubuntu installation CDs is not especially complex, but it is a little tedious and finicky.

Which I read as "the more clever you try to be, the harder it will to get right".

2

It might be partly off-topic, but perhaps PXE and kickstart + preseeding with a post-install script could be a safer solution. Some info on kickstart and PXE. At my company I am using kickstart + preseeding for installing VMs on some Xen servers, I have to admit though that I never installed a GUI-enabled host this way.

There is an app called system-config-kickstart (available in standard repo for all I know) with which you can browse through most options and easily create a kickstart configuration file. The packages section not working properly, it seems, as apparently not every functionality is ported from RHEL/Fedora yet, but it is still possible to add that section manually to the configuration file.

There are also tricks for post-install scripts, like setting up default root passwords for MySQL servers etc., but I suppose we'd need more data in order to help with a specific requirements setup.

I found surprisingly much data about those topics in 'The Official Ubuntu Server Book' by Kyle Rankin (not trying to advertise in here though).

2
  1. Install Ubuntu (or in your case Xubuntu)
  2. Install the programs you want & make any other changes you want
  3. Install Remasterys:

-------3a. Download key: http://www.remastersys.com/ubuntu/remastersys.gpg.key

-------3b. In the Ubuntu Software Center you need to open your sources and import the key

-------3c. In the Ubuntu Software Center you need to add a new source: deb http://www.remastersys.com/ubuntu precise main

-------3d. Close the Ubuntu Software Center and Open your terminal and type: sudo apt-get update

-------3e. In the Ubuntu Software Center search for remastersys, and install it make sure to check the addon box for the gui.

  1. Once you've installed remastersys you can use it to make an iso file of your operating system, that you can install on other computers. It will be an exact duplicated but you will be able to install it like you would with a normal ubuntu (or xubuntu) iso.

Please note: Remastersys does not support UEFI, and the iso file that is generated may not work under CPM mode on some UEFI systems.

0

Plug both HDDs in, then check which drives are which device files using gparted and then:

sudo apt install pv
sudo pv /dev/sdX | sudo dd of=/dev/sdY bs=128M

This will copy the full contents of your first hard drive (in this example /dev/sdX) 1:1 (bitwise) to your second drive (here /dev/sdY) considering your second drive is either bigger or the same size as the old drive (otherwise as soon as the second drive is full the write operation will abort).

You could use an external HDD for that. Clone it to your HDD and then clone your external hdd to every computer you need to install the system to.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.