Technology Tales

Adventures & experiences in contemporary technology

Manually adding an entry for Windows 7 to an Ubuntu GRUB2 menu

21st November 2010

A recent endeavour of mine has been to set up a dual-booting arrangement on my Toshiba Equium laptop with Ubuntu 10.10 and Windows 7 side by side on there. However, unlike the same attempt with my Asus Eee PC where Windows XP coexists with Ubuntu, there was no menu entry on the GRUB (I understand that Ubuntu has had version 2 of this since 9.04 though the internal version is of the form 1.9x; you can issue grub-install -v at the command line to find out what version you have on your system) menu afterwards. Thankfully, I eventually figured out how to do this and the process is shared here in a more coherent order than the one in which I discovered all the steps.

The first step is to edit /etc/grub.d/40_custom (using SUDO) and add the following lines to the bottom of the file:

menuentry 'Windows 7' {
set root='(hd0,msdos2)'
chainloader +1
}

Since the location of the Windows installation can differ widely, I need to explain the “set root” line because (hd0,msdos2) refers to /dev/sda2 on my machine. More generally, hd0 (or /dev/sda elsewhere) refers to the first hard disk installed in any PC with hd1 (or /dev/sdb elsewhere) being the second and so on. While I was expecting to see entries like (hd0,6) in /boot/grub/grub.cfg, what I saw were ones like (hd0,msdos6) instead with the number in the text after the comma being the partition identifier; 1 is the first (sda1), 2 (sda2) is the second and so on. The next line (staring with chainloader) tells GRUB to load the first sector of the Windows drive so that it can boot. After all that decoding, my final remark on what’s above is a simple one: the text “Windows 7” is what will appear in the GRUB menu so you can change this as you see fit.

After saving 40_custom, the next step is to issue the following command to update grub.cfg:

sudo update-grub2

Once that has done its business, then you can look into /boot/grub/grub.cfg to check that the text added into 40_custom has found its way in there. That is important because this is the file read by GRUB2 when it builds the menu that appears at start-up time. A system reboot will prove conclusively that the new entry has been added successfully. Then, there’s the matter of selectively to see if Windows loads properly like it did for me, once I chose the correct disk partition for the menu entry, that is!

Exploring the option of mobile broadband

20th September 2010

Last week, I decided to buy and experiment with a Vodafone PAYG mobile broadband dongle (the actual device is a ZTE K3570-Z)) partly as a backup for my usual broadband (it has had its moments recently) and partly to allow me to stay more connected while on the move. Thoughts of blogging and checking up on email or the realtime web while travelling to and from different places must have swayed me.

Hearing that the use of Windows or OS X with the device had me attempting to hook up the device to Windows 7 running within a VirtualBox virtual machine on my main home computer. When that proved too big a request of the software setup, I went googling out of curiosity and found that there was a way to get the thing going with Linux. While I am not so sure that it works with Ubuntu without any further changes, my downloading of a copy of the Sakis3G script was enough to do the needful and I was online from my main OS after all. So much for what is said on the box…

More success was had with Windows 7 as loaded on my Toshiba Equum notebook with setting up and connections being as near to effortless as these things can be. Ubuntu is available on there too, courtesy of Wubi, and the Sakis3G trick didn’t fail for that either.

That’s not to say that mobile broadband doesn’t have its limitations as I found. For instance, Subversion protocols and Wubi installations aren’t supported but that may be a result of non-support of IPv6 than anything else. nevertheless, connection speeds are good as far as I can see though I yet have to test out the persistence of Vodafone’s network while constantly on the move. Having seen how flaky T-Mobile’s network can be in the U.K. as I travel around using my BlackBerry, that is something that needs doing but all seems painless enough so far. However, the fact that Vodafone uses the more usual mobile phone frequency may be a help.

Download Sakis3G

Adding workspaces to Windows

1st July 2010

One of the nice things about working with Linux/UNIX is that you can organise your open applications so that they are open in different workspaces or virtual desktops. When I return to working on Windows, having everything open on the same desktop is something that I find less tidy. However, there is an open source application that adds virtual desktops to Windows and very useful it is too.

It is called VirtuaWin and it adds an icon to the taskbar for switching between workspaces when it is running; there might be a bit of tweaking to be done for it to stay visible all of the time though. You can have it as a startup application in the same way that you have your security software and I have been using it smoothly on both Windows XP and Windows 7 running in VirtualBox virtual machines. Insofar as I have seen it, you can have as many workspaces as you want and switching from one to another is achievable using keyboard shortcuts. Using CTRL, ALT and one of the arrow keys does it for me but you can set up your own. All in all, it’s a small download that brings a little sense of Windows desktop computing.

Consolidation

19th November 2009

For a while, the Windows computing side of my life has been spread across far too many versions of the pervasive operating systems with the list including 2000 (desktop and server), XP, 2003 Server, Vista and 7; 9x hasn’t been part of my life for what feels like an age. At home, XP has been the mainstay for my Windows computing needs with Vista Home Premium loaded on my Toshiba laptop. The latter variant came in for more use during that period of home computing “homelessness” and, despite a cacophony of complaints from some, it seemed to work well enough. Since the start of the year, 7 has also been in my sights with beta and release candidate instances in virtual machines leaving me impressed enough to go popping the final version onto both the laptop and in a VM on my main PC. Microsoft finally have got around to checking product keys over the net so that meant a licence purchase for each installation using the same downloaded 32-bit ISO image. 7 still is doing well by me so I am beginning to wonder whether having an XP VM is becoming pointless. The reason for that train of thought is that 7 is becoming the only version that I really need for anything that takes me into the world of Windows.

Work is a different matter with a recent move away from Windows 2000 to Vista heavily reducing my exposure to the venerable old stager (businesses usually take longer to migrate and any good IT manager usually delays any migration by a year anyway). 2000 is sufficiently outmoded by now that even my brother was considering a move to 7 for his work because of al the Office 2007 files that have been coming his way. He may be no technical user but the bad press gained by Vista hasn’t passed him by so a certain wariness is understandable. Saying that, my experiences with Vista haven’t been unpleasant and it always worked well on the laptop and the same also can be said for its corporate desktop counterpart. Much of the noise centered around issues of hardware and software compatibility and that certainly is apparent at work with my having some creases left to straighten.

With all of this general forward heaving, you might think that IE6 would be shuffling its mortal coil by now but a recent check on visitor statistics for this website places it at about 13% share, tantalisingly close to oblivion but still too large to ignore it completely. All in all, it is lingering like that earlier blight of web design, Netscape 4.x. If I was planning a big change to the site design, setting up a Win2K VM would be in order not to completely put off those labouring with the old curmudgeon. For smaller changes, the temptation is not to bother checking but that is questionable when XP is set to live on for a while yet. That came with IE6 and there must be users labouring with the old curmudgeon and that’s ironic with IE8 being available for SP2 since its original launch a while back. Where all this is leading me is towards the idea of waiting for IE6 share to decrease further before tackling any major site changes. After all, I can wait with the general downward trend in market share; there has to be a point when its awkwardness makes it no longer viable to support the thing. That would be a happy day.

A multitude of operating systems

27th October 2009

Like buses, it seems that a whole hoard of operating systems is descending upon us at once. OS X 10.6 came first and it was the turn of Windows 7 last week with all of the excitement that it generated in the computing and technology media. Next up will be Ubuntu, already a source of some embarrassment for the BBC’s Rory Cellan-Jones when he got his facts muddled; to his credit he later corrected himself though I do wonder how up to speed is his appreciated that Ubuntu has its distinct flavours with a netbook variant being different to the main offering that I use. Along with Ubuntu 9.10, Fedora 12 and openSUSE 11.2 are also in the wings. As if all these weren’t enough, the latest issue of PC Plus gives an airing to less well-known operating systems like Haiku (the project that carries on BeOS). The inescapable conclusion is that, far from the impressions of mainstream computer users who know only Windows, we are swimming in a sea of operating system options in which you may drown if you decide to try sampling them all. That may explain why I stick with Ubuntu for home use due to reasons of familiarity and reliability and leave much of the distro hopping to others. Of course, it shouldn’t surprise anyone that Windows is the choice of where I work with 2000 being usurped by Vista in the next few weeks (IT managers always like to be behind the curve for sake of safety).

Never undercutting the reseller…

23rd October 2009

Quite possibly, THE big technology news of the week has been the launch of Windows 7. Regular readers may be aware that I have been having a play with the beta and release candidate versions of the thing since the start of the year. In summary, I have found to work both well and unobtrusively. There have been some rough edges when access files through VirtualBox’s means of accessing the host file system from a VM but that’s the only perturbation to be reported and, even then, it only seemed to affect my use of Photoshop Elements.

Therefore, I had it in mind to get my hands on a copy of the final release after it came out. Of course, there was the option of pre-ordering but that isn’t for everyone so there are others. A trip down to the local branch of PC World will allow you to satisfy your needs with full, upgrade (if you already have a copy of XP or Vista, it might be worth trying out the Windows Secrets double installation trick to get it loaded on a clean system) and family packs. The last of these is very tempting: three Home Premium licences for around £130. Wandering around to your local PC components emporium is an alternative but you have to remember that OEM versions of the operating system are locked to the first (self-built) system on which they are installed. Apart from that restriction, the good value compared with retail editions makes them worth considering. The last option that I wish to bring to your attention is buying directly from Microsoft themselves. You would think that this may be cheaper than going to a reseller but that’s not the case with the Family Pack costing around £150 in comparison to PC World’s pricing and it doesn’t end there. That they only accept Maestro debit cards along with credit cards from the likes of Visa and Mastercard perhaps is another sign that Microsoft are new to whole idea of selling online. In contrast, Tesco is no stranger to online selling but they have Windows 7 on offer though they aren’t noted for computer sales; PC World may be forgiven for wondering what that means but who would buy an operating system along with their groceries? I suppose that the answer to that would be that people who are accustomed to delivering one’s essentials at a convenient time should be able to do the same with computer goods too. That convenience of timing is another feature of downloading an OS from the web and many a Linux fan should know what that means. Microsoft may have discovered this of late but that’s better than never.

Because of my positive experience with the pre-release variants of Windows 7, I am very tempted to get my hands on the commercial release. Because I have until early next year with the release candidate and XP works sufficiently well (it ultimately has given Vista something of a soaking), I’ll be able to bide my time. When I do make the jump, it’ll probably be Home Premium that I’ll choose because it seems difficult to justify the extra cost of Professional. It was different in the days of XP when its Professional edition did have something to offer technically minded home users like me. With 7, XP Mode might be a draw but with virtualisation packages like VirtualBox available for no cost, it’s hard to justify spending extra. In any case, I have Vista Home Premium loaded on my Toshiba laptop and that seems to work fine, in spite of all the bad press that Vista has gotten for itself.

8?

12th October 2009

It now seems that we have a new version of Photoshop Elements from Adobe for every year unless you’re a Mac user. Version 7 convinced me to splash out and that gained me Camera Raw recognition of my Pentax K10D along with subtly enhanced image processing power that I have been putting to good use to get more pleasing results than I ever got before. What can be achieved by using levels, curves and the shadow/highlight adjustment tool for exposure correction has amazed me recently. Quick selection functionality has allowed me to treat skies differently from everything else in landscape photos, a flexible graduated filter if you like. It seems to work on Windows 7 along with Vista and XP so I plan to stick with it for a while yet. As you may have gathered from this, it would take some convincing to make me upgrade and, for me, version 8 doesn’t reach that mark. All in all, it seems that it is a way of giving Mac users a new release with added goodness after having to stay with 6 for so long; yes, there are new features like autotagging in the image organiser but they just don’t grab me. Given that they already have Aperture from Apple and Windows users seem to get more releases, it’s a wonder that any Mac user would toy with Elements anyway. Maybe, that’s Adobe’s suspicion too.

Seeing how things develop

7th October 2009

One of the things that I do out of curiosity and self-interest is to keep tabs on what is happening with development versions of software that I use. It is for this reason that I always have a development version of WordPress on the go so as to ensure that the next stable version doesn’t bring my blog to its knees. There have been contributions from my own self to the development effort, mainly in the form of bug reports with the occasional bug fix too.

In the same vein, I have had a development version of Ubuntu installed in a VirtualBox virtual machine. There have been breakages and reinstallations along the way when an update results in disruption but it is intriguing too to see how a Linux distribution comes to fruition. In the early days of Karmic Koala (9.10), everything was thrown together more loosely and advances looked less obvious. It is true to say the ext4 file systems support was already in place but the interface looked like a tweaked version of the standard GNOME desktop. Over time, the desktop has been customised and boot messages hidden out of sight. Eye candy like new icons and backgrounds have begun to entice while other features such as an encrypted home folder, Software Store and Ubuntu One came into place. Installation screens became slicker and boot times reduced. All of this may seem incremental but revolutions can break things and you only have to look at the stuttering progress of Windows to see that. Even with all of these previews, I still plan to do a test run of the final revision of 9.10 before committing to putting it in place on my main home PC. Bearing the scars of misadventures over the years has taught me well.

Windows development is a less open process but I have been partial fo development versions there too. In fact, beta and release candidate installations of Windows 7 have convinced me to upgrade from Windows XP for those times when a Windows VM needs to fired up in anger. A special offer has had me ordering in advance and sitting back and waiting. With my Windows needs being secondary to my Linux activities, I am not so fussed about taking my time and I have no intention of binning Windows XP just yet anyway.

The trouble with all of this previewing is that you get buffeted by the ongoing development. That is very true of Ubuntu 9.10 and has been very much part and parcel of the heave that brought WordPress 2.7 into being last year. Things get added and then removed as development tries to fins that sweet spot or a crash results and you need to rebuild things. It is small wonder that you are told not to put unfinished software on a production system. Another consequence might be that you really question why you are watching all of this and come to decide that what you already have is a place of safety in comparison to what’s coming. So far, that has never turned out to be true but there’s no harm in looking before you leap either.

A spot of roughness with VirtualBox 3.02 on Ubuntu

20th July 2009

Among the various things that I needed to do on Saturday, I got to looking at why VirtualBox Windows guests could not shut down and the processes killed. Though it wasn’t clear at the outset, my suspicions began to centre on the sound hardware emulation and how it interacted with the host’s sound capabilities. A look at the  VirtualBox log sent me that way after a spot of experimentation with reinstalling Windows 7 and adding the Guest Additions along with removal and reinstatement of the same for a Windows XP guest that makes my like easier. It also seems that the same problem blighted the start up of Linux guests too. Either removing virtual sound hardware or using the null sound driver seems to allow things to run smoothly. That may not sound ideal but it doesn’t bother me with the host providing all that I need. Also, it’s a moot point as to whether I have come across a bug in VirtualBox or whether using Ubuntu on a hardware configuration on which it wasn’t originally installed is the cause but I have found a way forward that suits me. Saying that, if I find that the issue disappears in a future, that would be even better.

Some things don’t mix…

10th May 2009

Now that the Release Candidate for Windows 7 is out, I have been giving it a whirl in a VirtualBox session and it, like the Beta that I had been trying too, feels a sold enough affair. I went for the complete installation route in place of the upgrade path. I was surprised to find that it bundled my old files into a single folder called Windows_old and that my old user bits and bobs were folded in with this too. There was nothing there that I wouldn’t have missed but this is a nice touch.

However, I have a spot of fixing to do after adding Kaspersky Internet Security 2009. Like the beta, mixing Windows 7 and Kaspersky seems not to be the way to a stable system. Whether this is down to the virtualisation aspect of the business is something that I don’t know but I have found that removing Kaspersky and replacing it made everything sing along together. Booting into Safe Mode and using msconfig to remove and incidences of Kaspersky being called at start up provides a partial restoration of service. Because the msiexec service isn’t running, you need full mode before any software but pulling out any cause for execution of Kaspersky gets that back. I suppose that I could go and put Windows 7 on a real machine to see if Kaspersky causes problems there but that’s not a road that I really want to travel.

  • All the views that you find expressed on here in postings and articles are mine alone and not those of any organisation with which I have any association, through work or otherwise. As regards editorial policy, whatever appears here is entirely of my own choice and not that of any other person or organisation.

  • Please note that everything you find here is copyrighted material. The content may be available to read without charge and without advertising but it is not to be reproduced without attribution. As it happens, a number of the images are sourced from stock libraries like iStockPhoto so they certainly are not for abstraction.

  • With regards to any comments left on the site, I expect them to be civil in tone of voice and reserve the right to reject any that are either inappropriate or irrelevant. Comment review is subject to automated processing as well as manual inspection but whatever is said is the sole responsibility of the individual contributor.