Monday, February 25, 2013

Customizing Ubuntu Part 2: Remastersys

Now that we have our customized Ubuntu system set up and up to date its time to install and begin the Remastersys setup. Before we tackle that though we are going to take care of the last little bit of house cleaning from the initial setup. First we will run (from terminal) "sudo apt-get autoremove" to clear out any old packages that are no longer needed and then we will disable auto login (as is default on the install) for our originally created user as the instructions on the Remastersys page are very clear to not use auto-login. After that we will remove old kernel files with Synaptic Package manger to free up space. Once we have Remastersys installed we'll clear out the Firefox cache just for good measure.

Installing was simple, I just followed the Synaptic Version of their install instructions on their Ubuntu page. The only difference was the packages didn't show up after just doing a reload in Synaptic, so I opened a terminal and ran "sudo apt-get update" and then found and installed Remastersys and Remastersys-gui from Synaptic.

Now that we have Remastersys installed, its time to open up the GUI version and start our ISO creation. You will find the program under the System Tools - Administration menu and will be asked for you password upon load. Once loaded, we will first choose the configure button to set up some basic options such as live user name and live CD name. After that we will choose the User settings option to copy all settings so as to be default for all users in our new customized ISO.

Next we will go back to the main Remastersys menu and Choose Distribution to start the creation of our ISO. Once you start this process, you will need to be patient and let the system be while Remastersys does its work. All told I think it may have taken about half hour or so to create my ISO that ended up at 1.1GB total.

Next step (and next blog entry) will be getting the ISO off the Virtual Machine and onto my main system for testing. Stay tuned.

Blessings,

Jesse

Monday, February 18, 2013

Customizing Ubuntu Part 1: System Install and Software Configuration

As I mentioned in a previous post, I always wanted to try and make a customized version of Ubuntu with my favorite applications and customized settings. This appears to be made simple using the Remastersys tool and I am setting out to give it a go. The first step in my customized system will be getting the base system in place and getting everything modified to the desired look and feel. For this install I am starting with an Ubuntu 12.04 LTS 32bit install in Virtual Box (Virtual Box did not boot the 64bit version). Once the base system is installed we'll go through the software list and start removing what we don't want and/or need and installing the programs we do want. Once we have the updated system with custom settings and software set, it will be time to start creating the new installation media.

Before getting started why Ubuntu? I was first introduced to the Ubuntu Linux distribution while working at a middle school after several years of a bit of a Linux hiatus. I was impressed from day one with how well it was done. The installer was a one CD simplified setup, a breath of fresh air compared to the four CD not so friendly install procedure of the last Linux distributions I had used. And for all the things people may find to criticize Ubuntu's direction, it is still a very well done distribution that has great hardware support and works great.

And now lets get to business, first we are going to install two packages: Synaptic Package Manager & Classic Gnome (gnome-session-fallback). Classic GNOME because I really don't like Unity (wanted to, and tried - but just don't) or GNOME 3 - The classic look and feel is what I want in my system. Synaptic Package Manger because it is a very useful and fast way to manage your software, which will come in handy as we remove default applications we won't be using and add additional applications we do want.

After installing the Classic GNOME session we want it to be the global default, so we will edit the lightdm.conf file located in the /etc/lightdm directory. All we will do is change the line that reads "user-session=ubuntu" to "user-session=gnome-classic" which will hopefully make it the default for all users once we have our customized ISO. We will also log out and log back in with the default user created during install so as to work in the classic mode. We will also disable the overlay scroll bars with the following command entered in the terminal: "gsettings set org.gnome.desktop.interface ubuntu-overlay-scrollbars false" and then we will be off.

With Synaptic in place we can remove a laundry list of applications quickly and in one batch instead of typing up a long list in the terminal or going through the Software Center (which can be a bit slow going). Gone are the following programs: Remmina Desktop Sharing & Vino as a remote desktop application is not really needed for home use. Empathy, Gwibber & Transmission BitTorent are gone as I don't user or care for any of the social networking nonsense and don't need a BitTorent client either. And lastly, RhythmBox which will be replaced by Banshee - this is a personal preference that began when I couldn't get RhythmBox to manage my wife's iPod shuffle and was able to do so just fine with Banshee. It is what I am used to and like now, so Banshee gets the nod.

After our mass removal of extra and unwanted applications its time to add the ones we do want for this customized Ubuntu System. For games, we are just going to add Quadrapassel (a Tetris clone) to add one more classic to the few already available in the regular install. We will also add LuckyBackup, Hugin Panorama Creator, FileZilla, Skype (Internet download, not in the repositories), gLabels Label Designer, Banshee, DVD Styler, RipperX, WinFF, Ubuntu-restricted-extras & Libdvdcss2 (from the Medibuntu repository for DVD Playback). gLabels is a great little program to create CD Label designs to be printed on CD labels available at most office supply stores. Luckybackup is an rsync front end that I use to backup my hard drive to an external USB drive. Hugin is great software for creating photographic panoramas, FileZilla for FTP access, Skype is self explanitory, DVD Styler for creating custom DVDs, RipperX to copy CDs to your local computer and WinFF in case you may need to convert video files (probably will for DVD Styler).

In addition to the programs above, four will be installed through separate PPAs to ensure we have the most up to date versions. One of the downsides to the LTS model and Ubuntu's rapid release philosophy is that some programs have older versions in the repositories that don't get updated, or don't get updated for a long time. From PPA we will be installing GIMP 2.8, OpenShot, Darktable & Pithos. Gimp 2.8 really improved and made GIMP more palatable for general users and is not available in the 12.04 repositories. Pithos is a native Pandora radio client for Linux that is very handy to have.

In addition to the software included in my custom design, I also have the following installed on my system that many might find worth installing: Pingus (Lemmings style game with Penguins), Blender, Dia, KeePass2, Audacity, ISO Master & PuddleTag.

After our software install binge, its time to run system updates and customize the look of the applications menu. Once that is done, it will be time to install and begin using the Remastersys program to create our distributable installation ISO.

Next step, Remastersys - stay tuned!

Blessings,

Jesse

Monday, February 4, 2013

Using Clonezilla to Clone From a Larger Hard Drive to a Smaller Drive

Officially, Clonezilla does not support cloning from a larger hard drive to a smaller one. While this may seem counter-intuitive there are some situations where you may want or need to do this. Such as with my job when images have been created from systems with 500GB drives and the new systems come with 250GB drives, or when going from a large traditional drive to a smaller SSD.If you are in this situation, I have found a way to get this done. We will have to do some prep work on the image (and re-create it) and then some additional prep on the destination drive before final imaging.

To prep what will be the new image we will be creating a new one (if its an already created image) and we will need to shrink the main partition first. You may need to restore your original image on the larger, original disk first and go from there. I use Parted Magic (which also has Clonezilla built into it) to boot the system and shrink the partition using GParted, making sure to give myself a good amount of flex room - we can always grow the partition on the new disk later. In my test I shrunk the main partition of a two partition Windows 7 drive down to about 100GB (160GB total drive capacity) to be able to fit it on a 120GB SSD. You will also want to note sizes of all partitions on the drive, in this case there was the 100MB system/boot partition and the larger main partition. After the partition has been shrunk and everything is smaller than the new destination drive, reboot the system and let the  operating system boot and run its file system/drive check - if you skip this test CloneZilla will fail when we get to making an image from the newly shrunk drive. Once the checks are finished, reboot the system again and boot into the Clonezilla environment. Once we start up Clonezilla, set the options desired after choosing to work with the device-image option. When asked what mode to use, we will be choosing "saveparts - Save_local_partitions_as_an_image" and then go through the rest of the option sets, making sure to check all the partitions on the disk.

Once the new image is saved and after installing the new, smaller disk we will again boot into Parted Magic (or GParted Live, or a similar tool), load up gParted and edit the partitions on the new drive. First (if it is a new drive) we will need to create a partition table (I did an msdos table for this restoration) and re-create the partition theme from the old drive. To create an aligned partition (critical for an SSD) create a new partition with 2MiB of space preceding it (in my case I created the 100MB system/boot partition for the Windows 7 dive I was moving over to a smaller drive) apply the change then resize/move the partition and change the 2MiB preceding space to 1mb. After that, create the next partition - again starting with 2MiB preceding space and then resizing/moving with 0 preceding space (always choose align to MiB). Repeat these steps for each additional partition. You may have to mark the appropriate partition with a boot flag either in this step or after running Clonezilla.

Now that the new drive is prepared, we will again boot Clonezilla and this time we will be restoring the recently created image. When we are offed the mode option, we will be choosing "restoreparts - Restore_an_image_to_local_partitions." Set our options of source/destination when prompted and away we go. Once finished reboot and you should now be all good to go. Your operating system may run through its file system checks again and you will want to expand the partition to fill any empty space.

There you have it, a tested procedure to clone a larger drive to a smaller drive using Clonezilla.

Blessings,

Jesse