CQuirke’s Long View

Long lead times need long forward planning

Ubuntu 7, XP and Intel G33

Posted by cquirke on 5 October 2007

Technorati tags: , , ,

I’ve just done a dual-boot build with XP Home SP2 and Ubuntu 7.04 Feisty Fawn on a PC based on Intel’s Frostburg motherboard.  This is an ATX PCI Express DDR2 motherboard, based on the G33 chipset, which in turn includes the ICH9 IO controller. 

Intel G33 and ICH9

The ICH9 is significant, because XP’s \i386 has no native support for it – so a Bart mOS CDR based on the XP SP2 code set cannot see S-ATA hard drives connected to it, and the XP SP2 installation process requires the “press F6 and provide drivers on diskette” step else it too will find no S-ATA hard drives on which it can install (it does however see external hard drives attached via USB!).

This creates a maintenance quandary for Windows installations on this chipset, especially as this has been the motherboard I have used for all new PCs since it became available here a few months ago.  Bart will work if I drop the hard drive in an older and compatible motherboard.  WinPE 2.0 works, but lacks RunScanner functionality.  New Linuxen can write NTFS, which makes it close enough to WinPE 2.0 to use as a mOS; the downside is no registry support at all, but the upside is that it may be easier to set up as a software platform than WinPE, and what I learn is directly applicable to its use as a production OS.

When I started looking at Linux again a few months ago, I threw a motley pile of distros of various vintages at the G33, and none of them stuck (none booted “live”, none could install), presumably because they were made before the G33.  The exception was Ubuntu 7.04, which booted and installed, but the hard drive installation wouldn’t boot.

Vista

I build Vista using the WAIK tool set; I built a reference installation, avoid activating it, initialize via Sysprep, then harvest that via ImageX from WinPE.  New PCs are then built by applying the image via ImageX from WinPE, after partitioning via BING (which I don’t install) and formatting C: to NTFS from WinPE (the Convert tool appears not to work).

Originally I built this as a Vista PC to replace an aging Win98SE PC that was used to run an old version of Flexisign.  The client is a small mom-and-pop signwriting shop that is built around a pair of Summa vinyl cutters that were bought second-hand, along with the Flexisign software that they use.  They can’t afford to buy this software anew; even the upgrade is too costly.

The old version needs a parallel port dongle and works only on the old Win98SE PC and within a Win98SE VM on an XP PC, but the new Frostburg motherboard has no parallel port hardware. The newer version runs fine in XP and Win98SE, but not in Vista, so the initial solution was another Win98SE VM within Vista to run it that way.

After some time on site, I had peer-to-peer networking in effect for both VMs and physical PCs (the trick being how one applies sharing permissions in Vista).  I went home happy, only to find a bunch of increasingly desperate email messages saying this and that doesn’t work, the network file sharing wasn’t working, and “please can we go back to XP”.  Bye-bye Vista; it doesn’t matter how pretty you are, if you can’t host applications and do the basic bread-and-butter stuff, you aren’t a solution here.

Ubuntu 7.04

Given the long-term implications of using vital software that is already old and too costly to replace, we decided to build a dual-boot XP and Linux system.  The clients don’t really like Flexisign that much, and are happy to use something else if it is legally free; that’s more likely to happen on Linux than Windows.

I started by using BING to image the Vista 32G C: to logical volume E: so that I could undo if things got even worse.  Then I deleted the primary C: partition, created a new 20G primary for XP, slid that forward to reduce head travel to the extended partition, and left 12G free space for the Ubuntu installation.

Before installing Ubuntu, I copied off all files from logical volumes D:, E: and F: in case the Ubuntu installation process botched those for some reason.  The last time I installed Ubuntu back in version 5.xx, the installer was quite cavalier, defaulting to wiping the entire hard drive, and I’d recently done data recovery for another client who had botched additional 300G and 500G hard drives when installing Linux.  So I took care to maintain undoability!

The installation process was very easy and went flawlessly, with no additional drivers required.  This time there seemed no risk of botching existing hard drive contents, though I was careful to go “custom” and watch all settings and checkboxes along the way.  I created an 11G primary for Linux and 900M swap partition, which thus filled up the partition table.

If you read my 10 Linux Toe-Stubbers article, you’ll know I anticipated some hard work ahead, if I wanted to “see” the same logical volumes as used from the Windows installation.  But that was easy; Ubuntu shows all of these volumes, already mounted, as icons on the desktop!

I had to roll up my sleeves to edit the grub menu.lst file from Ubuntu, so that it would default to Windows XP (which I hadn’t installed yet) and pause long enough to select Ubuntu instead.  I could see the required file, but it wasn’t obvious how to access it with the required root privileges so that I could save my changes to it.

So I pressed Ctl+Alt+F1 for a bash shell, and from there I figured out how to log in as root and then use the vi text editor to edit the file.  With my Linux Bible on my knees opened at the relevant pages, I trudged through vi’s terminal-era keystrokes to make my changes, then saved and exited.  The menu now works and defaults correctly, but the timeout value of 15 does not seem to give 15 seconds of menu time – something I’ll fix later.

Everything works in Ubuntu except the integrated LAN adapter – so I’ll have to download possible vector graphics applications etc. from the XP side of the fence.  But for now, I’m happy enough to move on.

XP Home

In contrast, the installation of XP Home was a trickier affair.  Before I discovered WAIK, I used to build XP systems interactively; now I do so by applying a reference build via WAIK’s tools, much as described for Vista.  Normally I use a 7.9G FAT32 C: for XP, but they needed more C: space (thanks to Garmin and Google Earth bloat factors), so I formatted the 20G C: to NTFS in order to stay with paging-friendly 4k clusters.  Then I applied my XP installation image.

This resulted in an installation that booted into a BSoD STOP error, including from Safe Cmd; also, the Recovery Console and DOS Mode Boot.ini menu entries didn’t work.  None of this surprised me; after all, the motherboard chipset was different and beyond the native capabilities of the \i386 file set, and as I’d changed the partition size, any PBR images used to boot Recovery Console or DOS Mode would be doomed. 

DOS Mode won’t run from NTFS anyway, so the plan would be to delete that option from Boot.ini, and renew the Recovery Console by re-installing that from the generic OEM XP CD that I’d bought for the build.

But first, I had to do a Repair install to create a code driver code set that matched the newer motherboard.  That in turn failed, as the base code set could not see the S-ATA hard drive through ICH9.  So it was off to Intel’s web site to download the appropriate drivers, and make a 1.44M diskette to wave at the F6 opportunity.

With a diskette drive hooked up to host the diskette, I retried the repair install, and this time, all went well.  The F6 process appears to ignore the diskette at first, but later stops and lists the drivers found on it, at which point you need to know which option to choose after pressing S to add such things (I chose the first entry, i.e. ICH9R).

After that, all went as well as can be expected for an XP repair install; all patches and IE 7 lost, dialogs to carefully step through so as to re-assert regional settings and skip the creation of unwanted new user accounts, then fixing of lost settings such as “don’t automatically restart on errors”, “don’t do System Restore on logical volumes D:, E:, and F:”, etc.

A pleasant surprise was that the XP imaging and repair install had not botched the grub system-level partition manager!  Not only had that survived, but my re-use of the sample Windows boot entry settings actually matched the installation I created, so that worked as well.

The activation process was sticky, too; I could not log into XP without activating first, and activation over the Internet failed because the installation didn’t have drivers for the LAN adapter as yet – a classic “don’t kick away the ladder” kind of meta-bug.  If I didn’t know to select the “activate by telephone” option, I’d have been stuck at this point, but that process went smoothly.

Overall impressions

I was impressed with Ubuntu 7.04; it not only took to the new hardware with aplomb, but anticipated and catered for my desire to access to other hard drive volumes without me having to manually mount them, and then bang my head against automating this process on every Ubuntu boot.

It may seem unfair to expect XP SP2 Home to work as well with hardware that didn’t exist when the code base was created, but this CD appears to have been re-made since the original SP2 (the activation input key is longer, probably a recent change as Microsoft ran out of product key space for the product).  It would have been nice, though at the cost of testing etc., had core driver support for new chipsets been added – especially as sales of XP have been extended due to demand.

I don’t know how easy it will be to get Intel’s LAN adapter working in Ubuntu, or what other problems may have to be solved down the line, but it’s a good start!

Advertisements

Posted in Linux | 1 Comment »

My 10 First Linux Toe-Stubbers

Posted by cquirke on 22 September 2007

Technorati tags: ,

The first 10% of what you learn takes 90% of the effort, and as it can never be undone (merely “painted over”) it’s important to start right.

Some of the first 10 things I needed to learn about Linux are basics, others are not; i.e. less-basic things that have to be got right, before anything else can follow.

My perspective is of a Windows user wanting to dual-boot to Linux, with most of the hard drive’s contents being visible to both OSs.  As a builder of such systems, I have strong Windows skills, good general computing sense, and very few Linux smarts!

1  Where’s “Ctl+Alt+Del” ?

Since Windows 95 it’s been instinctive to do the “Vulcan grip” of Ctl+Alt+Del to bring up the task manager, so that errant tasks can be killed.  Almost as soon as I’d booted a Knoppix Live CDR, I needed the equivalent Linux skill, and it’s very frustrating without it.

As far as I know, the answer is various key combinations that will launch command interpreters (which are called “shells’ in Linux), and from there, I’d be expected to enter commands to list tasks to read the corresponding ID, then kill particular tasks via that ID.

2  Where are the “drive letters” ?

Since Windows 95, the DOS file system navigation of drive letters, directories and files has been abstracted to a namespace of folders and objects.

UNIX and Linux have always had that level of abstraction built into the file system, such that what appear to be non-file-system objects in the modern Windows namespace will appear to be syntax-valid entities within the Linux file system. 

We’ve had a whiff of that with DOS devices like LPT1:, CON:, etc. that were carried over from UNIX, but Linux takes that further; such devices can be “pathed” as if they were directories and files within the file system structure.

So not only does one use the “file name” hda1 to refer to the first partition on the first hard drive, it’s also more fully expressed as /dev/hda1 as within the dev “directory”.  Things that are not actually files or directories, have to be “mounted” as items within a directory, so that file system syntax can be applied.

3  How do I know what type a file is?

DOS had strong links between file types and file name extensions, but no system to extend this to automatic association of file types to arbitrary programs, as was added in Windows 95.  Alas, this invaluable safety feature is being eroded within modern Windows.

In contrast, UNIX and Linux don’t rely on visible file name extensions to associate files with programs that “open” them.  It may sometimes user these by convention, e.g. .gz or .tar for archives, but most of the time there is no obvious indication of what a file is, or what it can do.

How do I set default OS in boot loader?

Now we get into specific things that need to be done, whether they are “basic” or not. 

Windows has no generic system-level boot management tools; all of its boot selection mechanisms start within the OS boot and work only for peer and older Microsoft OSs.

Thus when you set up Linux and Windows as a dual-boot, it is Linux that generally brings the system-level boot manager to the party; either lilo or grub.  And in time-honored software vendor tradition, it will default to booting itself unless you choose otherwise.

So one of the first things a Windows user playing with Linux as alternate boot will want to do, is edit the boot loader’s configuration file to set Windows to boot first, as well as clean up what is often rather mucky menu text.

It seems as if no Linux disto anticipates this need; you may have plenty of friendly “getting started” help stuff, but do you think “edit boot manager settings” will appear as an icon or menu drop-down?  I never did find out how to that in Ubuntu 5.x, and just gave up in the end.

5  How do I stop Linux dialing up all the time?

Your mileage may vary on this one, but this was a major PITA in Ubuntu 5.xx – once set to be able to dial up to the Internet, it would do so on every boot. 

In a place where local phone calls to ISPs are billed per second by the local telco monopoly, this is a Bad Thing – especially as any unattended reboot will default to Linux and do this again.  There’s no “can I do this?” dialog to cancel, either; it would just go ahead and help itself to your phone bill, for no apparent reason.

I never did find an answer to this, other than never boot Ubuntu again.  I could have tried harder, but why should I have to?  This should be something intuitive to manage via a control panel of some kind. 

6  Doesn’t Linux know what an extended partition is?

To dual boot Windows and Linux on a single hard drive, with data volumes visible to each, one needs at least three of the four available partition table entries; one for Windows OS, one for Linux OS, and an extended partition containing the data volumes visible to both.

However, some Linux distros expect to hog three out of these four partitions for itself; one for the Linux system, one for swap space, and one for user data.

I know the “extended partition” is part of Microsoft OS space, rather than system space, but as Linux already understands and accesses FATxx and NTFS file systems, it’s surely not asking too much for it to be able to use logical volumes within an extended partition, rather than insisting of hogging 3/4 of the system partition table?

7  How do I mount arbitrary hard drive volumes?

When you first start up Linux via dual-boot, you won’t see your “Windows” partitions, until you mount these.

So finding out how to mount such volumes is one of the first things you need to do – but like (4), even the friendliest distros orientated towards converting Windows users do not seem to anticipate this need.

Good news: Ubuntu 7.04 automatically finds and mounts accessible hard drive volumes, and lists them as desktop icons for easy access!

8  How do I write and run “batch files” ?

I know you can enter shell commands into a text file and use that as a script, but the mechanics to do that are not obvious; where to save such files, what file name extension to use, and how to invoke it again.

This follows on from (7), i.e. once you figure out the command to mount your data volumes, you want to use a command that is easier to remember than what looks like modem line noise!

9  Can hard drive volumes be auto-mounted on boot?

One wants shared access to local data storage to be as transparent as possible, i.e. have such hard drive volumes mounted when Linux starts.

In contrast, Windows is too good at this; it automatically assumes every visible hard drive volume is part of the system, and starts groping content and writing to disk as soon as it starts up – which poses malware and data risks in various maintenance contexts, driving the need for a competent maintenance OS.

As noted in item 7, Ubuntu 7.04 solves this problem out of the box by default.

10  Where’s the “startup axis” ?

Windows has an absurdly large number of ways to integrate arbitrary code so that it runs automatically, and this is a bane of malware management.

But it’s not at all obvious where or what the equivalent(s) in Linux may be, i.e. how arbitrary commands, scripts or programs can be run whenever Linux starts up.

Posted in Linux | 7 Comments »

More Focus, Less History

Posted by cquirke on 22 September 2007

Technorati tags:

Have you noticed how little of what you read, is about what you wanted to know about?  Firstly, there’s pointless “friendly” waffle like the two sentences you have just read.  Then there’s history of how things used to be, but aren’t anymore.  Then there’s background that may or may not be useful.

To some extent, one expects this on commercial sites, where a single article like this will span several pages that have to be accessed one after the other – with 50% screen area taken up by banner ads etc.  Blogging discourages that, as each post ideally fits on one page.

For example, many articles on quantum physics may start with Plato’s atoms and trace the history from there onwards.  Or an article on malware prevention may waste time on virus/worm/trojan taxonomies that are way past their sell-by date, the history of the first known virus, etc.  Or a book on “how to use Linux” will start off on Linux politics, which tells you nothing about how to use it.

I’m as prone to digression and waffle as anyone, but I’ll try to focus when I write technical articles here, and link out anything that isn’t directly about what the subject line claimed the article is about.

Posted in Blogging | Leave a Comment »

Site Glitches?

Posted by cquirke on 16 September 2007

Technorati tags:

One odd thing about this site (or rather, this blog) is that sometimes it comes up in the proper colors, and sometimes not.  Often it comes up in grey, and will then reload with the right colors after a browser refresh.  No biggie, but not confidence-inspiring.

Also, I’m not seeing categories appearing, either after these have been created in Windows Live Writer (which seems to “see” the host site’s category system OK) or after fiddling via “edit this post”, and I’m doing now.  This is a bigger issue to me, because what I want to do here will largely depend on navigation and organization that rests on categories, tags etc.

Posted in Blogging | Leave a Comment »

Hello World!

Posted by cquirke on 11 September 2007

Another day, another blog, eh?

Well, I liked the look of this blog host, and I get the feeling it’s one that I can grow into.  There’s a lot more apparent “depth” to what one can do, compared to the blog hosts I’m used to, and much of this may be on target for a blog that also functions as a web page.

I’d want to post from Windows Live Writer, just so I don’t have to learn another online post editor, and be able to back up the entire blog.  This host seems to support that via the “export to XML” function.

I’m currently looking at Linux (again), as I do from time to time.  I’m prompted by some unsettling moves within Microsoft’s Windows platform; poor documentation of product activation and WGA, combined with false-positive activation demands, a recent WGA service failure, and the switch to diskless “air box” products seen with OEM MS Office 2007. 

These things raise the impact of the commercial software model from a one-time payment for a product, to an ongoing vendor dependence that is structured on the vendor’s terms.  I don’t mind paying for good software, but my ability to use that software should not hinge on real-time vendor politics, or whether their on-line services are working properly or not. 

If I was prepared to accept that sort of fragility, I might opt for the third software model; the use of web-based applications, such as this blog hosting service.

Posted in Uncategorized | 11 Comments »