Showing posts with label partition. Show all posts
Showing posts with label partition. Show all posts

Sunday, August 1, 2010

Ubuntu Upgrade - The Aftermath

Well, as mentioned above, I forgot to grab a list of custom repos, but that was about the only thing of note in what I can honest describe was the smoothest upgrade I've ever done. More so than some of the in-place ones I've done too, which I'm pretty impressed with. There were a few things that I had to tweak, but these were down to how I've got my system setup, and I doubt they'll affect the majority of people. (I needed to copy the grub bootsector twice -- I presume an update went through in my first batch of updates -- and the usual tomfoolery to get ATI's graphics manager to work how I want with my two screens, but again this is far improved vs Karmic.)

Re-installing my packages was smooth too. I ran diff on the two lists of manually installed files, and then just looked down the list for those I wanted to bring back. Despite this I'm wishing that apt allowed you to add packages of the list of those to be installed once it was going, or at least during the downloading stage, since I still forgot some. Another nice feature there would be to sort the downloads such that it can begin some of the installs while other downloads continue.

It was really pleasing to login to my clean install and immediately have all my old settings present (though since I store some on yet another partition I didn't quite get my look-and-feel back right away). Thankfully a quick dive into /etc/fstab to paste in my old settings quickly resolved this one.

There are some slight issues with Lucid, most noticeably the desktop background isn't quite right though it had already been filed as a bug on Launchpad.

Thursday, July 29, 2010

Ubuntu Upgrade - The Plan

Well once again it's time to upgrade my Ubuntu install. OK, so I'm a bit late to be upgrading from Karmic to Lucid, but I've been busy!

Clearly I don't want to lose all that I've built up over the past year or so on this machine, but I have decided that I want to do a clean install. There are a number of reasons for this, the main one is that I haven't done so yet on this machine, and this Lucid is an LTS. Not that this means that I won't upgrade again in November, but it does provide an extra impetus to do it. The upshot here is that I'm going to need to generate a backup of my settings etc. so that I can restore them in Lucid.

User files

Thankfully my /home directory is in fact another partition, which makes it easier to keep, and provides a nearby backup location for all the other files that I've modified that don't live there.

Installed packages:

Thankfully apt remembers which packages the user installed, and which were installed as dependencies. Thus, after much forum searching, I've come up with the following line to grab all the manually installed packages:

aptitude search '~i!~E' | grep -v "i A" | cut -d " " -f 4 | sort | uniq > manual

This searches for all installed (~i) not-Essential (!~E) packaages, removing (-v) those that were installed automatically ("i A"). The descriptions are then removed (cut) and the list sorted and made unique. Since this is quite a big list (and I want to keep it so I can install them back) I threw this into a file.

I plan to run the same line in the new install, and then just ignore any packages already there. I'll probably take the opportunity to re-evaluate what I have installed too.

Config files

Modified config files are so easy to overlook. I expect that everyone's modified a config file somewhere, probably the apache config? These are somewhat harder to find unless you know what you've modified. If you've used gedit to modify them then remembering that it makes backup copies of the files it mods by appending a ~ to the name can give a clue. Beyond that I've not found a foolproof way to locate them, If anyone finds one let me know!

Application Data

Also (sort-of) in this category are things such as any LDAP or MYSQL databases that you might have lying around that you may want to keep.

Extra Repos

I forget to have a look at what repos I had added to my defaults, damn. Be sure you don't!

Wednesday, April 29, 2009

Automatically mounting drives in Ubuntu

I know there's a number of guides out there that show you how to do this, but I always seem to end up combining a number of them to actually get what I want. What I want is the drive to be mounted once I'm logged in (I don't really care when, so long as it's instantly usable).

Here's how I do it

  1. Use sudo blkid to get info about the drive you want to be mounted.

  2. Make the folder that it's going to be mounted in. I normally put a folder in /media/ which has the same name as the drive. This keeps things simple and won't break any symlinks already in place. You do, however, need to unmount the drive first, and of course to make a new folder in /media you'll need to either be root or use sudo.

    I usually do this with:

    sudo mkdir /media/Data

  3. Edit /etc/fstab (you'll need to be sudo) to add the following lines:

    UUID=$DRIVE-ID $FOLDER $TYPE defaults,umask=000 0 0

    This line specifies where to find the drive where to mount it and how. You need to replace $DRIVE-ID with the UUID number for the drive you got from blkid, replace $FOLDER with the full path to the folder you want the drive to be mounted in and $TYPE with the type of filesystem used on the drive, which you can also get from blkid.

    I usually add a comment line, so I know what's happening, then this becomes:

    # /dev/sda5 - Data
    UUID=4820-8D15 /media/Data vfat defaults,umask=000 0 0

That's it. Now whenever you start Ubuntu your drive will already be mounted. If you want to mount it now without rebooting then you can tell Ubuntu to mount everything in the fstab now by using:

mount -a