Upgrading TurnKey 12.1 Images - Squeeze to Wheezy

Arwen's picture

Does anyone have any experience or instructions on how to do a distribution upgrade of any of the 12.1 turnkey images (from squeeze to Wheezy). I could not even find the /etc/apt/sources.list file in this path. Are the repos paths in a different file or location? Is it not a good idea to even try this for some reason? Is it better to wait for the 13.0 versions built on Wheezy and port my production files at that point instead of doing a distribution upgrade?

Thanks in advance!!

Jeremy Davis's picture

But TBH I've never tried... The sources lists are in /etc/apt/sources.list.d/

Having said that though if this is a production server and you don't actually have a need for Wheezy then I'd wait. Squeeze will continue to get security updates for some time... You want to migrate to a TKL v13 appliance anyway IMO (depending on the appliance, some have upstream non-packaged components which will not be updated except by migrating to the new version). As for migration (when the time comes) that should be handled easily by TKLBAM.

If you decide to press ahead, let us know how you go.

NSparks's picture

I was playing around on a test system and wanted to do this (actually, I was in the middle of the process when I found this post).

I followed the steps on this page:

http://www.howtoforge.com/how-to-upgrade-debian-squeeze-to-wheezy

But I did two things different compared to that doc:

1) On the first pass of things (making sure that squeeze was up to date before upgrading to wheezy), I did not comment out (I repeat, I KEPT) the following line in the /etc/apt/sources.list.d/sources.list:

deb http://archive.turnkeylinux.org/debian squeeze main

2) On the second pass of upgrade commands (when modifying the sources.list to have wheezy sources), in addition to adding the Debian wheezy sources, I modifed the turnkey line to read:

deb http://archive.turnkeylinux.org/debian wheezy main

Of course, during prompts that talked about configuration files (replace=y,keep=n), I always chose "N" to keep the current configuration files.

After I went through that process, all went well.  Here is my "lsb_release -a" output.

No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux 7.1 (wheezy)
Release:    7.1
Codename:    wheezy

Reboots fine.  And everything appears (5 minute check here) to be running fine.  Incidentally, it appears that "opsi" that I installed on squeeze (www.opsi.org) is still working too.  Definitely do this in test first.  And my testing of this process took a couple of hours to complete.  Hence, I should have attempted with subsituting "us" for "de" in the source URLs to debian.org.

- NSparks


Jason Lehman's picture

All was going good until I ran into an issue where Grub would not install on any of the 3 locations given during the dist-upgrade process. I can say continue anyways & have a sucessful upgrade. At that point I need to somehow reinstall/configure Grub, as the OS is still stable. If I reboot, the server will not boot back up; & I have to revert to the snapshot I took right before upgrade & start over. Any help would be appreciated.

Thanks,

Jason

Jason

Jeremy Davis's picture

In theory you should be able to just re-install grub to your book disk. For good measure I often re-run update-grub too. If you're not sure what your boot disk is, fdisk - l should help you out.

E.g.:

# fdisk -l

Disk /dev/sda: 32 GiB, 34359738368 bytes, 67108864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8305e23c

Device     Boot    Start      End  Sectors Size Id Type
/dev/sda1  *        2048 62916607 62914560  30G 83 Linux
/dev/sda2       62918654 67106815  4188162   2G  5 Extended
/dev/sda5       62918656 67106815  4188160   2G 82 Linux swap / Solaris
grub-install /dev/sda
update-grub
And all should be well. If not, please share the error you get.
Jason Lehman's picture

Errors are below. I think this may have something to do w/ LVM being used in the original TKL appliance. I even added a 5GB new virtual disk to try to install grub; & I get similar errors.

 

Error... (sorry I forgot how to properly quote output/code in this forum)

root@fileserver ~# fdisk -l

Disk /dev/sda: 536.9 GB, 536870912000 bytes
4 heads, 32 sectors/track, 8192000 cylinders, total 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0000b15e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1     1000000      500000   83  Linux
/dev/sda2         1001472    39061503    19030016   8e  Linux LVM
/dev/sda3        39061504  1048575999   504757248   83  Linux

Disk /dev/sdb: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders, total 10485760 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x5cea82e9

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1         5221125    10474379     2626627+  83  Linux

Disk /dev/mapper/turnkey-root: 535.1 GB, 535121887232 bytes
255 heads, 63 sectors/track, 65058 cylinders, total 1045159936 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/turnkey-root doesn't contain a valid partition table

Disk /dev/mapper/turnkey-swap_1: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders, total 1048576 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/turnkey-swap_1 doesn't contain a valid partition table
root@fileserver ~# grub-install /dev/sda
/usr/sbin/grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!.
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
root@fileserver ~# 

 

Jason

Jason Lehman's picture

I get a different error when attempting to install grub on a seperate virtual disk. This is the 5GB disk I just added to try to fix my issue. Here is what happens...

root@fileserver ~# grub-install /dev/sdb
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a disk with multiple partition labels or both partition label and filesystem.  This is not supported yet..
/usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.
root@fileserver ~#

Jason

Jeremy Davis's picture

I don't think adding a new disk (unless you need the space) is going to help things. I suspect if anything it will just add to the confusion. If you do need the space, I suggest adding the additional disk to the existing LVM. But that's probably another story...

Can you please post the error messages that you were getting trying to install grub to the original vHDD? You gave the output of fdisk, but not of install-grub! :)

Also I have a hunch, I'm not sure if it's a good one, but can you try the following commands and give me the output:

umount /boot
ls -la /boot
If that gives an error message, that's ok but you may wish to remount /boot if you want to try other things.
mount -a

As an alternative approach, using TKLBAM you can just migrate your data to a new server. You will need to manually make some adjustments to get it all running but we have a doc page which provides a suggested workflow and notes a few gothchas which you may encounter.

Jason Lehman's picture

I am not in the office now to try your suggestion, but I did post the output of the install-grub in a previous post. Here it is...

root@fileserver ~# grub-install /dev/sda
/usr/sbin/grub-setup: warn: This msdos-style partition label has no post-MBR gap; embedding won't be possible!.
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
root@fileserver ~# 

I will be back in the office on Wednesday to try your suggestions. I agree not instaling grub on the newly added 5GB disk, i was just shooting from the hip there after many failed attempts.

Thank you,

Jason

Jeremy Davis's picture

Hmm, that is a weird error which I haven't come across before...

It makes me suspect that you had grub-legacy installed previously. If so, perhaps that's still there and you can leverage that to bootstrap grub2. Maybe try installing grub to /dev/sda1?

Failing that, I suspect that you'll need to move all your partitions and leave a small gap at the start of the drive. It's doable but will be a PITA.

IMO whilst migrating your data won't be quite as quick as an in place upgrade should be, it will give you the latest build of TurnKey & will avoid this issue...

If this appliance is one of the more generic ones (such as Core or LAMP) then it should be pretty straight forward. Other appliance upgrades may get a bit more involved...

If you go that route, please start a new thread (feel free to link to it here if you want). That way we can keep this thread on topic. I get notifications of all new threads and posts so I'll see it...

Jason Lehman's picture

I'm leaning as well as having to move all partitions and leave the small gap at the start; if so then I will probably get the latest TLK appliance & rebuild.

No go on installing grub to /dev/sda1...

root@fileserver ~# grub-install /dev/sda1
/usr/sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition.  This is a BAD idea..
/usr/sbin/grub-setup: warn: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-setup: error: will not proceed with blocklists.
 

This appliance is an sftp server for us & I just may need to rebuild it from scratch.

I'll try a few more things, then update this thread.

Jason

Jason Lehman's picture

Got the latest TKL FileServer appliance up & running & going to rebuild this application. This was the lesser of the two evils. Still not a bad solution, won't take too long; & its always nice to have a fresh slate from time to time.

Jason

Post new comment