Showing posts sorted by relevance for query ubuntu. Sort by date Show all posts
Showing posts sorted by relevance for query ubuntu. Sort by date Show all posts

Thursday, May 13, 2010

Ubuntu 10.04 Adjustments: Software Source List

I was making some adjustments to my Ubuntu 10.04 (Lucid Lynx) installation.  I got kind of bogged down in the Software Sources.  This post describes that part of the enterprise.

When I went into Software Sources > Other Software, I now had a whole boatload of items, most of which were marked "disabled on upgrade to lucid."  To handle this, I tried Ubuntu Tweak.  It was an easy download, double-click to install.  I went into Applications > System Tools to run it.  Then I went down the list of applications and other items on the left side of its window and selected and adjusted them to taste.  I found that I had to exit Ubuntu Tweak and start it again in order to get the prompt that would re-enable my disabled Software Sources.

In Software Sources > Other Software, I noticed several things that didn't look quite right.  First, the "Cdrom with Ubuntu 9.10 'Karmic Koala'" was unchecked.  This made sense; I wasn't running 9.10 anymore.  I selected that item and clicked Remove.  I thought I'd put the new CD in its place.  I had installed 10.04 via download, not via CD, but in the process of fixing the installation I had downloaded and burned the alternate installation CD.  So now I put that into the CD drive and clicked on Add CD-ROM.  It gave me this:
Upgrade volume detected
A distribution volume with software packages has been detected.
Would you like to try to upgrade from it automatically?
It looked like the answer to that should be no, so I clicked Cancel.  Then I had another error:
Error scanning the CD
E:Unable to locate any package files, perhaps this is not a Debian disc or the wrong architecture?
Apparently the Alternative CD was more different from the ordinary Ubuntu CD than I had realized.  I was curious, so I downloaded and burned the official 10.04 CD.  While that was underway, I went to the next problem item on the Software Sources list:  “Unsupported updates.”  The common advice, repeated on a number of websites that seemed to have copied it from one another, was that this would give me programs that I “probably don’t need or even want.”  Au contraire, I was thinking that a person would enable this kind of source to get access to solutions to new problems as soon as they were discovered.  But for purposes of stability, for now, until I needed them, I decided to go with the flow and leave them unchecked.

Next, I saw that some items were marked as "disabled on upgrade to lucid."  According to TualatriX, Ubuntu Tweak > Applications > Source Center would enable only those that supported Lucid.  I’m not sure what happened to this particular category of problem; I played around with a couple of things and these went away.  Next, some of the titles were not right.  In particular, I saw this:
Medibuntu – Ubuntu 9.10 “karmic koala” (http://packages.medibuntu.org/ lucid free non-free)
I didn’t seem to find advice on exactly this problem, so I just selected that item in Software Sources, clicked Edit, and changed the Comment to “Medibuntu – Ubuntu 10.04 ‘lucid lynx.’”  These tinkerings led me to the revelations that “Mixing repositories can break your system,” and that I should have made a backup of my list of sources before I started fooling around.  The backup, it seemed, could be made with this command:
sudo cp -i /etc/apt/sources.list /etc/apt/sources.list_backup
This made me think that I could work up a good source list once and then not have to start from scratch like this in the future.  I had already modified the sources list in Ubuntu Tweak, but now I thought I might want to start over.  I got out of Software Sources and typed “sudo gedit /etc/apt/sources.list” in Terminal.  I copied the sources.list file suggested in the Ubuntu Guide wiki and used that to replace the contents of sources.list.  The two were pretty much the same anyway, but I thought this might clean things up a bit.  I saved and exited sources.list and went back into Software Sources.  Oddly, it still had some of the items that I had added in Ubuntu Tweak.  I went back into sources.list and, no, those other items (e.g., Skype) had definitely not been added to sources.list when I wasn’t looking.  Evidently Ubuntu Tweak was maintaining its own list of software sources and was using that to supplement whatever was in sources.list.  In Software Sources, I cleaned up the list (added comments, deleted duplicates) and then clicked Close.  It gave me the option to Reload, which I did.  Now I got an error message:
Could not download all repository indexes
The repository may no longer be available or could not be contacted because of network problems.
This applied to the CD-ROM line I had copied over from the wiki.  I closed that dialog.  The CD ISO was still downloading, so I couldn’t do anything more about that yet.  In the meantime, I went back into Ubuntu Tweak > Source Center > All Categories > Unlock.  Sources that I had selected previously were still checked, so UT did seem to be saving its own list somewhere.  I refreshed, got the CD-ROM error message again, closed that, installed new applications implied by my selection of sources, and then exited.  Trying another approach, I went to the Ubuntu Sources List Generator and selected all of the repositories I would want.  I excluded source code repositories, since I did not plan to be working with source code.  I clicked “Generate List.”  It gave me a replacement sources.list file, plus a list of commands to run to get the keys necessary to make the sources work; but it also looked like those commands were listed in the comments in the sources.list file too.  I looked again at Ubuntu Tweak.  It had a much longer list of sources, but I thought I could probably do without some.  In particular, I didn’t know if I needed a source just for some individual programs.  One, "déjà vu dup," was supposed to be a simple backup utility.  It was listed in Synaptic and would presumably be updated through there.  I hadn’t used it before, but I thought I would give it a try.  Likewise for Firefox, Opera, Shutter, deluge-torrent, and others.  The list generated by Ubuntu Sources List Generator did include Google, Medibuntu, and other major sources.  So I unchecked all of the sources in Ubuntu Tweak, including the Ubuntu Tweak source itself.  Then I took another look at sources.list, in the form I had copied from the wiki.  It was much more verbose than the one generated by the Ubuntu Sources List Generator, and now that I understood more about it, I didn’t want all those extra comments.  In the end, I decided that all I needed from the sources.list file that I had copied from the wiki was the first line, referring to the Ubuntu 10.04 CD-ROM.  So I replaced the existing sources.list with this one, provided by the List Generator:

#############################################################
################### OFFICIAL UBUNTU REPOS ###################
#############################################################

deb cdrom:[Ubuntu 10.04 LTS _Lucid Lynx_ - Release i386 (20100429)]/ lucid main restricted

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse 
deb http://us.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu lucid partner
deb-src http://archive.canonical.com/ubuntu lucid partner

##############################################################
##################### UNOFFICIAL  REPOS ######################
##############################################################

###### 3rd Party Binary Repos

#### GetDeb - http://www.getdeb.net
## Run this command: wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
deb http://archive.getdeb.net/ubuntu lucid-getdeb apps

#### Google Linux Software Repositories - http://www.google.com/linuxrepositories/index.html
## Run this command: wget -q https://dl-ssl.google.com/linux/linux_signing_key.pub -O- | sudo apt-key add -
deb http://dl.google.com/linux/deb/ stable non-free

#### HandBrake - http://handbrake.fr/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 62D38753
deb http://ppa.launchpad.net/handbrake-ubuntu/ppa/ubuntu lucid main 

#### Medibuntu - http://www.medibuntu.org/ 
## Run this command: sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update 
deb http://packages.medibuntu.org/ lucid free non-free 

#### Mendeley Desktop - http://www.mendeley.com/
## Run this command: no gpg keys supplied
deb http://www.mendeley.com/repositories/xUbuntu_10.04 /

#### muCommander - http://www.mucommander.com/
## Run this command: sudo wget -O - http://apt.mucommander.com/apt.key | sudo apt-key add - 
deb http://apt.mucommander.com stable main non-free contrib  

#### Ubuntu Tweak - http://ubuntu-tweak.com/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0624A220
deb http://ppa.launchpad.net/tualatrix/ubuntu lucid main

#### Wine - https://launchpad.net/~ubuntu-wine/+archive/ppa/
## Run this command:  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9CB8DB0
deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu lucid main

#### X Updates - https://launchpad.net/~ubuntu-x-swat/+archive/x-updates/
## Run this command: sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys AF1CDFA9
deb http://ppa.launchpad.net/ubuntu-x-swat/x-updates/ubuntu lucid main 

With that as my new sources.list file, I went back into Software Sources.  The entries that had been added previously were still there, along with the new ones listed in my new sources.list file.  I deleted the old ones and closed.  It asked if it should reload, and I said yes.  It said, "Could not download all repository indexes," because I had not yet entered the commands shown in the sources.list (above).  So I entered them, one at a time.  Some just gave me OK; some gave me other messages and then OK; some seemed to have problems.  I went to System > Administration > Update Manager and updated programs.    When it was done, I clicked the Check button.  It again said "Could not download all repository indexes" and "Please use apt-cdrom to make this CD-ROM recognized by APT."  It also said, "Some index files failed to download, they have been ignored, or old ones used instead."  For the CD-ROM, I went into System > Administration > Software Sources > Other Software and clicked the Add CD-ROM button.  I inserted the CD.  It said, "A volume with software packages has been detected."  I didn't want to install anything from the CD-ROM now, so I canceled out of that.  When I clicked Close, I was again given an opportunity to Reload, which I took.  I clicked Check again in Update Manager.  That was apparently the only thing I had needed to fix; there were no errors now.  Back in Software Sources, I saw that I had two entries for the CD-ROM.  I looked again at sources.list.  It had added a duplicate of the CD-ROM line, but it put it as the very first line, not lower down under the "OFFICIAL UBUNTU REPOS" heading as shown above.  So I deleted the one (under that heading), saved sources.list, and took another look in Software Sources.  There was now just one CD-ROM.  I made a trivial change and tried to close; I took the Reload option; all was good.  I saved a copy of the revised sources.list file, for use in this or other computers.  It was time to return to the main project of updating Ubuntu 10.04.

Thursday, June 10, 2010

Using Ubuntu Linux Tools on a Windows Machine

I was using Windows XP SP3 on one machine and Ubuntu 10.04 (Lucid Lynx) on another.  There were times when I found that Ubuntu (my preferred version of the Linux operating system) could do things that Windows could not.  For example, Ubuntu was much faster and cleaner at moving large numbers of files from one folder to another.  It could also delete files and folders that Windows said could not be deleted.  So I wondered if there was a way to use Ubuntu tools on a Windows installation.  This post discusses that question.

One solution that I already knew about was to set up a dual-boot machine, with Windows XP and Ubuntu coexisting side-by-side.  If you wanted to do something in Ubuntu, you could just shut down Windows and reboot into Ubunt.  This wasn't always the world's most convenient approach.

Another solution that I was currently using was to use both of them together via virtualization.  The virtualization tool I had been using was VMware Workstation.  The way it worked for me was that I installed Ubuntu as my base layer, installed VMware Workstation in Ubuntu, and then installed Windows XP in a virtual (i.e., make-believe) "computer" inside Workstation.  So if I was working in Windows and had something I wanted to do in Ubuntu, I could just go out of the Windows virtual machine for a moment, do my thing in Ubuntu, and then resume work in Windows.  I have written lots of posts on this combination.

A different approach, for those who didn't mind rebooting and didn't want to install Ubuntu or VMware on their Windows machines, was to use an Ubuntu Live CD.  In this approach, you wouldn't reboot into an Ubuntu installation that was already present on your hard drive; you would reboot into an Ubuntu installation that was self-contained on a CD.  The CD image was free, and could easily be downloaded and burned to a CD.  It would be necessary to adjust the BIOS settings (typically, by hitting Del or perhaps F2 while the computer was booting) so as to set the CD (or DVD) drive to be the first in the boot sequence, so that the computer would try to boot from a CD (if you had inserted one into the computer) before moving on to the option of booting from your Windows installation on the hard drive.  Assuming your computer supported it (and most did, by this point), it was also possible to boot Ubuntu from a USB drive instead of a CD.

Those approaches were all familiar to me.  Two other approaches or variations were not.  The first was to use an Ubuntu live CD or USB stick, but to customize it to include Ubuntu programs that were not included on the standard Live CD.  Among the various ways of doing this, two that seemed to draw frequent attention were Reconstructor and Remastersys.  A recent post made it sound like Reconstructor was especially easy to use.  Among other possibilities, these tools would apparently allow the user to create a bootable CD or USB stick that would contain the user's own customized Ubuntu installation.

There seemed to be an endless number of variations and possibilities, some of which would require a lot of work and/or would not work well.  The last one mentioned here involved running Ubuntu, or something like it, on a Windows installation.  In essence, Ubuntu in this approach would function like just another Windows application.  As such, it would tend to be limited by the things that Windows could do.  Portable Ubuntu Tres was a recent example of this approach.

These possible approaches suggested two steps I could take, as described in more detail in separate posts.  One was to update my knowledge of virtualization alternatives to VMware Workstation.  It had been a year since I had last reviewed that topic, and I did not know whether there had perhaps been developments that would give me a superior alternative to VMware.  The other was to try my hand at burning a custom live Ubuntu DVD via Reconstructor or Remastersys.

Sunday, July 11, 2010

Ubuntu 10.04: Problems with Update Manager and Software Sources

As described elsewhere, I was in the process of upgrading from Ubuntu 9.10 to 10.04 (Lucid Lynx).  I went into System > Administration > Update Manager.  At first, the system reported that I was up to date, as it often would do even when the system was terribly out of date.  I clicked Check and wound up with a message indicating that there was a problem with a repository.  I looked into System > Administration > Software Sources > Other Software.  The error message didn't make sense in light of what I saw there.  I tried Update Manager again.  This time it worked:  it was ready to install a bunch of updates for 9.10.  I skipped that and instead told it to upgrade the system to 10.04.  It did.

I ran Update Manager again, just to be sure.  Now I got the repository error message mentioned above.  It said this:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/Release.gpg.  Could not resolve 'us.archive.ubuntu.com'
There were a bunch of other, similar messages after that one, referring to other "Failed to fetch" problems.  I closed Update Manager and went into Software Sources, to see what this was about.  The sources listed there did not make sense, given that System > About Ubuntu reported that I was indeed running 10.04.  I checked them all -- the 9.10 CDROM, two "Unsupported updates" entries, and the http://archive.canonical.com/update karmic entries.  I went through the other tabs in Software Sources, while I was there, and made a few other changes, and then closed out.  It checked for updates and again gave me an error:
Could not download all repository indexes
The repository may no longer be available or could not be contacted because of network problems . . . .
followed by similar "Failed to fetch" messages, e.g., "Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/lucid/main/i18n/Translate-en_US.bz2 Connection failed."  Before attacking that, I decided to take care of the next of my previous posts on the whole upgrade and tweaking process.  This post had to do with installing a PAE kernel to take advantage of all of my RAM.  This was just a matter of searching for PAE in Synaptic and selecting and installing linux-generic-pae and linux-headers-generic-pae.  But that process failed with, again, some "Failed to fetch" messages.  This time, though, the messages said something about "Got a single header line over 360 chars" and "Bad header line."

So, OK, I was going to have to fix this repository problem before going any further.  I ran a search and came up with Salamane Moustapha's To-Do List After Installing Ubuntu 9.10.  The first thing on his list was to expand the software repository list.  That was actually the very next thing in my own sequence of previous posts, so I went to that one.  It called for installing Ubuntu Tweak, which I had already downloaded, and then running it from Applications > System Tools.  I went down the list in Ubuntu Tweak, making various adjustments.  When I got to the Source Center option, there were no sources listed.  This was no surprise; I had removed all those old ones from Software Sources, and now there was nothing left.  I moved on to the next Ubuntu Tweak item, Source Editor, and here I saw a number of repositories listed.  These seemed to be the ones actually active on my system at this point, as represented by the Ubuntu Software tab in Software Sources.  So far, in other words, Ubuntu Tweak was not solving all of my problems.  The only other things I changed in Ubuntu Tweak at this point were under Default Folder Locations, Manage Scripts, and Nautilus Settings.

Moustapha's To-Do List gave me a large set of repositories.  I was going to follow his instructions and just replace my sources.list with his.  His list was for Ubuntu 9.10, so I figured I would wind up deleting or modifying some from his list.  Then I rediscovered the Ubuntu Sources List Generator, and used that instead.  I didn't select any source code items, and in the Third Parties list I only chose GetDeb, Google Linux Software Repositories, MediaInfo, Medibuntu, Themes, Wine, and X Updates.  There were lots of other interesting programs there, but I thought it might be simpler to just install them via Synaptic as I needed them.  I clicked "Generate List."  Then, in Terminal, I typed "sudo gedit /etc/apt/sources.list."  I deleted its contents and copied their generated list over into it.  I saved and closed that and then copied and pasted, into Terminal, their supplied list of commands to get keys.  The first one, for GetDeb, produced an error:  "gpg: no valid OpenPGP data found."  The solution there was to execute the command with "sudo" in front; so I typed "sudo -i" to eliminate further recurrences of that problem in this session.  The next command provided by the Ubuntu Sources List Generator was "sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F9D8BC54."  This one produced these errors:
gpgkeys: HTTP fetch error 7:  couldn't connect to host
gpg: no valid OpenPGP data found.
A search for that specific key number (F9D8BC54) turned up nothing.  I skipped that command for the moment and went on to the next.  This one was for Medibuntu.  It gave me five error messages.  One was for medibuntu itself, and it went like this:
W: GPG error: http://packages.medibuntu.org/ lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EBC26B60C5A2783
The other four were of the same form, but they referred to http://ppa.launchpad.net/ and their public keys were 61260473F9D8BC54 (see above), 6E871C4A881574DE, 5A9A06AEF9CB8DB0, and 3B22AB97AF1CDFA9.  These four (but not the Medibuntu one) repeated again at the end of the installation.  Despite these errors, I ran the next command.  This one referred to key 881574DE, which seeems to have been one of the several just listed.  It seemed that maybe the Ubuntu Sources List Generator had gotten things out of order -- that perhaps I should have run this key request first.  But no, it gave me the same error messages as above, regarding HTTP fetch error 7 and no valid OpenPGP data.  Same thing for the final two commands supplied by the Ubuntu Sources List Generator, regarding keys F9CB8DB0 and AF1CDFA9.  Searches for these led to the suggestion to use this command (inserting, here, the full numbers from above):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2EBC26B60C5A2783 61260473F9D8BC54 6E871C4A881574DE 5A9A06AEF9CB8DB0 3B22AB97AF1CDFA9
But this still gave me the "HTTP fetch error 7."  A post from Oscar said that, in his case, the desired repository had been installed nonetheless.  In Software Sources > Authentication tab, I saw that I had keys for GetDeb, Google, and Medibuntu, from those that I had requested, along with Ubuntu Archive, Ubuntu CD Image, and Launchpad PPA, which came first in the list and which, I guessed, had been there before I made this request.  So the Authentication tab was not telling me that the others had been installed.  But Software Sources > Other Software did list them all, so in that sense I did seem to have added them successfully.  I posted a question on this and let the matter sit.  I went back to Update Manager, and this time it ran OK.  I ran it again, but unfortunately this time I got "the public key is not available" error messages for those same items again.  So I had not solved that problem.  I did not proceed further with this effort.  Instead, this and other problems prompted me to reinstall Ubuntu 10.04 from scratch.

Tuesday, September 23, 2008

Ubuntu, GRUB, and Acronis True Image: Restoring

I was in the process of working through my Ubuntu and Windows XP dual boot installation, when I encountered a problem that probably most dual-booters encounter: the periodic need to replace a confused WinXP installation with a fresh new one had incidentally messed up my GRUB bootloader, so that I could no longer choose to boot into Ubuntu Linux. This post describes the steps I took to solve that problem, and concludes with what I learned from the effort. I had resolved this problem once before. I looked at my previous notes and saw that apparently I had used the Super Grub Disk (SGD) to solve this problem. Attempting to recreate that solution, I booted my copy of the SGD and selected Boot & Tools. That didn't seem to have what I needed, so I went back and chose Advanced > GRUB > Restore GRUB in Hard Disk (MBR). That seemed to be the place. On one of its pages, it said this:

Example: ======== Has Windows rewriten your MBR? Now you will be able to boot your Gnu/Linux AFTER rebooting from Grub Super Disk.
(The typographical error was theirs, not mine.) I hit Enter and then chose the recommended Automatically Install option. This resulted in a message that looked like one that had flashed past me when the SGD was booting. Here, it said,
Booting 'trying /grub/stage1' findf /grub/stage1 Error 15: File not found Booting 'trying /boot/grub/stage1'
and so forth. It said it was running "setup (hd0)" and then "Checking if [various boot grub stages] exists . . . yes" and then running stages 1.5 and 1, and finally "SGD as succeeded!" I hit Enter again and then kept selecting SGD's "Go back" options until I got options to Quit and then "Reboot P.C." But no, it actually hadn't succeeded. On reboot, the machine again defaulted automatically to Windows. I rebooted, to watch more carefully and see if I had missed an option. Nope. It just went straight to Windows. I found a How-To Geek webpage with instructions on how to reinstall GRUB after a Windows reinstallation wipes it out. It said to boot from the Linux live CD (i.e., the one I installed from). This meant choosing the option that said, "Try Ubuntu without any change to your computer." Before I could proceed with the next steps, I had to figure out where I had installed GRUB during the Ubuntu installation. One thread said that operating systems tend to put it on the first partition of the first hard drive by default. I didn't recall putting it anywhere else. I guessed this must have been one of those options for which I accepted the default value. So I could proceed with the How-To steps without change. The recommended next steps, then, were to type these lines in Ubuntu's Applications > Accessories > Terminal:
sudo grub root (hd0,0) setup (hd0) exit
and then reboot. I started doing that, but when I typed "setup (hd0)," I got "Error 17: Cannot mount selected partition." I typed "exit" and got "Error 27: Unrecognized command." The correct command, I eventually figured out, was actually "quit," not "exit." Next, I went into System > Administration > Partition Editor. There, I was reminded that Ubuntu (or at least Gparted) referred to partitions as sd, not hd, and I also saw that Windows was installed at /dev/sdc1 and Ubuntu was at /dev/sda6. Another advisor seemed to confirm my understanding that these would be translated as hd2,0 and hd0,5. That is, you change sd to hd and then, starting with 0 in both cases, you assign a number to the letter (a = 0, b = 1, etc.) and a number to the number (1 = 0, 2 = 1, etc.). But this didn't tell me where GRUB had been installed, and I wasn't seeing any clarification on that in the several threads I examined. The error messages had indicated that GRUB could not mount hd0, so maybe that meant it wasn't on the drive where Ubuntu was installed. So, OK, I tried the foregoing sequence of commands again, this time focusing on hd2,0, where Windows was installed. When I typed "setup (hd2)," again I got "Cannot mount selected partition." I then realized that, the first time, I had indicated "root (hd0,0)" whereas I had just figured out that Ubuntu was at hd0,5. So I tried again, and this time the results were different. What I typed was this:
sudo grub root (hd0,5) setup (hd0)
When I typed that, it gave me the same sequence of notes as SGD had given me, above. That is, it said, "Checking if [various stages] exists . . . yes," and it ended with "succeeded" and then "Done." So I typed "quit" and rebooted without the Ubuntu live CD. But, dammit! Still no GRUB menu. I found a Fedora thread that recommended steps to take if you were using Vista instead of WinXP and if you wanted to use the Windows boot loader instead of GRUB. That seemed a little bit removed from my situation, so I went to the next post, which provided a solution for those using Gentoo Linux. Another post translated that one, somewhat, into Ubuntu terms. The core of those instructions seemed to be this: (1) Boot with the live CD. (2) Delete the Stage 1.5 files. (3) Reinstall GRUB. To do step (2), in more detail, I went to Terminal and typed "sudo -i" and then nautilus. In File Browser (i.e., Nautilus), I navigated to "36.7 GB Media," which seemed to represent the hard drive where I had installed Ubuntu. Once there, I went into boot > grub. There, I selected all files with stage1_5 in their names, and deleted them. Then, in that same folder -- moving on to step (3), here -- I opened menu.lst and searched for "(hd" (without the quotation marks, but with the opening parenthesis) to find the places where there might be a hard drive command. Not counting the commented lines (i.e., those beginning with the # symbol), there seemed to be a section that designated the Debian (i.e., Ubuntu) GRUB menu items and another section for the Other (i.e., Windows) menu items. I wasn't going to change the ones for Windows, so I focused on the Ubuntu part. It said, in several places, that root was at (hd1,5). Using the approach described above, I translated that as sdb6. I went to System > Administration > Partition Editor and observed that sdb6 did not exist on my system. So there, it seemed, was a problem. As noted above, the Ubuntu location was supposed to be sda6, i.e., hd0,5. Not hd1,5. But I wasn't even getting the GRUB menu, so I thought the advice was probably correct as far as it went: I still needed to reinstall GRUB. The advice seemed to be that this menu.lst file gave me the information I needed for that purpose: it said that GRUB was installed at hd1,5. So I should have typed hd1,5 instead of hd0,5 in the sequence of commands described above. But that made no sense, because there was no such thing as hd1,5. I decided to stick with the installation I had apparently already done at hd0,5, and change those three root references in menu.lst to hd0,5 instead of hd1,5. While I was at it -- relying, again, on the information found in GParted -- I changed the root reference in the Windows part of menu.lst from hd1,0 to hd2,0, because that (i.e., sdc1) was where my Windows program files were installed. In other words, I was basically banking on the theory that what I needed to do, besides deleting the Stage 1.5 files and reinstalling GRUB, was to correct erroneous references in menu.lst. Then I saved menu.lst and told the Ubuntu CD that I wanted to restart the computer. The machine started to shut down, but then just died at a black screen with a flashing cursor. Weird. I tried to remove the Ubuntu CD, but it wouldn't come out. I punched the reset button and removed it. Still no GRUB menu; the machine booted straight to Windows again. I rebooted with the Ubuntu CD. It occurred to me that the computer was automatically looking at the Windows installation, and that that's where I should be installing GRUB. So I went back into Terminal and tried this sequence:
sudo grub root (hd2,0) setup (hd2)
That gave me Error 17 again, "Cannot mount selected partition." So, OK, by this point I was really mixed up. What if I left root (hd2,0) as it was (not knowing what this command achieved) and tried again with setup (hd0), as someone else had supposedly done? But no, that got Error 17 too. Root (hd0,5) and setup (hd0) was the only combination that seemed to work. I looked at menu.lst again and didn't see anything else to change. I tried rebooting again without the Ubuntu CD. This time, the reboot went normally, without freezing up; but it still went immediately to Windows. I needed different advice. I found some Ubuntu documentation that addressed several different scenarios. The first steps were -- you guessed it -- boot with the Ubuntu live CD, go into Terminal, and type "sudo grub." This time, though, before going on to type the root and setup lines, they had me type "find /boot/grub/stage1." The answer that came back was hd0,5. I was instructed to type this (as I had already done) in the root command, so I entered "root (hd0,5)" and then "setup (hd0)." Then I quit and rebooted. As expected, I got the same outcome as before: booted straight into Windows. I restarted the computer. But when I rebooted with the Ubuntu CD this time, after choosing the "Try Ubuntu" option, I got billions of error messages. They were zipping by too quickly to read, but the basic idea was like this:
[ 256.923837] SQUASHFS error: Unable to read page, block 250ab9de, size d104
Something like that, anyway. I found a thread that went through various possibilities; their basic idea was that the CD or the CD drive was screwed up. But I didn't pursue that because, meanwhile, I punched the reset button and tried again. This time, no problem: the CD booted Ubuntu. I went ahead with the next possibility offered by the Ubuntu documentation page: "Overwriting the Windows Bootloader." Here, they told me to type "sudo -i" and then "fdisk -l" (that's an L, not a one) to see where Ubuntu was installed. That command indicated that I had a Linux partition at sdc6. Say what? That would be hd2,5. Next, they told me, type "mkdir /mnt/root" to make a mountpoint. Then mount the partition with "mount -t ext3 /dev/hda2 /mnt/root". But -- what was this "hda2" supposed to represent? Did they mean sda2 (in their example), or did they mean hd1,2? Their "fdisk -l" produced references to hda2 and such, whereas mine had produced references to sdc5, sdc6, and so forth. Confusing! But they said we could try it out and we'd find out if it wasn't correct, so in place of their hda2 I typed my sdc6. (Complete command: "mount -t ext3 /dev/sdc6 /mnt/root".) That didn't get an error message, so I went to their next step, which was to type "ls /mnt/root" and see what I got. I think the idea of this command was to show me what folders existed under my mount point. The folders were more or less like theirs -- I had a bin folder, a media folder, etc. So apparently I was on the right track so far. I hadn't made a separate boot partition -- all my Linux program stuff was in that one partition -- so, as they seemed to intend, I skipped the part about mounting a boot partition if you have one. Next, they said this:
Now that everything is mounted, we just need to reinstall GRUB : sudo grub-install --root-directory=/mnt/root /dev/hda
But since I was replacing their references to hda with sdc, I typed exactly what they had, except the last part of mine was /dev/sdc. That gave me what looked like an error message: "/dev/sdc does not have any corresponding BIOS drive." They said, if you get BIOS warnings, type exactly the same thing but with a space and then a "--recheck" at the end. So I hit the up arrow (to recall the command) and typed that on the end. It said, "Probing devices to guess BIOS drives." Then it said a bunch of other stuff, including "Installation finished. No error reported," along with a list of devices that looked right. That's what the advice page said I should get. So then they said,
Now you can reboot and the GRUB menu should appear. If you see a warning message regarding XFS filesystem, you can ignore it.
So I rebooted without the Ubuntu CD. I got the SQUSHFS error again, but it was different this time: it gave me only a series of errors and an instruction to remove the CD and reboot. I did, but now I booted directly into Windows again. So we had achieved nothing. They offered another approach on the Ubuntu documentation page. They said you could download the Auto Super Grub Disk, run it within Windows, then reboot. When I ran it, it gave me a bunch of options. It didn't do anything for a minute, but then Spybot popped up and told me a command had been entered regarding UNetbootin Uninstaller. I told Spybot this was OK, and to remember this decision. This gave me a dialog:
Reboot Now? After rebooting, select the UNetbootin menu entry to boot. Reboot now?
I clicked OK. The Ubuntu documentation said to do nothing until you see your GRUB menu again. I did see that menu. I let it default into Ubuntu. But this gave me an error:
root (hd0,5) Error 22: No such partition Press any key to continue
So, ah, some of my editing must have screwed up something. I looked for the "Any" key. (Kidding.) I pressed a key, and this took me back to the GRUB menu. By the way, this was a modified GRUB menu; it had options to edit or reload GRUB commands, get a command line, etc. The last bit of Ubuntu advice on this was to say "yes" next time I booted into Windows using this menu, and that would remove this funky little Auto Super Grub Disk installation. But apparently we weren't quite ready for that; I had to figure out how to fix the Ubuntu installation first. I started with "e" to "edit the commands before booting." Since I'd had WinXP highlighted when I did that, it seemed to take me to the part of menu.lst that had to do with Windows. I hit Esc to get back to the menu. This time, I highlighted the top entry, the regular Ubuntu boot line, and I hit "e" there. I typed "e" again there to edit the first line, changing it back to "root (hd1,5)." I hit Enter and that saved it. I hit Esc then, to go back to the main menu, and hit Enter on that first Ubuntu option to boot it. But my change had not been saved. I tried again. This time, after saving the change, I went down to the next line in menu.lst before hitting Esc. That wasn't the solution either. Third time: after chaning it to "root (hd1,5)," I pressed "b" to boot. Hey -- that worked! Ubuntu was booting up! I got a bunch of command-line details that normally would have been invisible, possibly because Auto Super Grub Disk was still doing its job, but otherwise we were OK. I logged into Ubuntu and went back to /boot/grub/menu.list as root (i.e., sudo -i), to change those other two lines back to hd1,5. Obviously I did not fully understand the translation of sd to hd, but whatever. But when I got there, all three lines were still hd0,5. Apparently my change via the Auto Super Grub Disk (ASGD) edit menu did not result in a change in menu.lst. Sooo ... was all this advice about menu.lst a wild goose chase? It seemed that I needed to make my changes for the second and third lines of the GRUB menu via ASGD, not here in menu.lst. (By the way, the stage1_5 files were back, here in /boot/grub. Not sure what part of this mangled process had reinstalled them.) I rebooted and, just for the hell of it, told ASGD to edit the first boot option, the regular Ubuntu thing. Stupid thing still said "root (hd0,5)." So it seemed that I had been able to boot with a temporary override of menu.lst, and that maybe I should have edited menu.lst back to root (hd1,5) after all. I re-edited and booted this temporary fix so I could get back into Ubuntu and do that. I changed the Ubuntu root lines back to hd1,5 and also changed the Windows root line back to hd1,0. When that was done, I rebooted and took another look at the GRUB menu. Now each root line looked right. So far, the moral of the story seemed to be: forget about everything else; just use ASGD to solve this problem. I booted with each line. Regular Ubuntu worked; Recovery Mode Ubuntu worked (I didn't test its dpkg, root, or xfix options); the memtest86 option worked; and the Windows option . . . did not work. I got this:
Error 12: Invalid device requested
Was hd2,0 the correct answer after all? I tried that. No, this time it said, "This is not a bootable disk. Please insert a bootable floppy and press any key to try again." Floppy -- what? Where was Windows? I used a panic-combination of Esc and Enter to bail out of that. Back at the ranch, the question was where I should tell the computer to look next. Or maybe the problem was in these lines:
map (hd0) (hd1) map (hd1) (hd0)
This, it seemed to me, was telling the system to treat hd0 as though it were hd1, and vice versa. Maybe I needed to edit these lines, too, when I was changing the root line to hd2. I tried that, basically changing all references in this part of menu.lst from hd1 to hd2. But no, I still got "This is not a bootable disk." Oh, but now the thing was really fubar: it said "GRUB Loading stage1.5," and it just hung there. I punched the reset button. We were back to the point of editing GRUB for Windows. Whew. Now, I needed outside help. I found a thread where somebody explained those map commands:
Windows will not like being booted from any other partition than the first on the first disc. You should be able to use GRUB to fool Windows into thinking such, by using the map commands.
Another option that some people had was to use rootnoverify instead of just root. I tried editing this portion of menu.lst to that effect. I still got Error 12. Since I had now seen other posts indicating that my understanding of the translation from sdc to hd2, I was more confident that the reference really should be to hd2,0, not hd1,0. So I made those changes again, along with the rootnoverify change. This gave me the "not a bootable disk" error again. I thought I would try to make some of these changes permanent, even though they were not working, so that I did not have to keep re-editing menu.lst here in the GRUB menu. So I selected the first GRUB line and hit Enter to go into normal Ubuntu. But now, what's this? I got "Error 22: No such partition." I edited the line. It was saying "root (hd1,5)," which is what I had said and what had worked, but now it was not working and, in my opinion, it should never have been working. I changed it back to hd0,5 and tried again. But now that got an Error 22 too. Bizarre! The Recovery Mode option was still saying hd1,5, so I tried that. Error 22. Jeez. I hit Reset and booted the Ubuntu CD, to try to figure out where we were now. Then I got the idea to check my hard disks. I had seen some references to differences between the old ATA (or PATA) and the newer SATA drives, and now I was confirming that one of my three drives in this machine was a PATA. Could it be confusing the issue? The system was treating the 320GB PATA as sda. I didn't intend to keep all three drives in the system; I just had not gotten around to rearranging things. So now was my opportunity. I used GParted to make partitions on the unused SATA drive and, after some fiddling around, was able to move my NTFS partition data from the PATA drive over to that SATA drive. I shut down the computer, unplugged the PATA drive, and also switched the cables for the two SATA drives, so that the Windows drive would hopefully now be the first drive in the system. I also took advantage of the opportunity to test Acronis True Image as a restorer of an Ubuntu installation. That is, I inserted the Acronis CD and tried restoring my most recent Acronis True Image .tib backup, to see how well it was working. It was only a few days old, but it would predate the messing around I had lately done with GRUB, so possibly it would get me back closer to a clean slate in that regard. In restoring, I decided not to restore MBR and Track 0; I wasn't sure where those would go or what they would overwrite, and anyway I had now relocated the Ubuntu partition, so I would doubtless have to be editing that stuff. I just restored the Linux partition to the new location. Incidentally, I also made all the new partitions on the second SATA drive to be primary partitions, as were most or all of the partitions on the first SATA drive. I was pleased, by the way, that Acronis seemed willing to try to restore the Ubuntu partition even though the backup had been a 21GB partition and the new one was only 12GB. It seemed to be aware, or at least willing to try, to see if it needed more than 12GB to do the restoration. (It didn't; I had less than 7GB worth of files on the Ubuntu partition.) When it was done, I took out the Acronis CD and rebooted. I got "Error loading operating system." This hadn't happened, the last time I had restored Ubuntu with Acronis. That time, I had gotten a GRUB menu. So I thought what I would do first, this time, would be to boot with my Super Grub Disk (SGD), and see if that would give me back a GRUB menu. There, I went into Advanced > GRUB > Restore GRUB in Hard Disk (MBR) > Automatically Install. It said, "Done. SGD has succeeded!" Now what? There weren't any options. I hit Enter and then kept hitting the Go Back option until I got to Quit > Reboot P.C. I did that and removed the CD. What do you know: it worked. I had my GRUB menu. Now I chose a regular Ubuntu boot. "Error 22: No such partition." OK, how about Windows? The UNetbootin option was still there -- I hadn't uninstalled the Automatic SGD yet -- but by the time I was done typing these notes to keep up with it, it had already decided something and reverted back to the GRUB menu. I tried Windows again, but this time I got "Error 13: Invalid or unsupported executable format." Now what in the world was that all about? I needed to get a grip on what should be happening. I punched Reset, booted the Ubuntu CD, and went into Partition Editor. No surprises there: the Windows partition was now sda1 and the Ubuntu program partition was sdb1. As root, I went to menu.lst and changed the Windows root line to (hd0,0), and commented out the map lines in that section (because now Windows was in the primo position, drive zero partition zero, as God intended), and I changed the Ubuntu root lines to hd1,0. I rebooted without the Ubuntu CD. This time, selecting Ubuntu at the GRUB menu gave me "Error 17: Cannot mount selected partition." Windows was still hung up at Error 13. Gee, a whole new category of error messages to screw things up. OK, what did the authorities say? One source said that, here at the GRUB menu, I needed to press "c" to get a command line, and then type "find /vmlinuz". It said "(hd0,0)." The source said that this was supposed to be the root line for the Ubuntu sections in my menu.lst. So I hit Esc to get out of the grub> prompt (for some reason, "quit" didn't work here) and then "e" to edit the normal Ubuntu boot line in GRUB. And yes, that booted. So I went into menu.lst and changed that for all three Ubuntu lines. Now, rebooting back to GRUB, I tried the Windows option. Still Error 13. My Google search for this one led to a bunch of very confused people who didn't seem to be getting anywhere. I tried commenting out the makeactive line in GRUB for the Windows boot option, but that just provoked a reboot. One of them suggested that you could use Super Grub Disk (SGD) to do a FIXMBR. That was new to me, so I tried it. I chose SGD's Windows > Fix Boot of Windows option. Working through the steps on this introduced me to new information. Apparently "natural Linux" would refer to a partition as hda or hdb, while "IDE Linux" would call it sda or sdb, and SCSI Linux would call it hd0 or hd1. Anyway, after I indicated sda or hd0 or whatever you want to call it, and ran the procedure on that, I had to find my way back to SGD's Windows Basic options. There, I selected "Boot Windows." As the commands flashed by, I noticed that it ran "rootnoverify" and some other stuff and then put me back at the GRUB menu with just two options: Microsoft Windows XP Professional or UNetbootin. I tried the Windows option. Windows booted! Alright. We were getting somewhere. I felt I could probably fix any remaining Ubuntu GRUB problems now. But as I was typing these words, I noticed that time was passing and, you know, Windows was not actually completing the bootup process. It was just sitting there on that black screen with the Windows XP logo staring at me and the little progress bar rolling along. Then, after maybe five minutes, that went away and I just had a black screen. This was not really what I had intended. And there it stayed. Black forevermore. I punched Reset. This put me back at the SGD, which I had forgotten to take out of the CD drive. Reset again, sans CD. I got the normal GRUB menu and, when I chose Windows, I got the normal Error 13. I chose the normal Ubuntu and it booted. I inserted the Windows XP CD, rebooted from the CD, and chose Recovery Console. There, I ran FIXMBR and FIXBOOT and rebooted. Back at GRUB, I chose Windows again. I still got Error 13! One thread seemed to say that FIXMBR and FIXBOOT would have solved the problem, if the problem had been a corrupted NTLDR, whatever that was. So we knew, now, that that was not it. They also said I could type "geometry (hd0)" on the GRUB command line ("c") to get some information. They were right. I got an indication that the filesystem type for partition 0 was ext2fs, which was apparently not the same as ext3. Had GParted screwed this up? Had I accidentally indicated ext2 when I meant ext3? Or was GRUB reporting it wrong? A mystery. But, wait, why was hd0 a Linux partition at all? That was supposed to be where Windows was. I typed "geometry (hd1)." Just two partitions, filesystem type unknown. But I knew I had just two partitions on the Windows drive. Geometry reported the partition type was 0x7, which appeared to be shorthand for NTFS. One possible answer came from the advice to basically put the Windows section of menu.lst back the way it was. I booted into Ubuntu and went to menu.lst. There, I made it read as follows:
title Microsoft Windows XP Professional root (hd1,0) map (hd1) (hd0) map (hd0) (hd1) #savedefault makeactive chainloader +1
This worked. It seemed that the GRUB "geometry" command gave me more accurate information, for purposes of knowing how to edit GRUB's menu.lst, than I was able to get from GParted or whatever other sources I had been using. I tried rebooting with this setup. Selecting Windows at the GRUB menu gave me the option to restart Windows normally or choose Safe Mode. This was promising. And yes! The sucker went right on into WinXP. It gave me the option to uninstall UNetbootin, but I didn't take that option yet. First, did Ubuntu still boot at GRUB? I rebooted to find out. Yes, it did. Back to GRUB; back to Windows; uninstall UNetbootin. Problem solved. Morals of the story: use SGD and especially ASGD; use GRUB's geometry command for information; simplify the hard disk setup if possible. With this taken care of, it seemed I could get back to what I had been trying to do before this GRUB problem came up.

Monday, July 9, 2007

Ubuntu/WinXP Pro Dual Boot Partitioning

I was trying to set up a dual-boot system, with both Windows XP Professional (32-bit, not x64) and Ubuntu Linux on the first hard drive. The partitioning process was not working out smoothly. Ultimately, it became a dual-boot system on two separate drives, for reasons described below. ********************************************* I started with a 76GB hard drive. Using PartitionMagic, I divided it as follows: PROGRAMS -- the 28GB WinXP program installation partition LINUX -- the 10GB partition where I intended to install Ubuntu (Ext3 format) SWAPSPACE -- a 2GB swap partition for Linux Those three were all primary partitions. Then I had an extended partition, containing this logical partition: STATIC -- a 36GB space where I stored files that I did not want to back up or restore each time I reinstalled Windows. Example: the WinXP installation files. On this drive, I also stored copies of the programs I installed, in separate folders corresponding to the dates of my various Drive Image backups of the PROGRAMS drive. That way, if I if I restored an earlier Drive Image PQI file to replace a corrupted installation on the PROGRAMS drive, I would know which additional programs I had installed since then, so I could quickly bring the PROGRAMS partition back up to current status. I started with an introductory Ubuntu installation. Then I focused on installing WinXP into PROGRAMS and STATIC. Unfortunately, when this was done, I found (as apparently others have found) that Microsoft's Windows installation had mysteriously corrupted the Ubuntu installation. I needed to start over. This is where the current, more complex partitioning problems began to emerge. I booted the Ubuntu live CD and tried to proceed with the installation. It went partway, but it balked when we reached the point of partitioning the drive. I believe the error message indicated that the "/" partition (i.e., the root) was not formatted. I bailed out and used Ubuntu's GParted program to try to partition and format as needed. I kept getting an error message (when I went down into the details of the failure to format) indicating that the program "will not make a filesystem here." Back in PartitionMagic, I wiped out the Linux partitions and tried to create new ones. Research had now indicated that I would probably want more than just the two Linux partitions mentioned above. But PartitionMagic wouldn't let me raid the STATIC drive (which really needed only a fraction of its size) for disk space that I could use for additional Linux partitions. Upon checking for errors, I discovered that PartitionMagic reported that both the PROGRAMS and STATIC (i.e., the Windows) drives had been improperly dismounted. I didn't believe that problem had been there at the start of this effort. I wondered if WinXP was designed in such a way as to leave Windows partitions improperly dismounted whenever GParted tried to work on that drive. Or possibly I was mistaken: maybe an improper dismount had happened in some other way, sometime since my last check on the previous day. To get rid of the improper dismount problem, I could have moved everything off of drives C and D (i.e., the PROGRAMS and STATIC partitions) and used PM to wipe out those partitions and start over. Seeking an easier route, I tried booting with the WinXP CD and using the Recovery Console's FIXMBR command (followed by CHKDSK /R on drive C but not on D, repeated until there were no more reports of errors being corrected). Back in PM, it appeared that CHKDSK /R was not necessary: there were now no errors on either C or D. (In any case, it would also have been possible to run CHKDSK via Computer Management from within WinXP, though it would not actually have run until after rebooting.) I rebooted the Ubuntu live CD and started the Install process again. This time, it froze at 12% of the way through the Scanning Disks dialog. I hit the Reset button on the computer and booted PM. It showed improper dismount errors again. I ran FIXMBR from the WinXP CD and then rebooted from the Ubuntu live CD. I got back to the Prepare Partitions dialog. This time around, the advice seemed to be that I should actually have these partitions with these sizes: / -- Root, for booting -- 500MB /usr -- holds Linux program files -- 6GB /home -- holds settings that you want to preserve when you update the program files -- 500MB /var -- so that if e-mail fills up, the functioning of the system won't be affected -- 3GB /tmp -- temporary space, potentially including DVD images -- 5GB /swap -- holds material in active use that won't fit in RAM -- 2GB FAT32 -- both WinXP and Linux can read and write to FAT32 drives, so keep currently worked-on data here -- remainder of drive (all being Ext3 except the FAT32 drive and /swap). They kept saying that /swap should be 1.5 to 2 times the size of RAM, but I had just moved up to 4 GB of RAM, and while researching a RAM drive I had heard that people rarely maxed out /swap partitions of even 1GB, and I found one source that said 1GB is enough if you have 1GB or more of RAM. Just to be safe, I decided to make /swap a 2GB partition. I couldn't tell what to enter (in the Edit Partition dialog within Ubuntu's Prepare Partitions dialog) for the mount point for the FAT32 drive. It looked like I was supposed to just enter a slash followed by whatever name I wanted. I thought there might be an eight-character limit. So I designated a mount point called /2way. (Apparently they were still working on the tools to make NTFS drives as accessible as FAT32 drives within Linux.) The rest of installation went on while I took a nap. When I got back, I shut down the system, plugged in my other hard drives (which I had unplugged, so they wouldn't get screwed up by all this rebooting and shutting down), and rebooted. The Grub boot loader came on, as expected, and I chose Windows. Windows did not complete loading. It got partway through and rebooted. This had happened previously. At first, I had been thinking that this indicated a problem with my new motherboard, new RAM, or new CPU in the system. But then I observed that, when everything was cleaned up, Windows booted just fine. So now I suspected a problem in one of the hard drives. On reboot, Windows loaded to a point of showing me a dialog with an option to reboot to complete installation of my "new" hard drive. I accepted, and booted into PM. I ran PM's "Check for Errors" on each partition. It reported Error 1513, "Bad attribute position in file record" for one drive. Worse, it reported "Partition table error #114 found" on the primary boot drive that I had just configured. I rebooted with the Windows XP installation CD, selected Recovery Console, and ran CHKDSK /R on the Error 1513 drive. CHKDSK actually froze: I ran it overnight, and came back in the morning to see that it was still stuck at 66%. I rebooted and ran it a couple more times. Having satisfactorily corrupted or lost whatever irreplaceable files it was gagging on previously, it was now satisfied, and proceeded to run relatively quickly. (Note to self: next time, disconnect the uninvolved drives BEFORE doing lots of partitioning and crashing and system resetting.) It then developed that, while CHKDSK /R may have fixed some problems on that drive, it had nothing to do with Error 1513. Running PM again showed that the error was still there. I belatedly consulted the relevant Symantec webpage and found that Error 1513 arises from a bug in PM, remediable by a patch. So I downloaded the patch on this other computer and made a note to myself to fiddle with that later. Meanwhile, I rebooted and let the machine default into an Ubuntu boot. It seemed to freeze. I rebooted again and this time chose the alternate Ubuntu boot, which I construed as being something like Windows' Safe Mode boot (F8, after booting). It ran through a bunch of command line messages and then gave me a prompt. Since I didn't remember anything about shell commands anymore, I hit Ctrl-Alt-Del and rebooted again. This time I went back to the default Ubuntu boot, though by hitting Enter rather than waiting 10 seconds (or whatever) for it to boot on its own. This time, the system booted. It showed me a popup telling me that there were downloadable updates. So I downloaded those. Incidentally, this was a lot easier than Microsoft's separate update pages for Windows and for Office, each of which required multiple clicks and long delays while Microsoft figured out if I had the right software to do the downloads. Unfortunately, the system froze before it completed the downloads. I suspected this stemmed from a hard drive problem. I rebooted -- this time, into Windows -- with the intention of doing the PartitionMagic update. Windows did install OK. But then it froze. Hard drive problem, I was sure. I booted back into Ubuntu. It froze too! I tried again. This time it worked. I tried doing the last of the Ubuntu downloads, but I got this: An error occurred The following details are provided: E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem. E: _cache->open{} failed, please report. I wasn't sure to whom I should report it, or how to manually run dpkg, so I just bailed out of that dialog. I decided to see if I could find an Ubuntu counterpart to PM. I looked around on the menus for GParted or TestDisk or anything that looked like a partition manager, but I couldn't find them. I did a search for GParted, and found a file called gparted.desktop in a folder called /usr/share/app-install/desktop, but when I double-clicked on it, it just opened what appeared to be the source code for that program (in a dialog box whose X box was in the top center rather than in the expected upper-right corner). A search for TestDisk turned up nothing. I rebooted with my GParted CD. Meanwhile, on the laptop computer on which I was typing this post, I found that the Ubuntu documentation pages (with which I was only at that point starting to become familiar) carried a page about PM error 114. That page suggested that GParted would not deal with the problem. I couldn't tell, because once again GParted put me at a prompt preceded by no instructions but a screenful of executed commands; I typed Exit and hit Enter (something funny about that); now I found myself at what appeared to be GParted instructions; they said things that just made me feel bad (e.g., "VESA driver should always work" and "The graphical environment configuration should have been done automatically. Unfortunately it did not, since you are back to the bash!"); so I hit Ctrl-Alt-Del and rebooted with the Windows XP installation CD. That Ubuntu documentation page also said that the problem arose from having your partitions out of order. They didn't seem too sure of it; it was phrased as more like an idea or a possibility. Apparently I needed to have my primary partitions come in order, 1 through 4, followed by my logical partitions. I wasn't sure how to determine whether they were in order or not. They said the WinXP CD or an "ancient FDISK" could delete the misnumbered partition. I wasn't too keen to use FDISK, which as I recalled would be eager to delete everything in sight, and I couldn't see that the WinXP CD had any commands up to the task, at least not in Recovery Console. I rebooted to WinXP and prepared to run the PM update to version 8.1. I would have done it on the laptop instead, where I had downloaded it, but for some reason now, of all times, was when my laptop decided to change my WinXP password. So I couldn't get in, and was compelled to do my Windows work on the desktop instead. There, when I double-clicked on the PM upgrade on my flash drive, a failed reboot persuaded me to use Safe Mode instead. But in Safe Mode, I got InstallShield Error 1152: Error extracting to the temporary location. So I tried that on (would you believe) a friend's computer, but I got the same error message there, even after running it from the hard drive rather than the jump drive. My speculation was that the update might only work on an installed version, whereas I always ran PM from the bootable CD. While I was there in Safe Mode, I recalled thinking that maybe the person who wrote the Ubuntu page meant using the Disk Management portion of Computer Management, inside of XP, and not the WinXP installation CD. But I couldn't figure out how to make sense of that. If they were talking about drives, then, yes, my disks were all out of order. I booted from a SATA drive, which was listed after the IDE drives, so it was and would remain in a position other than number 1. If they were talking about partitions on the drive, as I assumed, I didn't see how Computer Management could help. It's not like you can drag and drop partitions there. Nor were they numbered. Indeed, the Ubuntu partitions weren't even lettered. So Computer Management looked useless for this. Some posters said PartitionMagic is bad for Linux partitions, so I decided to postpone the PM update project. Instead, I looked around for another Ubuntu-friendly partition manager, one with a graphical user interface (GUI). Somebody recommended "QTpart" on the Knoppix CD. I had one of those for a year or more, but never got around to using it much, and had evidently tossed it. Now I downloaded and burned it again, on the laptop in Ubuntu. (Later, it developed that, according to Kevin Farnham, it might have been more to my advantage to get QTParted on the System Rescue CD -- although, at latest word, it appeared that QTParted might no longer be on that CD.) I booted and ran the Knoppix CD. I found what I was looking for right away: K Menu > System > QTParted. Nice user interface. Drives numbered, like that Ubuntu person had been describing. But the numbers didn't seem to be out of order. I couldn't see a solution here. Kevin Farnham was advising to create just a few Linux partitions, not all of the ones I created. Reducing the number of partitions would reduce the number of problems that partitions could cause, right? So that was one possibility. Another possibility was to use one drive for Windows and one for Ubuntu. I liked this possibility. Among other things, it would mean that I could continue to use PartitionMagic, if I wanted, for the Windows drives. I really had found it to be a very useful and reliable tool over the years, and was not too eager to entrust my data to something unknown. Either way, it seemed I would have to wipe out my Linux partitions and start over with the Ubuntu installation. That was OK; I didn't have much invested in them yet. So I shut down the system, unplugged all the other drives, rebooted with the Knoppix CD, and used QTParted to wipe out one of the Linux partitions on that drive. I could only wipe out one of those Linux partitions. That's all QTParted would do. After that, the Delete menu pick was greyed out. I tried killing QTParted and starting it again; no joy. I rebooted the Knoppix CD and started QTParted again. This time, it let me delete all the remaining Linux partitions. Now I had to move my Windows installation to another drive, so as to free up this drive for Ubuntu (and the accompanying FAT32 workspace) entirely. This involved some drive imaging (so as to move the WinXP partition without having to reinstall Windows), moving quantities of files to make space on another drive, etc. Before doing that, though, I needed to start PartitionMagic and verify that it was now happy with this newly eviscerated boot drive (and with all the others that I had been shutting down improperly through various freezes and forced reboots). So I plugged in all the drives and booted from the PM CD. It developed that I still had PM Error 114 on the boot drive, so I rebooted with the WinXP CD and ran FIXMBR again. Unfortunately, that made no difference; Error 114 was still there. So I intended to go back to the WinXP Recovery Console again, but fumbled and wound up booting XP from the hard drive. This was amusing: PartitionMagic was truly unhappy with my drive, but XP would boot from it. I figured it would freeze up again soon enough, though. So while I was here, I went ahead and moved files and so forth, for purposes of freeing up the formerly dual-booting drive to be entirely devoted to Ubuntu. While I was killing time, waiting for CHKDSK /R to run yet again on one drive that got screwed up, I was looking at websites. I noticed that the Ubuntu documentation includes a thing by Confused57 from last year; but for me it seemed only somewhat helpful because it looks like Ubuntu has come a long way since then. By the time I had finished moving files and rearranging folders with PartitionMagic and Drive Image and CHKDSK and FIXMBR and so forth, I had made a new discovery, browsing away here on the laptop. It seemed that I should have done an MD5SUM comparison, to insure that my Ubuntu CD contained a perfect copy of the files that I was supposed to have received. To do this, I put the CD into the drive on this laptop ... but that wasn't right. I was supposed to check the ISO, not the CD that resulted from it. Well, by this time I had deleted the ISO, so this would mean downloading and checking a new ISO and burning a new CD. It seemed to me that errors could also creep in during the CD-burning process or the installation process. I appreciated that it made sense to eliminate errors wherever possible. But I had already installed this CD and it had seemed to work. I hadn't gone to this trouble for other software I had downloaded in the past. So I decided to skip it, at least for now. But then I decided to do it anyway. The Ubuntu documentation on the matter wasn't clear, so it seemed that I should edit it. Nice thing about having your documentation in a wiki -- you can actually do that. The general idea, as I understood it, was that you download the ISO, using Windows or Linux or whatever; you save it in a folder; you fire up Ubuntu from a bootable Ubuntu CD (such as the one that I had burned before I knew about this ISO checking process); you go to the folder where your downloaded ISO is; you run the MD5SUM program; it spits out a long string of numbers and letters; and you compare that string (which results from your ISO) against a pre-supplied string. If the two don't match, your ISO is flawed. If they match, you proceed to burn the CD using the ISO (and, in my case, you toss the unchecked, first-round CD). Or at least that's what I thought was supposed to happen. But my Ubuntu CD didn't seem to have the MD5SUM utility that the Ubuntu documentation said could be found in most distributions. I used the Search for Files tool, but it didn't find anything with MD5SUM in its name. Taking a different approach, I tried to figure out how to get to an Ubuntu command line -- for the first time -- since the Ubuntu directions said to enter a command on the command line. From the menu at the top of the Ubuntu desktop, the path I took was Applications > Accessories > Terminal. That gave me a prompt in the shell -- resembling DOS or a Windows command-line box, except it was white instead of black. I didn't know how to change from the Ubuntu drive, which the prompt was now showing me, to the DATA partition on my hard drive, which is where I had stashed the ISO file. I went into help and typed Terminal. That led me to the GNOME Terminal Manual. But that seemed to be oriented toward how to change the appearance of the Terminal. I guessed that I needed a shell manual. But I didn't know which kind of shell I had. Several years earlier, I had worked briefly in BASH, but I knew there were others. I searched in the Ubuntu community documentation for "shell," and found three entries. The first, regarding CShell, began with instructions on how to install it, so I guessed this was not what was already installed on the Ubuntu CD. The second, Shell, seemed much closer to the action. (If you go at it the other way, starting with the main documentation page, you find Command Line listed as an Advanced Topic, which seemed correct and yet odd, for something that I was trying to do before even installing the system.) The community documentation page gave me a basic introduction to using the command line and then led on to Using the Terminal. But by now I had noticed that these community pages weren't specific to version 7.04, so I opted to go instead with the command line advanced topics page, specific to 7.04, that I had just uncovered in the course of researching this paragraph. That advanced topics page led to a list of Basic Commands, which also seemed odd, though again I felt that I understood the concept: you are now doing basic work within the advanced task of using the command line, which is a basic part of the advanced task of installing Ubuntu. (It seemed like I should revise the list of links at the bottom of the community wiki page, to point to this list of basic commands; but then I thought maybe there was a reason why nobody had done so already. Being a newcomer, I thought I better hadn't. The list of basic commands took me to a list of file and directory commands. From these, I learned that I could use CD ~/ to take me to another drive on the machine. So I typed CD ~/DATA (where, in DOS, I would have typed E:, to take me to E: (DATA). It said "No such file or directory." Then I realized I had it wrong: that would take me to a DATA folder within my "/" (i.e., root) directory. I still wasn't sure how to get to root or, in this case, DATA. I typed HELP at the shell prompt, and it gave me a list of commands. I realized I didn't exactly know how to use them, so I wondered if I could type the command and then /? (e.g., CD /?) to show me some instructions. That didn't work. The Linux version, it turns out, is COMMAND -h or COMMAND --help, and if you want more info, it's MAN COMMAND (short for "show me the manual for this command"). Since I didn't know which command I wanted, I typed MAN MAN. But as you'd expect, that was the manual about manuals, which was too much in the other direction. I tried CD -h, but Terminal said "invalid option." MAN CD didn't work either. I tried doing some Google searches, and this led to the concept that, in Linux, a drive or partition might sometimes be called a "filesystem." Someone also reminded me that Linux refers to drives as HDA, HDB, etc., not DATA. But when I tried CD /DEV/HDA, it said, "Not a directory." I hadn't seen anyone offering the example of CD ~/HDA, so I didn't think that was quite the answer I was seeking. It seemed just bizarre that all these lists of basic commands didn't say anything about how to move yourself to another drive. From my DOS days, I thought maybe I could tinker with the prompt, so that it would show me where I was (if not where I was going); but MAN PROMPT turned up nothing. I found a cool Mandriva user's manual. It brought me to understand that the purpose of the tilde (~) was to put me in someone else's home directory (e.g., CD ~JOE). But even this cool manual didn't tell me how to run a program on some drive other than the one I was already on. So I gave up (again) on trying to figure out how to do the MD5SUM thing on the downloaded Ubuntu ISO. So I was free to go ahead and install Ubuntu again. Now that I had gotten rid of those pesky Windows partitions, I really had room to roam on this disk. I bumped up the numbers from the list, above, and I also changed my order to match the Mount Point options provided in the installer's Edit Partition dialog, as follows: / -- Root -- 500MB /boot -- 2GB /home -- 10GB /tmp -- 8GB /usr -- 10GB /var -- 5GB swap -- 4GB FAT32 -- remainder of drive (36GB) This list reflects some corrections made subsuquently -- notably the addition of a /boot partition. Unfortunately, I got only as far as /var, and then the Ubuntu Prepare Partitions screen said "unusable." It seems I was setting up primary partitions, and only four were allowed. I had thought that was just a Windows limitation. So now I figured I had to find out how to set up extended partitions. A search for "extended" or "logical partition" turned up nothing in the Ubuntu 7.04 or community documentation pages. Plan B: I used PartitionMagic to set up a 21GB unformatted primary partition and a 55GB logical (extended) partition, also unformatted. Then I rebooted and restarted the Ubuntu installation. Once I was back in Ubuntuland, however, the Scanning Drives dialog (after I selected "manual") froze at 50%. Apparently this thing between it and PM was mutual. I powered off the machine and belatedly unplugged my other drives, which by now were probably corrupted from the unorthodox shutdown. I rebooted into the installer and tried again. It was willing to convert the primary partition into a 21GB root ("/"), but it wouldn't subdivide it. I realized I probably should have been using QTParted instead of PM, so I rebooted with the Knoppix CD and tried setting up my seven partitions that way, putting the first three in primary partitions and the rest in the extended partition. The labels I specified in QTParted did not survive into the Ubuntu installer. I had to type /var, /home, etc. again. Otherwise, though, this seemed to work: the installer recognized all of my partitions' sizes; I just had to add the labels in a manual (not guided) install, specify the mount points (e.g., /var, not /media/sda8), and make sure it was specifying the right size (the size I had already created) for each partition, instead of repeating the size of the preceding one. About this time, I noticed that the installer specified that I needed to specify a root system of at least 2GB. Since I didn't feel like undoing all my hard work with QTParted and so forth, and since other people had talked about needing root partitions of only 500MB or less, I thought I would just go with the setup described above, for now, and see what happened. The installer didn't edit my setup, telling me that e.g., my smaller root was inadequate, so I figured they just meant that you need a root of at least 2GB if you're not going to have all these other partitions. Going on to the next step was a disappointment, however, in another sense: now that I had disconnected my other drives to keep them from being damaged by all this screwing around, there were no other (i.e., WinXP) accounts for Ubuntu to import. This would not do. I surely wanted it to import as much as possible, saving me the work of entering lots of trivial settings. So I bailed out of the installer, shut down the machine, connected the WinXP programs drive, and re-entered the partition data, above. Needless to say, I wished they'd had a way to save my installation data thus far on a floppy or jump drive, or perhaps load my WinXP settings onto a floppy or jump drive from inside Windows, before starting the Ubuntu install. On the rebound, I took care to do surgery only on the partitions on the Linux drive. I also clicked the Format? box, which I construed as a question of whether I wanted to format these new drives. I wasn't sure, but I thought I probably did. (It wouldn't let me check Format? for the /swap and FAT32 drives.) While waiting for the thing to install, I was having some second thoughts about the size of my root. One guy said it should be at least 3GB, because it held the entire operating system -- but, you know, I eventually did get the "Installation is complete" dialog. At that point, I clicked on the button to restart. The system restarted and gave me the menu. I chose Windows, just to see if it would still load OK. It did. (It crashed before completely loading, probably because of one or more imperfect system shutdowns recently.) I rebooted and this time chose Ubuntu. It loaded too. I wondered whether PartitionMagic would still report error 114 for the Linux drive. So after I was finished downloading a boatload of updates into Ubuntu, I rebooted with the PM CD. Or at least I tried. It seemed that the Ubuntu installation had removed my ability to boot from the CD. I had always done so by specifying, in my BIOS, that the CD should be the first in the series of boot devices. But now the system froze shortly after starting to load the PartitionMagic CD. I tried again with the F11 option, pressed shortly after rebooting (my previous motherboard had not offered this option), but that made no difference. I tried booting with the WinXP installation CD, and it loaded and ran Recovery Console without a problem. (While I was there, I ran FIXMBR to apply, once again, the requisite fix to the problem that arose each time WinXP would shut down on this new motherboard.) I tried using a backup of the PartitionMagic CD, but it too, froze. I tried booting my CD for PM's sister program, Drive Image. It booted using the same Caldera DR-DOS as PM; it froze too. I could see that this new Ubuntu installation was going to force some changes in my customary way of doing things on the computer, since I was in the habit of using these DriveImage and PM CDs pretty often. I tried booting the Knoppix CD; no problem. I rebooted and let the system load itself as it would. Apparently FIXMBR had screwed up my Ubuntu installation, because the Grub loader did not come up; instead, we went immediately into WinXP. It rebooted itself once. Second time, it said it had found new disks and needed to reboot. Third time, it seemed stable. I fired up Drive Image from within XP. It said it "has detected an error 116 on the partition starting at sector 44034165 on disk 4." It further said, "The starting LBA value is 44034165 and the CHS value is 16450559. The CHS values must be equal." It offered to correct the problem. Disk 4, I believed, was WinXP's term for the Ubuntu drive. I couldn't tell for sure: at this point XP's Disk Management showed no drives other than the CD drive. Since Ubuntu wasn't booting anyway, I said sure, why not. But DriveImage wasn't done. It found a total of five such errors, and fixed each upon my approval. Then it ran, and I confirmed that Drive Image did count the Ubuntu drive as Disk 4. PartitionMagic, running within XP, would not provide data on the Linux partitions; unlike the version booted from CD, this version gave me an Error 510, "The version of the file system is not supported." It wouldn't check the Windows drives for errors because they had open files, so I rebooted into Safe Mode and ran the checks there. The patch (mentioned above) worked: there were no 1513 errors. But even in Safe Mode, PM wouldn't check the program drive or the drives containing pagefiles for errors. I thought FIXMBR was probably the reason why the Ubuntu (Grub) boot screen was no longer showing up on reboot. But I wondered if maybe Drive Image's little cleanup job might have fixed whatever the problem was. On reboot, I had the answer: nope. Still no Grub. When I looked into it, I found that, sure enough, according to AndyFair, FIXMBR removes Grub. Budman7 said, more specifically, that FIXMBR replaces the Grub loader with a Windows bootloader. Acting on advice from rcgreen, I rebooted with the Ubuntu CD, to see if it would recognize the Ubuntu partitions on the hard drive. (I noticed, this time, that on bootup the CD offers an option of checking the CD for errors, so I did that instead of going any further now with the MD5SUM process. The disc passed the test with no problems.) It did recognize them. Now I found a page in the Ubuntu community docs on recovering Ubuntu after installing Windows. This approach claimed to put Grub into the root partition, not the MBR. In that case, I hoped that future uses or abuses of FIXMBR would cause no further problems to Ubuntu. I followed the instructions there (basically, boot the Ubuntu CD; open a Terminal window; type "sudo -i" (without the quotes) ; type "grub" ; type "find /boot/grub/stage1" ; note the resulting numbers in the form (hdX,Y); type "root (hdX,Y)" (replacing X and Y with whatever numbers you got from your "find /boot/grub/stage1" command) and hit ; type "setup (hdX,Y)" (replacing X and Y again) ; type "quit" ; and reboot without the CD. Of course, I was so pleased at finally being able to work successfully in the shell, with these clear instructions, that I didn't realize I was doing exactly the wrong thing. The community docs page wasn't written too well, so this time I really did edit it to put the foregoing advice later. After all, I wanted Grub in the MBR, not in the root partition of the Linux drive -- as I realized when I rebooted and found that we just sailed right on back into Windows. If it's in the Linux drive, Windows will just take over. Grub needs to intercept it, and therefore it seemed unavoidable that Grub must be in the MBR. I did think about installing Boot Magic. If I recalled correctly, there was a copy of it on my PartitionMagic CD. But simpler, I thought, would be better. Now that I had put Grub onto the Linux drive, would I have to answer Grub questions twice? The webpage just mentioned also had the instructions I needed, to restore Grub to the MBR, but I was no longer sure what effect that would have. So I bit the bullet and reinstalled Ubuntu from the CD, after unplugging the other hard drives temporarily. I tried reinstalling without first deleting or reformatting the partitions into which I had already installed Ubuntu. I was curious as to how this might affect the installation process. It didn't seem to make any difference. I still opted to check the "Format?" box in the Prepare Partitions dialog, and I still had to retype my preferred names for the partitions and make sure that the sizes were right. Before I was done, I made the discovery, mentioned above, that I should maybe have included a /boot partition. So the list of eight partitions, above, reflects this realization. And with this realization, it seemed like I had better use a full-blown partition manager; the one in the installer didn't seem up to it. I tried GParted again, this time from within Ubuntu rather than from its own live CD, and this time it ran just fine; but I couldn't get it to delete the swap partition, and without that I couldn't rejigger the other partitions as needed. I tried QTParted from the Knoppix CD, but it seemed to function about the same as GParted. I rebooted the PM CD, which worked now, and used it to set up the same structure as before: one Unallocated partition big enough to accommodate the first three Ubuntu partitions as primaries, and the rest in an extended partition. Multiple comments, by now, had made clear that there was no need for a 4GB swap; but having seen how hard it was to work with, I figured I'd just leave it at that. I resumed the Ubuntu installation effort, having just discovered the Super Grub Disc, which apparently would have let me restore my MBR without any of the foregoing. (Sigh.) This time around, I discovered that you get significantly different functionality, in the Prepare Partitions dialog, if you accept Ubuntu's treatment of an Unformatted partition (from PM) as if it were a formatted partition -- if, that is, you use the Edit Partition button instead of deleting that partition and using the New Partition button. I also rediscovered that Ubuntu would not import WinXP settings if I didn't have that disk plugged in. (Sigh!) But, you know, when the dust settled, it was done, and I seemed to have a successful dual-boot, dual-drive machine.