<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>thinkpad &#8211; Everything is Broken</title>
	<atom:link href="https://play.datalude.com/blog/tag/thinkpad/feed/" rel="self" type="application/rss+xml" />
	<link>https://play.datalude.com/blog</link>
	<description>Efficiency vs. Inefficiency, in a no-holds barred fight.</description>
	<lastBuildDate>Wed, 16 Mar 2022 02:37:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>All Change. Mandriva 2008 to Ubuntu 8.04</title>
		<link>https://play.datalude.com/blog/2008/08/all-change-mandriva-2008-to-ubuntu-804/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Tue, 19 Aug 2008 01:18:15 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[clocksource]]></category>
		<category><![CDATA[RKUH]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wireless]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=53</guid>

					<description><![CDATA[As I noted in a previous post I was recently the victim of a Random Kernel Upgrade Hell (RKUH). Maybe I should trademark that acronym, although its not particularly prounounceable like SNAFU, or PEBCAK. Anyway &#8230; the fact was that I was spending several hours trying to fix various problems with wifi drivers, VMware server, ... <a title="All Change. Mandriva 2008 to Ubuntu 8.04" class="read-more" href="https://play.datalude.com/blog/2008/08/all-change-mandriva-2008-to-ubuntu-804/" aria-label="Read more about All Change. Mandriva 2008 to Ubuntu 8.04">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As I noted in a <a href="http://play.datalude.com/blog/?p=37">previous post</a> I was recently the victim of a Random Kernel Upgrade Hell (RKUH). Maybe I should trademark that acronym, although its not particularly prounounceable like SNAFU, or PEBCAK. Anyway &#8230; the fact was that I was spending several hours trying to fix various problems with wifi drivers, VMware server, truecrypt and the sound in Skype, when it suddenly occured to me that a re-install was probably quicker. The double edged sword of Linux: quick to reinstall, but then again why should you need to do it so often? Well I guess in my case I push the OS pretty hard with some esoteric applications, but even so &#8230;</p>



<span id="more-53"></span>



<p class="wp-block-paragraph">So, a few quick notes. The re-installation process was painless. I have my data on a separate /home partion, so I just backed that up to a separate USB hard disk (using partimage on a Gparted boot CD), and installed Ubuntu over the top of my Mandriva partition.I have to say the Ubuntu installer is a bit simpler than the Mandriva one when it comes to the business of disk partitioning.</p>



<p class="wp-block-paragraph">It took a few minutes of jiggling to re-arrange the partitions once the install had finished, but then I was good to go. I took out some bits of software I didn't need, installed a few must-have applications so I could get on with my work, and finshed the rest of the day happy. In this case the fact that truecrypt had suddenly broken in Mandriva was the deciding factor, as I needed data on that partition to work: once I had that working on Ubuntu, which I have to say was seamless, then I was good to go.</p>



<p class="wp-block-paragraph">Overnight I installed some more software and did an update to get the software up to date. I have a very slow connection so this kind of thing takes a few hours. I rebooted and everything was fine. For a few days.</p>



<p class="wp-block-paragraph">But then last night after having worked all day, I switched my computer on again to play a DVD which was skipping on my standard DVD player. It took an age to boot up and wireless didn't work. Also everything was sluggish, taking sometimes two or three seconds to respond to a keypress. I played the DVD and went to bed, sulking.</p>



<p class="wp-block-paragraph">I really couldn't understand why it was behaving like this all of a sudden. I hadn't done any kernel updates (RKUH!) in the last few days, which is my normal source of instability, and consequent insanity. I checked dmesg, and tracked it down to this section:</p>



<pre class="wp-block-code"><code>&#91; 33.957128] Probing IDE interface ide0...<br>&#91; 34.915447] hda: FUJITSU MHV2060AH, ATA DISK drive<br>&#91; 34.915591] hda: host max PIO4 wanted PIO255(auto-tune) selected PIO4<br>&#91; 34.919261] hda: UDMA/100 mode selected<br>&#91; 34.922862] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14<br>&#91; 34.992563] Probing IDE interface ide1...<br>&#91; 35.302438] Clocksource tsc unstable (delta = 136417566 ns)<br>&#91; 35.306438] Time: acpi_pm clocksource has been installed.<br>&#91; 35.319400] hdc: UJDA750 DVD/CDRW, ATAPI CD/DVD-ROM drive<br>&#91; 35.319603] hdc: host max PIO4 wanted PIO255(auto-tune) selected PIO4<br>&#91; 35.319706] hdc: UDMA/33 mode selected</code></pre>



<p class="wp-block-paragraph">After searching for a bit, I thought the "Clocksource tsc unstable" looked likely and it seemed that a few other people had been experiencing long boot times due to it. I added clocksource=hpet to my boot stanza, and bingo, boot is once again fast and wireless works like a dream.</p>



<p class="wp-block-paragraph">So, although the fix was fast, once again I'm forced to ponder the question "Why did this suddenly happen?" My Thinkpad R51e has always caused me problems with Linux due to its 'special' hardware, but really, if I didn't change anything on the system, why should it suddenly start doing this to me? And if I was a normal guy-in-the-street user, how long do you think it might take me to fix this? Or indeed, to run scuttling back to Windows?</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>More Power</title>
		<link>https://play.datalude.com/blog/2008/04/more-power/</link>
					<comments>https://play.datalude.com/blog/2008/04/more-power/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 09 Apr 2008 03:20:59 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[notebook]]></category>
		<category><![CDATA[power management]]></category>
		<category><![CDATA[thinkpad]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=23</guid>

					<description><![CDATA[We're getting into summer in the Philippines, and I was just worrying how hot my Thinkpad R51e was running. Its 32 degrees in the room, and my CPU is running at a consistent 73 degrees, according to cat /proc/acpi/thermal_zone/THM0/temperature which seems a bit unhealthy. My motherboard fried itself twice last year, and I figure that ... <a title="More Power" class="read-more" href="https://play.datalude.com/blog/2008/04/more-power/" aria-label="Read more about More Power">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>We're getting into summer in the Philippines, and I was just worrying how hot my Thinkpad R51e was running. Its 32 degrees in the room, and my CPU is running at a consistent 73 degrees, according to</p>
<pre>cat /proc/acpi/thermal_zone/THM0/temperature</pre>
<p>which seems a bit unhealthy. My motherboard fried itself twice last year, and I figure that might have had something to do with it.</p>
<p>Anyway, I started casting around for things to reduce the power consumption, and found this powertop utility, apparently developed by Intel. (http://www.lesswatts.org/projects/powertop/) You can download it and install it from the site, but I just did a quick</p>
<pre>sudo apt-get install powertop</pre>
<p>and that seemed to work pretty well. When you run it (with sudo powertop), it reports all the things that are keeping your CPU awake and suggests a few things you can do to consume less power. Even better it will make these changes for you, if you press the appropriate letter on the keyboard.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2008/04/more-power/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Big Switch 7: Shake your Booty</title>
		<link>https://play.datalude.com/blog/2008/03/big-switch-7-shake-your-booty/</link>
					<comments>https://play.datalude.com/blog/2008/03/big-switch-7-shake-your-booty/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 26 Mar 2008 07:08:24 +0000</pubDate>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[thinkpad]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=18</guid>

					<description><![CDATA[OK, in the last post, I had moved my partitions around substantially, so we were obviously in for a few problems booting. To recap, the new layout looks like this: /dev/hda1 &#8211; 20Gb &#8211; Linux main system (moved and enlarged) /dev/hda2 &#8211; 100Mb &#8211; /boot partition (moved) /dev/hda4 &#8211; 1 Gb &#8211; swap partition (moved) ... <a title="Big Switch 7: Shake your Booty" class="read-more" href="https://play.datalude.com/blog/2008/03/big-switch-7-shake-your-booty/" aria-label="Read more about Big Switch 7: Shake your Booty">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>OK, in the <a href="http://play.datalude.com/blog/?p=12">last post</a>, I had moved my partitions around substantially, so we were obviously in for a few problems booting. To recap, the new layout looks like this:</p>
<ul>
<li> /dev/hda1 &#8211; 20Gb &#8211; Linux main system (moved and enlarged)</li>
<li>/dev/hda2 &#8211; 100Mb &#8211; /boot partition (moved)</li>
<li>/dev/hda4 &#8211; 1 Gb &#8211; swap partition (moved)</li>
<li>/dev/hda3 &#8211; Extended partition containing
<ul>
<li>/dev/hda5 &#8211; 17 Gb Data partition (enlarged)</li>
<li>/dev/hda6 &#8211; 17Gb /home partition (newly created to house all the VMs)</li>
</ul>
</li>
</ul>
<p>The first problem was getting the thing to boot up. The MBR was still on the boot sector of the drive, but it was telling the computer to boot from the wrong sector. I pulled out the Mint / Ubuntu install CD and booted from that.<span id="more-18"></span></p>
<p>From the desktop (running on the live CD), I opened a terminal and did this:</p>
<blockquote><p>sudo grub<br />
find /boot/grub/stage1<br />
find /grub/stage1</p></blockquote>
<p>This asks grub to locate its files on all available partitions: the first find command didn't work but the second one did. It returned hd(0,1), which is the first hard disk, second partition. Grub starts from zero, while linux hard disk enumeration starts from a and 1, so hd(0,1) equals hda2. So, armed with this information we do:</p>
<blockquote><p>root (hd0,1)<br />
setup (hd0)<br />
quit</p></blockquote>
<p>This tells grub that it should boot partition (hd0,1) and that it should reinstall itself on the MBR of hd0 (=hda).</p>
<p>Now we can reboot from the MBR on the hard disk, and grub will be able to find its files. But we have a separate boot partition, so when we boot, it still won't be able to find the root file system. So now, when we boot the first time, we can interrupt the boot process and hit 'e' to edit the boot command. Grub is in the boot sector on hd(0,1) and the rest of the filesystem is on hd(0,0), so we need to tell grub where the filesystem is. The boot command reads:<br />
/boot/vmlinuz-2.6.22-14-generic root=/dev/hda2 ro quiet splash<br />
so we change it to<br />
/boot/vmlinuz-2.6.22-14-generic root=/dev/hda1 ro quiet splash<br />
And also, I know that I need some extra options to boot this darn Thinkpad R51e, so actually I changed it to<br />
/boot/vmlinuz-2.6.22-14-generic root=/dev/hda1 ro quiet noapic ec_intr=0 splash</p>
<p>You can actually try this a few times until the thing boots correctly. Once you hit the magic combination, remember what it was, and then when you've booted successfully, you just edit /boot/grub/menu.lst to make the changes permanent.</p>
<p>All of this is a bit of a heart-stopping few minutes, but at the end of the day, all your data is backed up and if the worst comes to the worst, you can restore it &#8230; right?</p>
<p>But I was in for a couple of surprises. The first surprise comes from the fact that Ubuntu doesn't mount its disk partitions with /hda1, hda2, etc, but it uses a UUID. There are some good reasons for this &#8212; it makes it easy to move partitions around. However as I'd cloned the partitions when I moved them, there were two partitions with the  same UUID.</p>
<p>Here are the basic steps as I recall them, although this was some time ago now:</p>
<ul>
<li>Find out the UUIDs of each partition with eg <code> sudo vol_id -u /dev/hda1</code></li>
<li> Create a new UUID for the hda1 if necessary with eg <code>sudo tune2fs -U random /dev/hda1</code></li>
<li>Edit /etc/fstab and enter the correct UUIDs against the correct partitions.</li>
</ul>
<p>There is more information on this to be had in the Ubuntu forums. A search on UUID will get you a bunch.</p>
<p>Final surprise. When I run gparted to check the partitions, I can see  that the root partition, hda1 is mounted as / and /dev/.static/dev</p>
<p>Although this hasn't caused me any problems, it still unnerves me. Let me know if you have a solution to this.</p>
<p>So there we have it. A Windows to Linux migration in only a few weeks! Actually next time I could do it in a day or so, but I wanted to test everything out and take it slowly. Possibly a smarter way of doing it would be to buy a new hard disk, but I was too cheap for that. 🙂</p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2008/03/big-switch-7-shake-your-booty/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Big Switch 6: Virtually there.</title>
		<link>https://play.datalude.com/blog/2008/02/the-big-switch-part-6/</link>
					<comments>https://play.datalude.com/blog/2008/02/the-big-switch-part-6/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 06:14:38 +0000</pubDate>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[vmware]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=12</guid>

					<description><![CDATA[OK a quick recap from my last post, where I realised that then next step was going to take some explaining &#8230; A week or so went by without incident and it was time to consider the final stage: moving Windows to a virtual machine and getting rid of the old Windows partition. Here are ... <a title="Big Switch 6: Virtually there." class="read-more" href="https://play.datalude.com/blog/2008/02/the-big-switch-part-6/" aria-label="Read more about Big Switch 6: Virtually there.">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>OK a quick recap from my <a href="http://play.datalude.com/blog/?p=9">last post</a>, where I realised that then next step was going to take some explaining &#8230; A week or so went by without incident and it was time to consider the final stage: moving Windows to a virtual machine and getting rid of the old Windows partition. Here are the main stages.</p>
<ol>
<li>Make a windows install CD from the install files on the windows partition (Thinkpads don’t have an install CD, they use an Install partition)</li>
<li>Install vmware on Ubuntu and make a Windows Virtual Machine.</li>
<li>Delete the old Windows and IBM Install partitions</li>
<li>Re-arrange the remaining partitions to suit the new arrangement.<span id="more-12"></span></li>
</ol>
<p><strong>Making the Windows Install CD.</strong></p>
<p>This is a little bit complex because I have an IBM Thinkpad. The OS on these comes as a 4Gb rescue partition which you can boot into and restore your Thinkpad to factory condition. I made the DVDs and CDs to complete this, but actually I didn't want to use these, as it a) reformats the hard disk into a single partition + recovery partition, and b) installs a whole raft of IBM drivers widgets and bloatware that I don't want. Nevertheless I have an OEM license for Windows XP home which I'm entitled to use on this machine, so the question is how to get it installed in a Virtual machine.</p>
<p>The answer I found in several blog posts and howto articles, which I've subsequently lost. You can get most of the info here http://www.howtohaven.com/system/createwindowssetupdisk.shtml</p>
<p>Here is how I modified that info and the main steps I took:.</p>
<ol>
<li>Start with the files installed in c:\i386. Copy these to another location so you can work on them without breaking anything (despite the fact you're going to vape your windows install in a couple of hours anyway)</li>
<li>With the files in the new location (say d:\xpinstall) you need to add some plain text files to tell it that the install is an OEM install (see reference article above)</li>
<li>Slipstream in Service Pack 2.</li>
<li>Use nLite to slim down the installation to the essentials, (we don't need no stinkin' helpfiles!) and then build you a boot CD iso image.</li>
</ol>
<p><strong>VMware Install and setup</strong></p>
<p>Meanwhile, back in Linux Mint / Ubuntu, we have to install vmware server. This is done pretty easily through Synaptic. If you don't see it in there, you'll have to enable the third party software repositories. I chose VMware server as opposed to Workstation or Player because it was freer than Workstation, and it had more functionality than the Player.</p>
<p>Once vmware Server is set up, you need to start it from the item it put in your Start Menu, and connect to localhost. From here you can create a new machine. I opted to use a dynamic container with a max size of 8Gb, although I could have got away with less. I set the CD Drive to point to the .iso image I created above (brilliant feature!), and then booted it up. Windows installed like a charm, and using the OEM licence key on the bottom of my Thinkpad, it was all legal. I also set up the Network connection to NAT to my network so that the Windows machine is never directly exposed to the Network / Internet and the Ubuntu install effectively acts as a router. VMware takes care of all this for you, so you don't have to think about it too much. However if you want to run a server in VMware, you'd probably use the direct, non-NAT connection.</p>
<p>The final setting you may want to play with is the memory allocation. I have 1Gb of RAM, and I allocated half of that to the virtual machine. Windows runs fine in that, and this is a very low spec machine.</p>
<p>Once Windows is installed, obviously you have to do all that updating, and installing of AntiVirus. I also installed a couple of tools I use and my accounting software. Within the virtual machine, I set up a Truecrypt container for my accounts data, and then wrote a quick script to sync this back up to my Ubuntu installation using scp. This means once I've finished doing my monthly accounts I can just hit the button and it backs it up for me.</p>
<p>Having set all this up, I took a snapshot, and backed up the entire VM to an external hard disk, so if I ever need to recover it, I can do so in minutes. Very cool.</p>
<p><strong>Deleting the old partitions</strong></p>
<p>Once again, I left this for a week or so until I was sure things were working smoothly. During that time I also experimented with a couple of other VM images &#8211; I built one of Centos 5 server so I could prototype some development, and tried out Zimbra mail server. Unfortunately the Zimbra server comes as an rPath device, so you don't really get to play with it properlly. Anyway, this virtualization stuff is great. I wish I'd done it properly sooner.</p>
<p>The trouble with having all these virtual images is they take up a lot of space, so I was now beginning to run out of disk space. Time to get rid of those unused partitions.</p>
<p>The tool for the job is the gparted live CD, which I hadn't used for about a year. I was pleased to see that the latest version, despite a modest increment in its version number, is streets ahead of the last one I used. Great job guys!</p>
<p>So here's what we do.</p>
<ol>
<li>Plug in an external USB drive to back up onto.</li>
<li>Boot from the gparted Live CD, and make sure the USB drive is mounted. eg.
<ul>
<li>mount -t vfat /mnt/sda1 /mount/usb</li>
</ul>
</li>
<li>Start partimage from the menu, and use it to back up the partitions we're going to delete. Hack them into 2Gb chunks as suggested by partimage, as we're backing up to a VFAT drive. A 20Gb partition took about 20 mins. That's fast if you've ever used something like Encase &#8230;</li>
<li>Back up any live data partitions you've got as well, just for good measure. You can delete them if all goes well</li>
<li>Use Gparted to delete the partitions on the disk that you don't want.</li>
<li>Reboot the computer and check you got rid of the correct ones &#8230;</li>
<li>OK now to organise them</li>
</ol>
<p><strong>Rearranging the partitions on the disk</strong></p>
<p>Reboot into the Gparted CD. In my case what I now have is</p>
<ul>
<li>a 10 Gb root Linux partition (/) on /dev/hda5</li>
<li>a 1 Gb swap partition on /dev/hda6</li>
<li>a 100Mb /boot partition on /dev/hda7</li>
<li>a 15Gb vfat data partition on /dev/hda3 which is in an extended partition, /dev/hda4</li>
<li>Two chunks of free space.</li>
</ul>
<p>Moving partitions around in gparted is just a case of copying and pasting. Really. The potential for disaster is high, but if you're all backed up, then there's nothing to lose right? I cut and pasted, and re-sized and re-organized, until I was left with this:</p>
<ul>
<li> /dev/hda1 &#8211; 20Gb &#8211; Linux main system (moved and enlarged)</li>
<li>/dev/hda2 &#8211; 100Mb &#8211; /boot partition (moved)</li>
<li>/dev/hda4 &#8211; 1 Gb &#8211; swap partition (moved)</li>
<li>/dev/hda3 &#8211; Extended partition containing
<ul>
<li>/dev/hda5 &#8211; 17 Gb Data partition (enlarged)</li>
<li>/dev/hda6 &#8211; 17Gb /home partition (newly created to house all the VMs)</li>
</ul>
</li>
</ul>
<p>Having done such major reconstructive surgery I knew I was in for a few glitches on boot up, but I knew I could get around them eventually.</p>
<p>This post has got a bit long &#8230; its continued <a href="http://play.datalude.com/blog/?p=18">here</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2008/02/the-big-switch-part-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
