Resizing Logical Volumes

I recently started moving from Fedora 9 to Ubuntu 10.04. Both file systems live in logical volumes. Fedora 9 is in /dev/VolGroup00/fedora9-root (10G) and /dev/VolGroup00/fedora9-home (75G) and Ubuntu 10.04 is in /dev/VolGroup00/ubuntu-10.04-root (10G) and /dev/VolGroup00/ubuntu-10.04-home (52G).

My migration strategy is to leave Fedora alone for the rest of the family and use the new Ubuntu installation myself until I’m confident everything is set up correctly. I’ve been moving things from my Fedora home to my Ubuntu home as I need them. Unfortunately, I’ve run out of room on the Ubuntu home logical volume and there’s no more room on the LVM or physical disks.

I need to shrink the Fedora home and expand the Ubuntu home. A nice summary of the commands used here is on Fedora Daily Package.

First, I need to know how much space I can grab from the Fedora home:

$ sudo mount /mnt/fedora9-home
$ df -h /mnt/fedora9-home
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-fedora9--home
                       74G   29G   42G  41% /mnt/fedora9-home
$ sudo umount /mnt/fedora9-home

This tells me the file system needs 29G and there’s 42G available. Since it’s still being used, I don’t want to take all the space, so I’ll leave a few gigabytes. I’ll make it 32G, freeing up 39G. To make all these changes to the file systems, they can’t be mounted. Use the Ubuntu 10.04 Alternate installation disc, which supports LVM. When booting, choose “Rescue a broken system”, tell it not to use a root file system and run a shell in the installer environment.

Activate the logical volumes:

# lvm vgscan
# lvm vgchange -ay

Check the LVM sizes:

# lvm lvs

Shrink Fedora home:

# e2fsck -f /dev/VolGroup00/fedora9-home
# resize2fs /dev/VolGroup00/fedora9-home 31G
# lvm lvresize VolGroup00/fedora9-home --size 32G
# resize2fs /dev/VolGroup00/fedora9-home

This sequence makes sure nothing gets clipped by rounding. The file system is shrunk to 31G, then the volume is resized to 32G. Lastly, the file system is resized to use all the space in the volume.

Now add the space to Ubuntu home:

# lvm lvresize VolGroup00/ubuntu-10.04-home --size 91G
# resize2fs /dev/VolGroup00/ubuntu-10.04-home
# e2fsck /dev/VolGroup00/ubuntu-10.04-home

Uncategorized

Comments (0)

Permalink

Firefox Wierdness

On Boon (Ubuntu 10.04 64), Firefox started behaving oddly two days ago. This is a new installation of Ubuntu, but it was originally working fine. The symptoms are:

  • Delicious add-on is missing from the main menu
  • Copy, Cut and Paste keyboard shortcuts don’t work
  • Tab doesn’t move between fields

I was all kinds of confused. Finding what happened took quite a long time. The first thing I noticed was the missing menu item. I use Delicious constantly and I’m keyboard biased, so this I noticed right away. After using the toolbar icon, I noticed none of my bookmarks were there. The other two symptoms I noticed shortly after. It was initially hard to believe what I was experiencing and didn’t put it together that these things were related. I tried tab in other applications and found that worked. That narrowed it down to a Firefox problem. A web search found a report of a problem with the Delicious add-on. There’s no fix yet, but the work arounds are to either disable the add-on or load an older version, which is what I did.

Uncategorized

Comments (0)

Permalink

Changing OS Name in Grub 2 Menu

Since upgrading Boon to Ubuntu 10.04, I’ve been running the new Grub 2 boot loader. It looks much like the old grub, but the configuration is very different. On installation, it found all the operating systems installed on Boon, including the Gateway recovery partition, which is labeled “Windows Vista (loader) (on /dev/sdb1)”. Unfortunately, the Vista installation was labeled “Windows Vista (loader) (on /dev/sdb2)”. Since sdb1 was listed first, my wife chose this and ended up very much not where she wanted to be.
With Grub 1 (a.k.a. Grub Legacy), I’d have edited the menu entry title in /boot/grub/menu.lst and been done with it. Now the configuration file is named /boot/grub/grub.cfg and warns “DO NOT EDIT THIS FILE.” No problem, but where am I supposed to make the change?
I started with the Ubuntu Wiki Grub 2 instructions. From there, I found out how grub.cfg is created and how to exclude entries or add custom ones, but nothing specifically about how to change the title of a menu entry. I suppose I could edit /etc/grub.d/30_os-prober manually, but with all this talk of Grub 2’s increased flexibility, I suspect there’s a better way.
Next, I checked out the Grub 2 Community Ubuntu Documentation. Not much there. Maybe I’m too optimistic, but I don’t see the average user editing shell scripts to change his boot menu. But it seems that’s what I have to do.
I want to preserve the original script and work with a copy:
sudo cp /etc/grub.d/30_os-prober /etc/grub.d/31_os-prober-custom
sudo chmod -x /etc/grub.d/30_os-prober
The mode change prevents the original from running and producing duplicate entries. Next, edit /etc/grub.d/31_os-prober-custom:
Find

  case ${BOOT} in
    chain)

and change the lines after that from:

      cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF

to:

      case ${DEVICE} in 
	/dev/sdb1)
        cat << EOF
menuentry "Gateway Recovery (on ${DEVICE})" {
EOF
	;;
	*)
        cat << EOF
menuentry "${LONGNAME} (on ${DEVICE})" {
EOF
        ;;
      esac

Of course, this is specific to my installation. What the code change does is alter the label for anything on /dev/sdb1 to "Gateway Recovery". Since there can be only one OS per partition and I'm not moving the recovery partition, this is fine.
To make the changes stick, run sudo update-grub.
BTW, if you're using an editor such as Emacs that makes backup copies, don't worry about the backups. update-grub is smart enough to exclude them. I mention this only because this was a problem with a script from an older distribution that handled events on my Laptop. Since the original script and the backup got run, closing the laptop lid caused two instances of the event to run. The laptop would hibernate, then when the lid was opened, it would wake up and immediately hibernate again.

Uncategorized

Comments (0)

Permalink

Starting Applications in Ubuntu on Log In

This morning I realized the first thing I do almost all the time when I log in to the laptop is open Firefox. I don’t do this on the desktop because I tend to do other work there. But on the laptop, it’s almost always checking mail or some other web browsing. In the past, I’ve set this up and always undid it, as frequently, this wasn’t what I logged in for and, in the past, waiting for the browser to load was an annoyance. However, machines are faster now and (on the laptop, at least) I’m spending more of my computer time on line. So let’s give it a shot again.
I hunted through the System -> Preferences menu and found Startup Applications. On the second tab, “Options”, there’s a button labeled “Remember Currently Running Application”. I pressed it, logged out and logged back in. No Firefox.
I don’t know why this didn’t work, and given that, I don’t know what that button’s supposed to do, but it appears that you’re supposed to add the application to the first tab “Startup Programs”. I added Firefox (/usr/bin/firefox). It was selected by default. Log out and log in, et viola, a browser window.

Uncategorized

Comments (0)

Permalink

Ubuntu 10.04 LTS Install on Boon

Boon (the desktop) is running Fedora 9, which is out of date. Ubuntu has been running nicely on the Thinkpad for some time, so I´d like to upgrade to that.

The first step is to take a look at the disk space for a place to put it. Luckily, I´ve got an old unused /boot partition, so I can use that. I’ve learned from past mistakes that sharing a boot partition between different distributions is a mistake. Thinking they’re upgrading, they tend to uninstall older kernels still being used.

I have Logical Volume Management installed to take advantage of flexible partitioning and drive striping. There’s enough space on the LVM for the new install, so that’s no problem.

I grabbed the Ubuntu 10.04 LTS Desktop ISO from Ubuntu.com and burned the CD. After booting the install disk, the installation can’t see the LVM. A quick check on-line turns up the problem. In order to use LVM, you need either the Alternate or Server install disks, which don’t have an install GUI. I burned the Alternate disk and started the install. I chose Ext4 journaling file systems for /, /boot, and /home and put Grub on the /boot partition /dev/sda3. Unfortunately, this isn’t the boot device for the drive, so I can’t run anything other than my old installations. I boot into the old Fedora installation and see where Grub was installed and update it. I hit another snag. Fedora 9 can’t read Ext4. Plan B is to boot the Ubuntu disc and run the rescue feature. This gives you a root prompt. I chose the new installation’s root as the root of my rescue session and manually mounted /boot. I ran grub-install /dev/sda (the current location of the boot loader) and rebooted.

Now I’ve got a running Ubuntu system and can boot the old Fedora 9 installation, too. The first log in takes a half minute to bring up my desktop. This is the same problem I had on the Thinkpad, so I know it’ll be fixed when the updates are applied. Soon the Update Manager pops up and does its thing. Problem solved.

Things I needed to install that didn’t come out of the box:
gkrellm for system monitor
emacs for text editing
startupmanager to edit Grub 2 configuration
gnucash for budgeting and banking
flashplugin-installer for Shockwave Flash plugin for Firefox

Uncategorized

Comments (0)

Permalink

Fedora 8 DVD Permissions

Although it’s horribly out of date, I’m running Fedora 8 on my backup server, Mothball. Since the DVD burner on my desktop machine, Boon, has flaked out and eats discs rather than burning them, I’ve been using the burner on Mothball. (BTW, never buy a refurbished computer. It’s nothing but hassle.)

The UDev rules on Mothball cause the DVDRW drive (/dev/sr1) to get permissions only writeable by root. This is how to fix that:

Edit /etc/udev/rules.d/50-udev-default.rules
Change the line:
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n"
to
SUBSYSTEM=="block", KERNEL=="sr[0-9]*", SYMLINK+="scd%n", MODE="0664"

udevtest /dev/sr1 can be used for testing your rules.
udevcontrol reload_rules will supposedly reload them, but my permissions didn’t change until I rebooted.

Uncategorized

Comments (0)

Permalink

Twitter Clients for Ubuntu

I’ve been using Twhirl from Seesmic as a Twitter client on Ubuntu 10.04. It works OK, but I’m not crazy about Adobe Air, on which it runs. Air, like the Flash plugin, doesn’t play nice with keyboard input. The last time I looked at Twitter clients, Twhirl was the best of the bunch, but it’s been a while. It’s time to see what’s out there now in the standard repositories.
In Synaptic, there’s gtwitter, twitux, qwit, gwibber, and choqok. There are a few others, such as the IM client Pidgin, that support Twitter, but I find generalized applications result in either a least-common denominator feature set, or “bent” interfaces.
So let’s take a look…

gtwitter: Found my Twitter account automatically, but only shows tweets from four of my follows. I’m immediately confused. Can’t find help of any kind. Next.

twitux: Also found my account and displayed tweets as expected. Keyboard navigation works. Moved to a tweet with a TwitPic and pressed enter. It offered to send a message to the author. Not wrong, but not what I expected either. Brought up help. There doesn’t seem to be a way to do anything other than tweet and DM. The web site says the current version is from January 25th, 2009. Oh, that’s not good.

qwit: I had to enter my Twitter account information, then I got a blank screen and had to press a “more” button to see tweets. Keyboard nav works. Hitting Enter on a URL (including TwitPic) in a tweet brings up the page in your browser. Hmm, when I first started, up and down moved the tweet list. Since tabbing to a URL, they don’t work. There are three icons on each tweet, for favorite, reply and retweet. Tab goes through all of them, plus the @ and URL references. Ugh. I think twitter.com is better. This is the 1.0 beta. The site says there’s a 1.1 beta, but that’s not in the repository.

gwibber: Oops, this is a social networking client. Well, I already installed it, so why not check it out. Menu start did nothing but run the CPU for a while. At the command line, I got a Python error dump. Next.

choqok: It’s a KDE app, and I’m running Gnome. Running at the command line brings up a pretty splash screen that doesn’t go away. I closed it and reran, then the app window showed up blank. I had to go to Settings/Configure ChoqoK to enter my account. Keyboard navigation is OK. And it shows twitpiks in line. Best of the bunch.

Update: After installing Ubuntu 10.04 LTS on my desktop, Gwibber was included and it runs fine. The interface looks nice, but lacks display of referenced photos like TweetPhoto and has an annoying habit of scrolling the display on update.

Uncategorized

Comments (0)

Permalink

Ubuntu 10.04 Panel Slow to Load

I noticed a few days ago that the Gnome Panel takes a long time to show up when I log in. It’s consistently about 25 seconds from the time the background and desktop icons show up until the top and bottom panels show up.
I’ve found a few references to this, but I’m not yet sure what the fix is.
http://ubuntuforums.org/showthread.php?t=1506942
http://ubuntuforums.org/showthread.php?t=1497083&highlight=panel+ages
Update: Twirl, an Adobe Air application now takes about 30 seconds to start.

I found some more clues related to IPv6. I vaguely remember a problem with this months (years?) ago on Fedora. The first relates to Firefox and the second is for the OS as a whole. I tried method 3 by adding a new entry to /boot/grub/menu.lst. No joy.

Update 25 July: This morning a raft of updates (163), including kernel 2.6.32-24, were available. After installing them, the panel loads normally again.

Uncategorized

Comments (0)

Permalink

Fingerprint Scanner with gnome-screensaver

The fingerprint scanner is working for everything in Ubuntu 10.04 except gnome-screensaver. I used these directions for enabling the fingerprint reader with screensaver.

I had to use udevadm trigger instead of udevtrigger and had to modify the steps at the end in the “not for Ubuntu Intrepid” section: The .thinkfinger.bir file is in my home directory. The ownership is me:root and permissions are 660.

Now it works, too (and the prompt changed to “Password or swipe finger”).

Uncategorized

Comments (0)

Permalink

Ubuntu 10.04 Thinkfinger Enter Key

Thinkfinger (fingerprint reader) is working on my Thinkpad T60 except I have to press the enter key after swiping. This is a recurring bug.
Fortunately, the bug has a fix listed from Martin Schwenke’s PPA (personal package archive).
To use install the fix:

  • sudo add-apt-repository ppa:martin-meltin/ppa
  • sudo apt-get update
  • sudo apt-get install \
    libpam-thinkfinger=0.3+r118-0ubuntu4ppamartinmeltin5 \
    libthinkfinger0=0.3+r118-0ubuntu4ppamartinmeltin5 \
    thinkfinger-tools=0.3+r118-0ubuntu4ppamartinmeltin5

Uncategorized

Comments (0)

Permalink