An account of experiences with Canonical's latest Long Term Support Release of Ubuntu.

Canonical guarantees five years of support for their Ubuntu Precise release. Worth using it fairly intensively therefore, if only to see how it feels in comparison with my usual default distro, OpenSUSE. It has a reputation as a noob's distro, but I've nothing against ease of use as long as everything I need is there and works!

Top

Mounting Windows 98SE shares

I have an old PC running Windows 98 SE which used to be my main machine before Linux arrived. As mainstream distros made their unsteady way from life spent under the bonnet geekery to today's surprisingly polished and reliable examples like Ubuntu and OpenSUSE, tasks migrated to Linux as soon as a distro was found which could handle them. At the time of writing (2012), there remain just two applications for which the old machine is still essential, the Windows-only scanning software for my slide scanner and Excel 5.0 to maintain bookkeeping spreadsheets which have Visual Basic routines long enough to be impractical to translate to more modern forms. The output of these programs needs to be transferred to my main Linux PC for permanent keeping and backup.

Once Ubuntu Precise was installed and running smoothly, the time came to mount Blantyre's C: drive and fetch some scanned images. I used the command which had worked on my previous default distro, OpenSUSE 11.2 and also on Ubuntu 11.04 and 10.04 and Mandriva 2010 Spring.

14:24:46 335> sudo mount -t cifs //blantyre/BLANC /media/blanc -o servern=BLANTYRE
[sudo] password for ed: 
mount: wrong fs type, bad option, bad superblock on //blantyre/BLANC,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

14:25:04 336> dmesg | tail -1
[   70.996812] CIFS VFS: No username specified

Oops. Something has changed. There's been toing and froing between CIFS and Samba in the past, so try...

14:25:23 337> sudo mount -t smbfs //blantyre/BLANC /media/blanc -o servern=BLANTYRE
/sbin/mount.smbfs: line 115: /sbin/mount.cifs: No such file or directory

Strange... it was there in previous distros. Is it really not there?

15:15:48 338> cd /sbin
15:17:20 339> ls | grep cifs
   ...nothing...

Definitely gone. Fish for more information...

14:29:52 340> mount.cifs
The program 'mount.cifs' is currently not installed.  You can install it by typing:
sudo apt-get install cifs-utils

Funny, I thought I had already installed that. Try again in case.

14:30:03 341> sudo apt-get install cifs-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cifs-utils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

14:30:29 342> !-2
mount.cifs
The program 'mount.cifs' is currently not installed.  You can install it by typing:
sudo apt-get install cifs-utils

Pathetic! Not totally untypical either. Maybe trying smbfs in the command is a red herring. Try Googling... what results is the usual thin mixture of similar questions years old and therefore in different contexts, or the nearly blind leading the blind. However, I've seen enough to try a few things.

18:20:44 416> sudo mount -t cifs //blantyre/BLANC /media/blanc -o servern=BLANTYRE,username='Ed Murphy'
  ... usual failure message as at top ...
18:24:13 417> dmesg | tail -1
[14420.679261] CIFS VFS: cifs_mount failed w/return code = -22

Aha! I should have first paid attention to the error line from dmesg. Specifying a user name made a difference, although it still doesn't work. I remember something about name resolution in CIFS I saw while Googling and didn't think could apply. Try it anyway...

18:24:18 418> sudo mount -t cifs //192.168.1.23/BLANC /media/blanc -o servern=BLANTYRE,username='Ed Murphy'
  ... no error message! ...
18:26:03 419> dmesg | tail -1
[14530.629837] CIFS VFS: Autodisabling the use of server inode numbers on \\192.168.1.23\BLANC.
This server doesn't seem to support them properly. Hardlinks will not be recognized on this mount.
Consider mounting with the "noserverino" option to silence this message.
18:26:13 420>

Worked! I'd like to understand more about what is going, but I haven't the time. ping blantyre works, so my names are set up properly. Anyway, since I use fixed addresses for my machines, that is good enough, and the way is clear for more extensive use of Ubuntu Precise Pangolin.

Top

Installing Precise on an Eee PC 900

I bought an Asus Eee PC 900 shortly after its release in 2008. Having never gotten a laptop because of the Microsoft Tax and the fear that getting an Open Source O.S. to work on one would be too dif ficult, I jumped at the chance when an apparently usable Linux netbook appeared. Additionally attractive was the fact that this model came with SSD storage in place of a hard disk drive, so ought be to more resistant to knocks. With its nine-inch screen and size about that of a large paperback, it looked like a traveller's dream.

And indeed, in many ways it was. The screen was of good enough quality, wireless worked without any Linux mysteries and only the keyboard's undersized keys were an irritation. The SD card slot meant that backing up my digital photos couldn't have been simpler. If only they hadn't picked the distro they did...

The Eee PC came with Xandros installed, a distro dumbed down to mimic Windows XP in many respects. USB sticks plugged in appeared as /home/user/D:, for example. There was nothing fatally wrong with this at first; everything worked well enough. Fatal in the long run, though, was the fact that the distro as supplied was essentially frozen. There was a repository as far as I can remember, but with very little in it and no updates being added. Firefox version 2.0 was looking distinctly tired by 2012. Revealingly, there was a chapter "Installing Windows XP" in the User Guide. That is, throw away the free Open Source operating system your computer came with, buy Microsoft Windows XP like everyone else and install that instead.

Asus hurt their reputation by trying to bounce me into Windows like that.

Anyway, by early 2012 the advantages if a new distro could be made to work finally outweighed the risks inherent in discarding the familiar old system. Having just finished trials with the latest Ubuntu release, I had an installation CD-ROM of the 32-bit version, so it seemed natural to try this first. Making a bootable USB stick from it was no problem... Ubuntu on my main machine offered an application for the purpose.

The first thing to do was to see if Ubuntu could recognise the existing disk structure, so boot from the USB stick and get into the installation partitioner. The display is handled correctly and we see:

    /dev/sda  ATA ASUS-PHISON OB S   4.0 GB
    /dev/sdb  ATA ASUS-PHISON SSD   16.1 GB

    /dev/sda1 ext2   2467 MB  2078 MB (...used)
    /dev/sda2 ext3   1546 MB   120 MB
    /dev/sda3  -        8 MB  unknown
    /dev/sda4  -        8 MB  unknown

    /dev/sdb1 ext3  16137 MB   507 MB

Excellent! The Eee PC has two SSD devices, a faster, smaller one soldered to the motherboard and a replaceable, slower one for the bulk of the data. "OB S" in the top line obviously stands for "onboard SSD". Xandros occupies two partitions on the fast device and my user files are on the big one. Heaven knows what sda3 and sda4 contain; presumably nothing that would concern a new distro. There is no swap partition because they're not good for SSD life. This is all very reassuring. Let's do it!

In keeping with the way things are on my multiboot system, I'd like to put the O. S. on the fast (small) SSD, and reserve the whole of the bigger SSD for a /user partition where I can keep digital photos and whatever else I want to take with me. So I start a standard replace-everything installation. Hmmm, that says it wants 4.4 GB, so Ubuntu will go perforce on the big SSD. Not OK.

Start again, and select "something else" (the demotic version of expert mode) when we get to the partitioning stage. Do the following:

One last check, then confirm the changes and Xandros goes to the great bit bucket in the sky. But will Ubuntu fit on sda? We will have to see.

There follows a completely unexceptionable installation. I specify the keyboard, and the typing test is good. The time and time zone are set up automatically from the Web. I enter the usual identity details and call this machine "luchenza". Oops - it wants to take a photo for the login. Totally unexpected... I never had a webcam on my main machine! Five minute delay while I comb my hair and search for a tie. Not. Copying of files then starts and lasts about an hour before an invitation to reboot. First have a look at space use:

  >df
  Filesystem           1K-blocks      Used Available Use% Mounted on
  /dev/sda1              3877512   2499384   1181156  68% /
  /dev/sdb1             15512328        52  14724292   1% /user

So far, so good. Reboot and accept 259 updates. Now sda1 is at 85%, a bit tight for comfort. Do apt-get clean, and that gets it back down to 74%. Finally do the reboot requested after the updates and the small SSD settles at 72% occupancy. That'll do fine. We have achieved a working installation of Ubuntu on the Eee PC with remarkably little fuss.

Top

Rescuing files off an unbootable Windows 7 laptop

An Acer eMachines E630 laptop arrived on my desk from a family who were using it mainly for entertainment purposes, plus keeping a modest number of business and school files. Something undisclosed had happened to it to prevent it from booting. All that happened when you tried was a brief flicker of the HDD access light, then a Black Screen of Death with

Status:  0xc000000f
Info:    The boot selection failed because a required device is inaccessible.

With the machine came only the "Quick Guide"; all else was either lost or on the inaccessible hard drive. Apart from use of the F2 key to alter BIOS options and F12 to choose a boot device, I knew nothing.

OK, at least I can try booting Linux off a DVD. Pop a Ubuntu 12.04 32-bit DVD in the drive and start it. No problem, the "Try Ubuntu"/"Install" screen soon appears. Hmmm, no option to run memtest here, but it would be good to do that first. There's a DVD of OpenSUSE 11.4 lying around, so put that in instead and run memtest. The standard battery of tests completes OK. Good! Just into the second run, the laptop abruptly powers off.

Might as well run Ranish Partition Manager to see a low-level map of the partitions. No floppy drive on the laptop, naturally, so I download and burn Hiren's Boot CD vn. 15.2 and run it off that. It shows three partitions:

  1. A medium-sized partition of type 39
  2. A tiny partition of type WIN NT NTFS
  3. A partition of type WIN NT NTFS occupying the rest of the drive

The second one is marked as active. While I am reading these results, the laptop abruptly powers off again.

Try using Hiren's Boot CD to boot out of these partitions. No. 2 fails like the normal startup. No. 3 isn't a boot partition. No. 1 starts Windows and goes straight to an "eMachines Recovery Management" screen. That should be what we want! But no, you can only reset the machine to its factory state; the option to retain user data is greyed out. Nobody has ever done a backup!

There are numerous diagnostic tools on the Hiren CD, but it soon becomes clear that it won't be possible to use any of them; the laptop powers off before any serious work can be done. Even when nothing is going on, the fan can be heard running hard before the shutdown. Is there something about that version of Windows which is running the machine too hot? On the other hand, it was possible to run live Ubuntu Pangolin for more than a week without a break (and with a quiet fan).

Before attempting to get the files off the hard drive, it would be good to check for faults. Here's where Ubuntu should be useful, so select the "Try Ubuntu" option to run it off the DVD without touching the hard drive. Soon the Unity desktop is running, and I can start a terminal window. I'm guessing the HDD partitions are going to be "sdaN", so run the commands:

> sudo mkdir /media/hdd1 /media/hdd2 /media/hdd3
> sudo mount /dev/sda1 /media/hdd1
> sudo mount /dev/sda2 /media/hdd2
> sudo mount /dev/sda3 /media/hdd3
> df
...
/dev/sda1     12586892  9565860   3021032  76% /media/hdd1
/dev/sda2       102396    26040     76356  26% /media/hdd2
/dev/sda3    299880788 67126600 232754188  23% /media/hdd3

Good! Now we can check the readability of each partition by:

> sudo dd if=/dev/sda1 of=/dev/null
> sudo dd if=/dev/sda2 of=/dev/null
> sudo dd if=/dev/sda3 of=/dev/null

The first two report the expected number of 512-byte records read, but the last can only read 11667816, not the twice 299880788 plus 8 expected. Sure enough, the output of dmesg now shows I/O failures. After closing in on the fault with ever shorter reads, we find that only records 11667816 to 11667823 inclusive are defective; all later ones are still good. In fact, dmesg is reporting problems with logical block 1458477; 11667816 is 8 x 1458477, so as far as dmesg is concerned, there is just a single faulty block of 4096 bytes.

But what files are affected? We can read every directory and file on the third partition in various ways. The following should do:

> find /media/hdd3 -type f -exec wc -l {} \; | wc -l
74558

dmesg shows no new errors, so there are 74558 files in the partition and the damaged sectors are not part of any of them.

The way is clear to begin copying the files to another disk. Sneakernet with USB sticks would be very tedious, so can we send them over the network to my main machine? Attach a CAT 5 cable, and ping my broadband router. Works! I didn't have to configure anything! The laptop has been assigned the address 192.168.0.160 by DHCP. (Remember what it was like just a few years ago?) I don't suppose Live Ubuntu runs NFS by default...

> ps ax | grep nfsd
1234   pts/1   S+   0:00 grep --color=auto nfsd

Nope, no NFS daemons running. Can we install it? Indeed, and via the GUI too. Just start Ubuntu Software, search for "nfs", click "Show 15 extra technical items" and select nfs-kernel-server. Click the install button, and it is soon up and running. You hardly notice that you are running a live DVD! Of course, it is necessary to tell NFS what to export:

> sudo vi /etc/exports
... append the following line:

192.168.0.0/24 /media/hdd3(ro,async)

> sudo /etc/init.d/nfs-kernel-server restart

Now go to chikwawa, my main machine running OpenSUSE at the time, and try to mount the laptop partition:

> sudo mount -t nfs 192.168.0.160:/media/hdd3 /media/otherpar
password:
> df
...
192.168.0.160:/media/hdd3
                     299880960  67126528 232754432  23% /media/otherpar

Yay, works! The block counts are slightly different from those given by the same command on the laptop, but I'm just going to ignore that. The way is clear to copy the files to a partition with plenty of spare space on chikwawa.

> mkdir /user/noback/laptopp3
> cd /media/otherpar
> cp -ip -r * /user/noback/laptopp3
...runs, but more than fifty messages like this:
cp: cannot stat `Guest/Music': Stale NFS file handle
cp: cannot stat `Guest/ntuser.dat': Stale NFS file handle

Afterwards, it is clear from the space used that the copy is incomplete. Strange... I didn't reboot the laptop or restart NFS, and Ubuntu isn't touching the files on the source partition. Delete the partial copy and run the whole thing again... and this time it worked! A check showed that the right number of files had been copied, and there were no error messages. Some sort of bug, no doubt.