Showing posts with label configuration. Show all posts
Showing posts with label configuration. Show all posts

Tuesday, September 1, 2009

Configuring 64-bit Ubuntu 9.04 with Vista Dual-Boot

I had a Compaq CQ60-420US laptop. It had come with Vista pre-installed. I didn't like that, so I wiped it off. This led to a whole ordeal in trying to get the hard drive to work with WinXP, for which I had developed lots of tricks and tweaks. That effort ultimately failed, and I wound up with Vista back on the thing after all. I had wanted to get away from dual booting, but I still needed some flavor of Windows for the occasional hardware interaction, e.g., updating the BIOS and other firmware. So for now, I was going to leave Vista in place and set up a 64-bit Ubuntu 9.04 (Jaunty Jackalope) dual-boot with it. This post describes the process of setting up that dual boot. A review of some guides gave me the general impression that installing a Vista-Ubuntu dual boot was much like installing a WinXP-Ubuntu dual boot, unless you used the wubi alternative. The approach I took was as follows:

  1. With Vista already installed, insert the Ubuntu program CD, reboot, and go through the ordinary installation sequence. If you do nothing, the CD will pretty much take you right to the Install icon. If your BIOS isn't set to boot from CD before hard drive, hit F2 or Esc or Del or F8 or whatever key it is that gets you into your BIOS setup, promptly after the computer first starts up, and adjust the boot priority there.
  2. You may find that the bootable Gparted CD provides a clearer view of hard drive partitions than does the partitioner in the Ubuntu installer. If the partitioning step leaves you dazed and confused, you may want to back up, download Gparted, burn yourself a CD, boot with that first, set up your partitions as you like, and then come back into the Ubuntu installation process. Note: if you're going to run Windows in a virtual machine, you may want to give it an NTFS partition somewhere, so you have a place to store data. Windows can't read Linux (e.g., ext3) partitions.
  3. After the initial installation, make sure that Vista starts up OK. No point spending hours refining a system that isn't ready for prime time. Then restart and go into Ubuntu, and make various adjustments, including these: (a) Nautilus > View > Show Hidden Files. (b) Nautilus > Edit > Preferences > Behavior > Always open in browser windows.
  4. Go through the steps described in my previous post on configuring Ubuntu 9.04 (including comments). That post updates the first part of an earlier post on how to configure 9.04. After running updates, type "sudo gedit /boot/grub/menu.lst" and put # symbols in front of each line (i.e., older Ubuntu kernels) that you don't want to appear in the GRUB menu.
  5. Before continuing with items in that earlier post (as explained in more detail there), I initially thought that the next step would be to install and configure Thunderbird (just plain old thunderbird, not mozilla-thunderbird) and Lightning-extension via Synaptic. But then I decided I would just use web-based e-mail and calendaring (probably via Gmail) on the laptop, and would download and archive my e-mails solely on my desktop, thereby sparing the need to synchronize the two computers.
  6. Now refer back to the earlier post, to install programs that came via individual downloads rather than through Synaptic. For me, these included Google Desktop for Linux, Adobe Reader, and VMware Workstation 6.5.3.
  7. I installed .deb files by double-clicking on them in Nautilus, and .bin and .bundle files by running "chmod +x [filename]" and then "sudo ./[filename]." I didn't have any .tar.gz and .tar.bz2 files to install this time, but if I had, I would have moved them to my /home/[username] folder, navigated there in Terminal, and then used a tar unpack command (e.g., tar -vxf [or tar xvfz] filename.tar.gz, or tar xvf filename.tar, or tar yxf filename.tar.bz2).
  8. To install Google Earth, continuing to follow my previous notes, I typed two lines: "wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin" and then "sh GoogleEarthLinux.bin." This gave me a Google Earth installation, but with flickering and basically nonfunctioning display. I tried System > Administration > Update Manager, and at first that program assured me that my system was up-to-date; but when I made it check again, it reported errors related to Wine and Opera. I ignored these for now, since they did not seem relevant. People seemed to be experimenting with the flickering video problem in Google Earth. There was a relatively complex tutorial that apparently fixed it in some cases, at the risk of messing up the system. Choosing instead an easy fix that seemed to work for some, I went to System > Preferences > Appearance > Visual Effects and downgraded from Extra to Normal. That didn't help. Following another tip, I downgraded further, from Normal to None (i.e., no visual effects), and also turned off the Atmosphere feature in Google Earth (View > Atmosphere). That fixed it.
  9. To configure Firefox, I went to another computer and used the FEBE extension to make a full backup of that machine's Firefox installation. I copied the folder containing the FEBE backup to the target computer (i.e., the one where I've been doing all this installation stuff). I installed FEBE in Firefox on the target machine, restarted Firefox, started to watch the tutorial on restoring with FEBE, turned to the instructions on manually restoring with FEBE, and then took these steps on the target machine: Close Firefox. Go to the FEBE backup directory (i.e., the one where I put the FEBE backup folder that I copied over from the other computer). Copy its .fbu file (in my case, profileFx3{default}.fbu) and rename the copy as a .zip file. I called it FEBErestore.zip. Extract the contents of the .zip file (creating, in my case, a folder called FEBErestore). Move the contents of the FEBE restore folder to the Firefox profile folder, which I found in Nautilus at File System/home/ray/.mozilla/firefox/[random name].default. In my case, for example, I moved the contents of the FEBErestore folder to this .default folder. When it told me that a folder already exists, I said Merge All, and Replace All for the "file already exists" message. During this process, I got an "Error while copying 'febe.jar'" message. The details of the error said "Permission denied." I canceled and tried again as root (type "sudo nautilus" and then do the move in the Nautilus session that opens that way). That worked. Then I closed everything else and started Firefox and, yeah, it looked like all the extensions were there, configured and everything.
This was the extent of my Ubuntu configuration for now. During these processes, I came across some miscellaneous issues:
  • I wanted to change login passwords. This, I thought, would be under System > Administration but no, eventually I found it instead under Applications > Accessories. Double-clicking on that did not work; I had to right-click and choose Change Password; but then the password that I changed it to did not work for login. I thought the problem might be that I hit Enter instead of clicking on the button after doing the change; that is, possibly the default was Cancel rather than Change. I could not tell; neither button seemed to be highlighted by default. So then it turned out that I had changed the password to unlock the keyring, rather than the password to log in. It looked like I had changed that properly, second time around; but still no.
  • As in other Ubuntu installations, panels did not readily allow me to move icons to the locations I would designate. Sometimes they would not move; sometimes they would not go exactly where I indicated. On the bottom panel, for example, I could not rearrange them in the far right corner. It turned out to be easier to move things *out of* the corner (where the Windows system tray would be) than to move them *into* the corner. It turned out that I had to unlock every item that I wanted to drag another icon past. Tooltips came up, irritatingly enough, when I was trying to move icons, making it difficult to see what I was doing.
  • The bottom panel failed to show icons or buttons for my currently running programs. The solution was to right-click on the bottom panel, choose Add to Panel, and choose Window List. But then, on reboot, it did not work again. I fixed it by right-clicking on the end of the Window List item on the bottom panel and checking Lock to Panel.
  • When trying to view the contents of some hard drive partitions, such as a partition I called DATA, I got "Cannot mount volume. You are not privileged to mount the volume 'DATA'. Following my previous notes, in Terminal I typed "sudo mkdir /media/DATA," thinking that perhaps I had not yet created the mount point, but this gave me "cannot create directory `/media/DATA': File exists." I typed "sudo nautilus," went to File System > /media/DATA > right-click > Properties, and verified that I (i.e., user "ray", not just root) had full permissions. I typed "sudo fdisk -l" (that's an L, not a one) to get a list of devices. That showed that the DATA partition was being recognized as an NTFS device at /dev/sda4. I typed "sudo gedit /etc/fstab" and saw that there was no line in the fstab file for /dev/sda4. Following some notes from a few months earlier, I typed "sudo ntfs-config." (Note that this was one of the programs I had installed from Synaptic, above.) This detected the VISTA programs partition (i.e., drive C in Windows), but not the DATA partition. I ran ntfs-config again. This time, it didn't mention the VISTA drive, but as before it did give me the option to enable an internal drive. I accepted that. Now I saw that there was indeed a line for the DATA partition as well. While I was here, I used blkid to find the UUIDs for each partition (e.g., "sudo blkid") and replaced that portion of the relevant line in fstab. For example, the line that previously read "/dev/sda1 /media/VISTA ntfs-3g defaults,locale=en_US.UTF-8 0 0" now began with "UUID=19142FAA142F8D35" instead of "dev/sda1." Following the format of other lines in fstab, I preceded this one with a line that said, "# Entry for /dev/sda1 : " and followed a similar procedure for the DATA partition. I rebooted and was now able to view the NTFS-formatted VISTA and DATA partitions. On second thought, I went back into fstab and removed the line for the VISTA partition, since I didn't expect to need it normally in Ubuntu and didn't want to expose it to accidental deletions and such.
This seemed to give me a basic working dual-boot 64-bit system. The next step, for me, was to configure VMware, so that I could run any Windows program within Ubuntu.

Friday, May 8, 2009

Configuring 64-bit Ubuntu 9.04 (Jaunty Jackalope)

In a previous post, I described my experiences with upgrading from Ubuntu 8.10 to 9.04. The previous post also provides some cautionary notes on upgrading from the ext3 to ext4 filesystems. This post describes the process of configuring 9.04 from scratch, after downloading the ISO file and burning it to CD. (For future troubleshooting purposes, you may also want to download and burn the "alternate" ISO file.) The basic installation was pretty simple: insert the CD, boot the computer, and follow the instructions. The main exception was the partitioning step, especially if the machine had several partitions. I defer to other websites that provide details on the basic installation. In my first try, I started by installing and configuring Firefox extensions, but that was very time-consuming, so I decided to save that for later, in case I would have to re-do my installation. What had forced me to start over in my installation was related to compiz, so I decided to start there, this time, and make sure that part was OK before proceeding with the rest. The specific problem I had run into had come up when I was following the advice at 10 Tips for After You Install or Upgrade Ubuntu. The gist of it is that I tried installing fusion-icon, wound up with the black screen problem that lots of people seemed to be having, went through a whole hassle (documented elsewhere), and decided not to use fusion-icon. On my next try, I also decided not to use compiz, which was also causing unexpected behavior in my system. I also wasn't using wine. Therefore, the 10 Tips, modified for 9.04 and combined with some other tips, so as to do things in the best order, came out as follows:

System > Administration > Update Manager > Check. (This one would ideally be postponed until you've done a couple of these other steps, but it may insist upon being run early in the process, in which case you may want to repeat it later.) Install updates. Restart if advised, and then run Check again, until there's nothing left to update. Applications > Add/Remove > Show All Available Applications. Then search for "restricted extras." Check the box next to "Ubuntu restricted extras." Click Apply Changes > Apply. System > Administration > Hardware Drivers. I was using an nVidia graphics card, and here I saw that my system was not using nVidia drivers, and that I did have a couple options to choose from. I chose to activate the recommended driver. I had to reboot before it would take effect. System > Administration > Software Sources. Go to the Ubuntu Software tab > Download From > Other > Select Best Server > Choose Server. Also, go to the Third-Party Software tab and add other stable repositories. (On that webpage, under the "Install packages" heading, where it says "Display sources.list entries for" choose "The Jaunty Jackalope." Then copy the lines from the text box immediately below that heading. For instance, I copied and pasted these two lines, one at a time, into the dialog box that said,"Enter the complete APT line of the repository that you want to add as source":
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
deb-src http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu jaunty main
(Those are each one-line commands.) I had to click "Add" after each one in order to be able to install the next one. Then click Close. This called for a reload of current software information. If you don't get a "Reload" option when you click Close, go back into Third-Party Software and unclick and then re-click some item and try again.
Remove Partition Icons from Desktop. A mere tweak, but while we're doing the 10 Tips, it's easy. Alt-F2 > gconf-editor > Run > apps/nautilus/desktop. Unclick volumes_visible. Close the Configuration Editor. System > Administration > Synaptic Package Manager. Search for each of these items and mark for installation when it comes up: cups-pdf; firestarter; flashplugin-installer; gparted; ntfs-config; p7zip-full; pysdm; and sun-java6-jre. (If numerous items come up in response to your search, click on the Package heading to sort them alphabetically. Also install other related packages, if given the option.) Some of these may ask if you want to "Mark additional required changes?" Click "Mark" and go on to the next one. Then click Apply. (I initially installed, but decided not to keep, compizconfig-settings-manager and emerald. They appeared to be generating multiple problems for others and were not functioning well on my machine.) Some of these programs may already be shown as being installed on your system. If so, no problem.
Next, I closed that and ran Update Manager once more. I went to System > Administration > Firestarter to configure the Firestarter firewall. I had second thoughts after installing it; it seemed that some people had problems with it. It was also said to be a security risk -- something for special needs, not like a Windows firewall that would be highly recommended for general use. I thought about removing it via Synaptic or the command line, but it didn't seem to be bothering me now, so I let it alone.
Then it was time to install some Ubuntu programs that weren't available, or didn't install well, via Synaptic. Installing these called for use of Ubuntu's command line -- which, if you are an accurate typist, can be manageable. These programs were of two kinds. First, there was the previously downloaded program that was too big to download again unless necessary. An example of this was my copy of VMware Workstation 6.5, which was 340MB and had cost me $189.
Downloads typically came in some kind of compressed format, so I had to decompress them before I could use them. To decompress them, I had to run Ubuntu's Places > Computer menu pick. This opened File Browser, which worked like Windows Explorer. In File Browser, I navigated to the folder where I had saved my downloaded .bin file. File Browser's Location field gave me the path for this folder. I copied that path into Ubuntu's Terminal program (Applications > Accessories > Terminal). (If you're used to using Ctrl-C and Ctrl-V to copy and paste, you may have better luck by using the right-click options instead.) Once I was in the right folder in Terminal, I typed "cd [pathname]" which, in my case, was as follows:
cd "/media/CURRENT/Miscellany/Ubuntu Programs"
About quotation marks: in this post (indeed, in my posts generally), don't type them if they just bracket the command. In the previous sentence, for example, you would type the quotation marks in the indented command (i.e., cd "/media/CURRENT etc.), but not the quotation marks in the "cd [pathname]" example. I had to use quotation marks in the indented example because that pathname contains a space (between "Ubuntu" and "Programs"); this space would confuse the CD command otherwise.
At this point, in Terminal, I typed "sudo -i" so that I could execute commands as root (i.e., as administrator). Then the commands I used to decompress these files were as follows:
BIN Files. (The example used here is GoogleEarthLinux.bin, although this program is regularly updated and not that big, and is therefore better installed by a different method that brings you the current version, as described below.) For BIN files, I used this procedure: (1) Type "chmod +x" followed by the .bin filename. Example: chmod +x GoogleEarthLinux.bin. (2) Type "./" followed immediately by the .bin filename. Example: ./GoogleEarthLinux.bin. (If "./" doesn't work, try "sh" -- with no space after ./ but a space after sh). (3) Designate "/home/ray" (with your own username in place of ray) as the installation directory.
BUNDLE Files. Same steps as BIN files.
DEB Files. Right-click on the filename and use GDebi. Click on its "Install Package" button. It seems to know already where it wants to install the files -- not necessarily in or under the directory where the .deb file itself is located.
TAR Files. To install a TAR.GZ file: Copy to /home/ray (replacing "ray" with your username), navigate there in Terminal, and then use this command format: tar -vxf filename.tar.gz (or possibly tar xvfz instead). To uncompress the files (or to get the files out of a tarball), use this format: tar xvf filename.tar. If you have a .tar.bz2 file, use this format: tar yxf filename.tar.bz2.
To install Google Earth, I didn't use a previous download (see above). Instead, I typed this:
wget http://dl.google.com/earth/client/current/GoogleEarthLinux.bin
sh GoogleEarthLinux.bin
(That "wget" is supposed to be on the same line as the URL that follows it.)
I got an error message when I tried to start Google Earth:
Google Earth detected an error while trying to authenticate. Please check the following:
- your network connection (can you get to www.google.com?) - your firewall settings (are you blocking /opt/google-earth/googleearth-bin?) Error code: 29 For more information, visit: http://earth.google.com/support/bin/answer.py?answer=20717hl=en
That link didn't work for me. I did find advice to rename the libcrypto.so.0.9.8 file in the google-earth directory (which, by default, was /opt/google-earth) to something else, but that didn't solve the problem this time, so I changed it back to its original name. The solution, for me, was to type "sudo apt-get install lib32nss-mdns." The other problem was that I had to replace the entries in My Places in Google Earth; the ones that I had previously installed (which were still visible after the reinstallation) would cause the program to crash.
Next program: Firefox. Firefox was included with Ubuntu. Updating it depended on the situation. On one machine, I had wiped the partition and was installing Ubuntu from scratch. In that case, I had to fiddle with Firefox extensions. Before wiping and reinstalling, though, I had previously installed the InfoLister extension. This add-on had created an HTML file listing my currently installed extensions. I had kept a copy of that HTML file, and now I opened it. Although the HTML file contained links directly to webpages containing information and downloads for the various extensions, I had found that the fastest way to reinstall these extensions was just to open the Mozilla addons webpage and search for and install them one at a time. (It was not necessary to restart Firefox each time I marked an addon for installation.) I also went to the Categories > Plugins webpage, there at Mozilla, and downloaded the latest versions of the plugins I thought I would be needing. To get YouTube and other videos to play, I tried the alpha version of 64-bit Adobe Flash Player 10. One addon (Snap Links Plus) was available only in a manually installed .xpi form, so I went into Firefox and chose File > Open File and indicated that one for installation. To see what plugins I had installed, I typed "about:plugins" in the Firefox address bar (also accessible by Ctrl-L). I also had to configure the Preferences for a number of add-ons individually (Firefox Tools > Addons). On another computer, by contrast, I was installing Ubuntu 9.04 on top of 8.04, without first reformatting the partition. This kept a bunch of the things I had already installed, including my Firefox extensions. Some were not compatible with 9.04, but otherwise Firefox seemed to run pretty well.
Next, I wanted to make some adjustments to the system. First, I didn't want all those various prior Ubuntu kernels to be listed in the GRUB menu at startup. To edit this, I typed "sudo gedit /boot/grub/menu.lst" and put # symbols in front of each line that I didn't want to appear in the GRUB menu.
I also wanted Ubuntu to mount NTFS drives automatically at bootup. This involved a fair amount of screwing around, on the system where I had installed Ubuntu 9.04 without first uninstalling or formatting the partition where 8.04 was installed. I have detailed those efforts in a separate post.
That was pretty much it, for the update installation -- the one where I installed 9.04 on top of 8.04. For the installation from scratch, I had some additional problems. Here are some brief notes on those:
My dual-boot system was screwed up. When I booted, I got GRUB Error 12. The solution was to remove "makeactive" from the Windows XP entry in /boot/grub/menu.lst, and use GParted to give WinXP the boot flag.
If you may be rearranging your drive partitions (e.g., swapping hard drives), you may want to change the partition references in fstab to refer to UUIDs (which stay with the partition) rather than partition numbers (e.g., sda1) which will change when you rearrange partitions. To do this, open gparted (System > Administration > Partition Editor). Then, in Terminal, type "sudo blkid" to get UUID information for each drive. Type "sudo gedit /etc/fstab" to edit the fstab file. Change each line in fstab that refers to a fixed location, so that it refers to the device's UUID instead. For example, if fstab contains a line that begins with "/dev/sda5" and if blkid tells you that the UUID for that device is 500D33F91G01, then you might want to move the /dev/sda5 to a previous line as a comment, and replace it with the UUID. (Everything after the /dev/sda5 on that line would remain unchanged.) So the line that used to read like this:
/dev/sdaa5 /media/DRIVENAME ntfs-3g [etc.] might now look like this: # Entry for /dev/sdaa5 : UUID=500D33F91G01 /media/DRIVENAME ntfs-3g [etc.] Next: in Nautilus (i.e., File Browser), go to Edit > Preferences > Behavior and make sure the "Always open in browser windows" box is checked. I found a solution to a networking problem in which Ubuntu was unable to connect to the Internet. In one of my installation attempts, I also had to fix a keyboard problem. The solution was to use an alternate keymap code. Although I didn't actually use it, I got a tip that said I could designate programs to open automatically at startup by selecting System > Preferences > Sessions. In response to error: "Unable to lock the download directory," use "sudo pkill apt" OR "sudo killall dpkg."
There's no limit to the number of other things that can be installed and other tweaks that can be made. But the next big step, for me, was installing VMware.