I was running Slackware 13.0 on my laptop for several months past the upgrade cycle, mainly because it was running fine and I had more important things I wanted to do. Then I read the release notes for 13.37 and noticed that Intel on-board graphics had been through a couple of changes and hardware acceleration had been improved.
I wanted that improvement. For some reason, 3D graphics on the laptop was software enabled, not hardware, and it meant that full-screen YouTube videos, for example, would stutter and stumble along. Annoying.
It was time to upgrade. Because of my slackness (ha), I was two upgrades behind, 13.1 and 13.37. And, I had only done one Slackware upgrade ever, from 12.1 when I first started using it, to 13.0. Still, I hadn't had any problems then so I wasn't expecting any now.
The upgrade text mentioned that upgrading through more than one upgrade was not supported. Because I was two steps behind, I decided to do it in two stages: 13.0 to 13.1, then immediately 13.1 to 13.37.
The upgrade instructions were pretty clear, so
upgrade-all, and finally remove any old packages.
Run lilo to set the new kernel and reboot.
Uh-oh. Kernel panic. Darn, I'll need to reboot into rescue mode and poke around to see what I did wrong.
I rebooted with the gparted disc and up it came, no problems. I was clicking a couple of icons on the desktop to re-familiarise myself with gparted, and up popped a file describing how to resize Vista partitions. Now, I had been running out of disk space on the Slackware partition for months and had wanted to shrink the overly generous Vista partition to give me some more room for Slackware. I had tried but hadn't had any luck from the Vista side using Windows tools, so here was a perfect opportunity. Time to put aside the Slackware upgrade, let's do some heavy lifting and repartition the laptop!
I knew gparted and had used it before successfully, and the instructions for resizing were very clear and straightforward, all of which gave me some confidence that the authors knew what they were doing. But, the instructions for Vista were: forget it because it doesn't work for most people, or try it and see. With nothing to lose, I decided to try and see. I fired up the tool, set it to shrink the Vista partition by 20GB, and let it rip.
A surprisingly short time later (about 15 or 20 minutes, I seem to remember), it was done. It printed out a message saying that Vista would do a chkdsk on the next boot to Windows. I didn't want to lose my Vista data, so I rebooted straight into Vista to check how things went.
Vista booted OK and immediately started to run chkdsk. I was worried at first because chkdsk was finding an enormous number of empty inodes, but it ran through all its checks in about 30 to 40 minutes and had no error messages. Whew! It booted up fine and my data was all there. Hooray, the gparted resize for Vista had worked.
Based on how quickly and successfully gparted did the resize, especially compared to doggy and slow Windows repartitioning utilities, I can only say good things about gparted. Recommended.
At this point I had a 20GB spare partition, bigger than the original Slackware root
partition, so this new one would make an ideal root partition. I formatted it to ext3
and copied over the old root partition with
dd if=/dev/sda5 of=/dev/sda6.
(In hindsight, I probably didn't need to format the new partition first, since copying
the old partition over does the same thing.) The only thing left to do was resize the
filesystem (/dev/sda5 was 10GB) to the new size of 20GB. This was straightforward enough
with a filesystem check first (the resize utility makes you do this) using
fsck and then
Fixing the Kernel Panic
By now I'd realised that the kernel panic was because I had forgotten to make an initrd before rebooting. I mounted the new partition on /mnt, did a chroot and ran mkinitrd and lilo. Reboot to test it and... darn it, still getting a kernel panic.
I booted the gparted boot disc again, mounted the root partition and checked out the obvious config files like fstab and lilo.conf. Dummy, I had forgotten to change the fstab entry for the root partition to the new one, /dev/sda6. But sda5 was still a valid functional root system, so why the kernel panic? The panic message was that a valid filesystem could not be found, but I had two of 'em, one sda5 and one on sda6.
OK, time for some googling on running lilo in a chroot. It took a couple of pages of scrolling through links (which was surprising, I would have thought it would be in the first few links) before I realised I had not mounted the /dev filesystem on /mnt/dev. Also, lilo had complained before about not finding some /proc info that it wanted; I suspect it uses /proc/devices.
What had happened was that lilo had set the boot to gparted's /dev/sda6. I still don't really understand why that is not the same as sda6 no matter what.
So, the fix was to
mount --bind /dev /mnt/dev, ditto for proc, chroot then run
lilo. Reboot, and... kernel panic! Youzza.
OK, reboot with gparted and systematically run through everything. It turns out I must have edited the gparted fstab and lilo.conf. In other words, I edited them from a terminal window that had not chrooted into the new environment and so I was editing /etc and not /mnt/etc. Easy enough mistake when you have several terminal windows open.
I fixed that, rebooted and... success! Hooray.
There were still some oddities: sda5 was still being referenced in the dmesg for some reason. Fstab had a reference to sda5 and sda6. I still don't know how that happened, but I edited it to remove sda5. I re-ran lilo (on the basis this was the first time on the new system; in other words not in a chroot environment), rebooted and was now running successfully on Slackware 13.1 using the new root partition on sda6.
Time to upgrade to 13.37. Same as before with the 13.1 upgrade and this time I didn't forget to run mkinitrd. Reboot and success. It only took two days. I must admit much of the two days was putting the damn thing aside because I was sick of dealing with it.
Stepping past two upgrades
Having done it in steps, Patrick's upgrade and changes and hints files are quite straightforward to read. Next time I would probably do it in one big step. Things to watch are changes in the glibc, and any fundamental underlying changes like HAL and udev. If those are changing during the upgrade, I probably would do it in steps or you might end up with part of the system using the old methods and part of it the new methods. Potential conflicts and crashes.