Posts Tagged 'Ubuntu'

Ubuntu from your flash drive – easier than ever before

As you have probably noticed, new versions have arrived of Ubuntu, Xubuntu and other derivatives. One of the most exciting new features has received far less publicity than it deserves – the ability to “install” it onto your USB flash drive with just a few clicks.

The advantages are obvious: just plug your flash drive into a computer and run your favourite operating system. What’s more, everything you do — installing applications, saving documents, editing preferences — will be saved to your flash drive and will be available to you every time you run it!

The best news is that it’s astoundingly easy: all it takes is a few clicks.

Of course, there are a few requirements. First, you can only run it on computers that support booting from a USB flash drive – this is the case for most computers nowadays. Secondly, you must have a CD or a CD image. The latter can be downloaded free of charge – I, obviously, downloaded Xubuntu. Third, you’ll need to install usb-creator, the new application that is readily available in version 8.10 but which you can also download and install on version 8.04 (with Windows and Qt versions planned). And, last but not least, you’ll obviously need to have a USB flash drive.

Once installed, you can find it in your menu as Create a USB startup disk (on Xubuntu it is located under Applications->System, in Ubuntu this would be System->Administration, IIRC).



The first thing you’ll need to do is to insert the flash drive you’re planning to use. Usb-creator will then detect the drive – if multiple flash drives are inserted, you can pick from a list which one you want to use, and if the drive isn’t formatted yet usb-creator will give you the option to do so (note that this will destroy all files on it!).

The next step is inserting the appropriate CD into your CD drive, or loading the CD image you downloaded before by clicking Other….



Finally, you’ll need to configure whether you want all your documents, settings and applications to be discarded on shutdown (i.e. act as a regular LiveCD) or if you want to save them to your flash drive (this is called persistency, or persistent mode). If you pick the latter, you’ll also be able to select how much space you want to reserve for this.

Do note that usb-creator will not overwrite existing files on the drive – thus, if you want to use your entire drive, you’ll first have to delete all existing files.

Now, with everything configured, click Make Startup Disk, and sit back and relax while usb-creator prepares your flash drive.



You can do something entirely different now, like reading the rest of this blog, viewing all my screenshots of usb-creator, whatever you like. Once usb-creator is finished, it will notify you that it’s done. All that’s left now is to boot your computer from your flash drive and have fun 🙂



Troubleshooting

If persistency does not work, you might need to edit the file text.cfg in the syslinux folder on your flash drive. Just replace the line default livewith the following lines, adding a new Start Xubuntu option to the boot screen the next time you boot. Note that you might want to replace occurences of “Xubuntu” with the name of the distro you’re using. This has been tested with Xubuntu 8.10;

default persistent
label persistent
menu label ^Start Xubuntu
kernel /casper/vmlinuz
append file=/cdrom/preseed/xubuntu.seed boot=casper initrd=/casper/initrd.gz quiet splash persistent
--

Backups on Xubuntu with SBackup

The earth is orbited by many satellites, and every year, many more are sent up into space. Considering the amount of satellites, there is an enormous risk that one of those artificials moons suddenly decides to take a stroll and crashes into your home. I think you’ll agree with me that this would be disastrous – all your precious data would be lost! Your holiday pictures, important documents for school/work and your music collection – all gone!

Of course, you have to protect yourself against catastrophic situations like the one described above (and against hard drive failures). If you’re anything like me, you have no backup solution set up, and though you want to set it up, you keep postponing really taking that step. Well, now is the time. In order to write this guide, I set it up for myself, so now it’s your turn while reading this guide. And let me tell you, once you free up those minutes to set it up, you’ll be glad you did. Even if you’re never going to need it, it feels a lot better knowing that you’re prepared for eventual bad luck.

You need a place to store your backups though. If you create a backup on the same drive as the original files, a hard drive failure will affect that backup just as much as the original files. For out method, the destination can either be another hard drive or a remote directory (through SSH or FTP). If you don’t know what any of these mean, then you probably do not have access to it. Unfortunately, this means that you will not be able to create a backup. If you do possess one of these, read on 🙂 .

The destination I’ll be using is an internal hard drive that used to hold a secondary and lesser-known operating system. Its capacity is a mere 20 GB, so I’ll only be backing up my most important files. Of course, if you happen to have an external 160GB hard drive laying around, be sure to use it to the fullest.

Introducing… SBackup!

A quick search using Applications->System->Add/Remove... (with “All available applications” enabled in the top right-hand corner) for backup turns up a few backup solutions. The application we will be using, which also happens to be the most popular one, is Simple Backup, or SBackup. SBackup is a complete solution, able to automatically create backups at set intervals, keeping the backup size as low as possible. Listed are Simple Backup Config and Simple Backup Restore, which allow you to backup and restore your backup respectively.



Selecting one will also select the other because, obviously, we need to create backups in order to restore them.



With both selected, click Apply Changes and finish the installation as usual.

Once the installation has finished, you can find SBackup’s configuration utility under Applications->System->Simple Backup Config.



Setting it all up

By default, SBackup is set up to only perform backups when you tell it to. However, for maximum security, we want it to automatically create a new backup every so often, and now and then delete old backups in order to save space. To make sure the backups are created exactly the way you want it, select Use custom backup settings.

The first thing to do is selecting which files you want to be included in the backup. This can be done under the Include tab on top.



SBackup comes with a few useful defaults, however, considering the size of my backup drive, I decided to only backup the /home/ directory, which contains the documents and settings of every user on the system. Do include the defaults if you have enough room, though.

Next is deciding which files you do not want to be included in the backup, which can be done under the Exclude tab. You can use the preferences in this tab to exclude any files which you do not regard of enough value to justify the amount of space they’d consume in the backup.



The Exclude tab, in turn, contains four other tabs on the left-hand side.

The first one is the Paths tab, which allows you to exclude complete directories. I left it at the defaults since I had no specific directories I wanted to exclude, and I also felt no need to include the directories listed as excluded by default.

Moving on to the File types tab, though, there were certain files I could not afford to backup. A lot of multimedia files were already excluded, which was fine to me – I cannot afford to back up my (measly little) music collection. However, I often help testing new versions of Xubuntu. This involves downloading complete CD “images” (files that can be put on a CD) which can be up to 700 MB in size. The names of these images always end in .iso, and since there is no need for me to keep them that long, I clicked Add and opted to exclude files with the iso extension.





The Regex tab is not that interesting for this guide, since those who know what it does, are able to figure it out by themselves.

The Max size tab is very useful though, because it allows you to set a maximum size for files to be backed up, which comes in very handy in preventing your backup from growing too big.

We then move on to the Destination tab on top. This tab allows you to, as its name implies, set the destination for your backup. You can set up a remote directory at the bottom – I’ll be setting a custom local backup directory.



I located my external hard drive in the /media/ folder, by the name hda1. It is also listed in my left pane in Thunar (the file browser) as 20G Volume. In there, I created a new folder (/media/hda1/gay/, with gay being the name I gave my computer during installation, but feel free to use whatever you like) to hold my backups. Then I selected Other… in the drop-down menu and selected that folder.

Next up was configuring when the backup is to be ran in the Time tab.



Since I do not have that much space I opted for weekly backups, but of course, the best way to go would be daily. Since I do not leave my computer on 24/7 I cannot set it to create a backup in the middle of the night, so I opted for “simply”, which supposedly means “as soon as the computer is running, with the previous backup being made at least one week ago”.

The last tab, Purging, allows you to configure how long you want to keep old backups.



Mostly, you’ll want to select “Logarithmic”, being the most efficient and recommended method, but if you want to select an exact number of days to keep old backups, that’s possible to.

After finishing the configuration, click “Save” to, well, save your configuration.

Let’s back things up

Of course, I immediately wanted to make my first backup. For that, SBackup comes with the extremely handy “Backup Now!” button 🙂

Clicking that popped up a window, saying: A backup run is initiated in the background. The process ID is: 7986.



Well, that’s it really – now you can close Simple Backup Config. The backup is being created, and the next one will be created after the period you selected ends. Opening the folder you selected as the destination (/media/hda1/gay/ in my case) will show you that a new directory has been created which will contain the backup.



If you take a look at a later time (once the backup has been completed), you will see that that directory has been filled with files containing information about the backup, and files.tgz which contains the backed-up files.



Restoring a backup

Restoring the backup is very easy, too. Open up Applications->System->Simple Backup Restore, from where you can select the location of your backups.



A drop-down menu “Available backups” provides you a list of all available backups. Selecting one of them will present you with a list of files included in that backup, clicking “Restore” will restore those files in their original location, “Restore As…” allows you to select a different location.

Conclusion

It was about time you created yourself a backup, and tell me: doesn’t it feel wonderful? Simple Backup is an excellent tool that, despite not being as good-looking as Apple’s Time Machine, definitely provides a complete solution for backing up your documents.

And by the way, with this being my first post of 2008, let me wish you all the best for the coming year. 2007 was an magnificent year for this blog, having survived into 2008 since its conception in 2007. There’s no complaining about the number of visitors, too: at the time of writing, with just 24 posts (this being the 25th), I’ve received a total of 116 798 views, with about 500 to 600 views a day recently. Furthermore, I believe it’s also been useful to a few people, which was the reason for starting this blog in the first place.
On the personal level, it also was a fantastic year. My mother’s ex, who was a massive burden to me, finally left (he lived here since I was about thirteen years old), enabling me to develop tremendously as a person, which I expect to continue in 2008. My writing style has also improved – another trend which I hope will continue in 2008.
All in all, let’s make 2008 another awesome year, and of course, if you got any further suggestions, be sure to make it known 🙂 .

Installing Xubuntu

When I installed Xubuntu 7.10 “Gutsy Gibbon“, I could not resist the urge to create a walkthrough for installing Xubuntu. It took me a while to write it up, but here it is. (Note: I have also written a review of Xubuntu 7.10)

Since Xubuntu uses the same installer as Ubuntu and Edubuntu, Ubiquity, this guide also applies to them, and Kubuntu’s installer is basically the same, so it also gives you an overview of what Kubuntu’s installation looks like. Also, the installer has not changed since the previous version, 7.04 “Feisty Fawn“, so it applies to that version too.

To start the installation, you just click the Install icon on the desktop once it is booted. However, I wanted to configure my internet connection first, because that way I would immediately be able to install language packs and whatnot. Note, though, that you can also complete the installation without internet connection.

In order to configure my wireless connection, I click the NetworkManager icon in the top right-hand side. It then pops up a list of detected wireless networks and has an entry listing my wired card.



Simply clicking the network I want to connect with, it prompts me for the passphrase. I can then click Login to Network and I am connected! It couldn’t be easier 🙂



Now that my network connection is all set, I can start Ubiquity (the installation application, remember?). The first screen allows you to select a language and links to Ubuntu’s release notes.



Clicking Forward brings us in the timezone selection screen, where we are presented with a map of the world.



Clicking the area on the map where you live zooms in the map making it easy to select your location.



Clicking Forward again presents us with a screen to select your keyboard layout. It includes many options, including many Dvorak ones (note to self: get to learn to type using Dvorak). An input field allows you to test the selected layout.



Yet again clicking Forward, a dialog box pops up telling the partitioner is being started.



When it has finished loading, you are presented with three partitioning options:

  1. Guided, resizing your main hard drive using the freed up space to install Xubuntu.
  2. Guided – use entire disk to wipe a whole hard drive and install Xubuntu on it.
  3. Manual



I opted for Manual.



The reason for me to select Manual was because I wanted a separate partition for /home, which allows me to keep all documents and settings for all user accounts were I to reinstall Xubuntu (i.e. when a new version is released). Adding the required root (/) and swap partition I ended up with a total of three partitions.



Then we need to provide Xubuntu with some user information for the first user account.



And finally, just before the actual installation will start, you are presented with an overview of everything you have selected so you can check it.



However, before you commence the installation, be sure to click the Advanced button in the bottom right-hand side. It allows you to set the location of the boot loader if you wish to, and enables you to opt in for the “Package usage survey”. If you check the checkbox, Xubuntu will send anonymous application usage data to a central Ubuntu server, so they can generate statistics about which applications are most popular. Not only does this enable the developers to improve the distribution in general, it also influences e.g. the ratings of applications you see in Add/Remove…



It will then start the installation, which will take a while.



Meanwhile, and this is an awesome feature, you can continue to use the system! You can browse the web using Firefox, heck, you can even install new applications for use during that session, all while the installation is progressing!



After a while you will be notified that the installation has finished, and that you should restart the computer to use it.



When you have restarted, with your internet connection configured, you will mostly be notified that updates are available.





I was also notified that I had the option to enable a restricted driver. This driver is not open source, but as I would like to try out Compiz Fusion (more on that in a later post) I wanted to install the driver.



Enabling the driver was very easy – just check the box and it will start the installation.



Once the installation completed, I was notified that I had to restart.



Clicking the notification gave me the option of deferring the restart to a later time, or to restart immediately.



That restart was the last restart I had to do since 🙂

All in all, Xubuntu’s installation process is a breeze. The partitioning part might be a bit scary (but hey, we’ve got Wubi if it’s too scary) but overall, it’s very easy and even comfortable. Being able to use the system while it is installing is a feature that blows away every other operating system I’m aware of, apart from other Linux distributions 🙂


a