📜 ⬆️ ⬇️

Update Squeeze to Wheezy under XenServer 6.2

Hello everyone, under the cut is my upgrade path from Squeeze to Wheezy.
Hope you enjoy my community.

From the beginning on our Squeeze add the Wheezy repository:

~# nano /etc/apt/sources.list 


in /etc/apt/sources.list we should see something like this:
')
 # deb http://mirror.yandex.ru/debian/ squeeze main #squeeze deb http://mirror.yandex.ru/debian/ squeeze main deb-src http://mirror.yandex.ru/debian/ squeeze main deb http://security.debian.org/ squeeze/updates main deb-src http://security.debian.org/ squeeze/updates main # squeeze-updates, previously known as 'volatile' deb http://mirror.yandex.ru/debian/ squeeze-updates main deb-src http://mirror.yandex.ru/debian/ squeeze-updates main deb http://backports.debian.org/debian-backports/ squeeze-backports main #wheezy deb http://mirror.yandex.ru/debian wheezy main deb-src http://mirror.yandex.ru/debian wheezy main deb http://mirror.yandex.ru/debian wheezy-updates main deb-src http://mirror.yandex.ru/debian wheezy-updates main deb http://security.debian.org/ wheezy/updates main deb-src http://security.debian.org/ wheezy/updates main deb http://ftp.debian.org/debian/ wheezy-backports main 


further we need to update the list of packages

 ~# apt-get update 


And now you can upgrade. Generally speaking, this is wrong, it would be worth doing it differently, but I did it. First, it would be worth doing apt-get update - apt-get upgrade, without adding wheezy reps, and only after everything is updated to the latest version of squeeze updated to the next distro. But I didn’t look for easy ways, and filed it all at once, and besides, the reverse to snapshot takes a couple of seconds, and that corrupts. True, it is still a pity to have time for the operation itself, but everything is not so bad.

 ~# apt-get dist-upgrade 


There will be many, many packages, and it is long enough. Meanwhile we see in the log:

 ........ Replacing config file /etc/default/grub with new version Installation finished. No error reported. Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.2.0-4-686-pae Found initrd image: /boot/initrd.img-3.2.0-4-686-pae Found linux image: /boot/vmlinuz-2.6.32-5-686-bigmem Found initrd image: /boot/initrd.img-2.6.32-5-686-bigmem done ........ 


So, we go further. In the process of setting you will be asked about the changed configs. I usually choose option Z, make a copy of .bak, and install a new config, and then use the handles to merge the old and the new. Naturally it is necessary to suffer only if there are your changes in the config.
Finally, the process ends.

 Running mktexlsr. This may take some time... done. 


Well then, time to restart the machine.

 ~# shutdown -r now Broadcast message from support@obelisk (pts/1) (Tue Oct 15 05:53:44 2013): The system is going down for reboot NOW! 


And here we have a longing-sadness:

 Oct 15, 2013 6:36:54 AM Error: Starting VM 'obelisk' - The bootloader for this VM returned an error -- did the VM installation succeed? Unable to find partition containing kernel 


Xenserver reports that everything has broken ... It was due to Grub, it was updated to the second version and, accordingly, changed its config, as usual, not in the best way.
Well, what to do, we will treat. We will treat with the xe-edit-bootloader command. Connect to our XenServer, and begin to conjure.
First we need to know the UUID of our typewriter:

 [root@madoka ~]# xe vm-list name-label=obelisk uuid ( RO) : ab1b73d5-7ac1-7334-ace2-5f944672d5f5 name-label ( RW): obelisk power-state ( RO): halted 


Next, we begin to guess the number of the partition in which our rough bootloader is installed:

 [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 0 Creating dom0 VBD: 985b9cde-76be-4e87-a455-0b3c526e0982 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p1</b> (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p2</b> (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p5</b> (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0: .....Device /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0 not found. You must specify the correct partition number with -p Unplugging VBD: . done 8478ae1e7803 <b> p2 </ b> ( [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 0 Creating dom0 VBD: 985b9cde-76be-4e87-a455-0b3c526e0982 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p1</b> (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p2</b> (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p5</b> (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0: .....Device /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0 not found. You must specify the correct partition number with -p Unplugging VBD: . done ccf550d5-fbc8-d8ec-ce5e-013de789ec9a / 118425d6-c09d-4f60 [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 0 Creating dom0 VBD: 985b9cde-76be-4e87-a455-0b3c526e0982 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p1</b> (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p2</b> (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p5</b> (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0: .....Device /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0 not found. You must specify the correct partition number with -p Unplugging VBD: . done 8478ae1e7803 <b> p5 </ b> ( [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 0 Creating dom0 VBD: 985b9cde-76be-4e87-a455-0b3c526e0982 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p1</b> (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p2</b> (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p5</b> (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0: .....Device /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0 not found. You must specify the correct partition number with -p Unplugging VBD: . done ccf550d5-fbc8-d8ec-ce5e-013de789ec9a / 118425d6-c09d-4f60 [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 0 Creating dom0 VBD: 985b9cde-76be-4e87-a455-0b3c526e0982 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p1</b> (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p2</b> (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803<b>p5</b> (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0: .....Device /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p0 not found. You must specify the correct partition number with -p Unplugging VBD: . done 


Bold marked partition numbers that are on the disk. Further, our task is simplified.

 [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 1 Creating dom0 VBD: 99c695fa-62b5-f2e5-f534-12ee8f3750f7 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p1 (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p2 (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p5 (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p1: . done Mounting filesystem: done 8478ae1e7803p2 ( [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 1 Creating dom0 VBD: 99c695fa-62b5-f2e5-f534-12ee8f3750f7 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p1 (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p2 (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p5 (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p1: . done Mounting filesystem: done ccf550d5-fbc8-d8ec-ce5e-013de789ec9a / 118425d6-c09d-4f60-8d1e-8478ae1e7803 [root@madoka ~]# xe-edit-bootloader -u ab1b73d5-7ac1-7334-ace2-5f944672d5f5 -p 1 Creating dom0 VBD: 99c695fa-62b5-f2e5-f534-12ee8f3750f7 Plugging VBD: add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p1 (252:46): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 2048 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p2 (252:47): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990782 add map 118425d6-c09d-4f60-8d1e-8478ae1e7803p5 (252:48): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/118425d6-c09d-4f60-8d1e-8478ae1e7803 15990784 Waiting for /dev/mapper/118425d6-c09d-4f60-8d1e-8478ae1e7803p1: . done Mounting filesystem: done 


A text editor will open here (the default is nano, but you can change it to any one of your choice via the EDITOR variable), which will have the Grub config. We will fix it. After a bit of experimentation, I realized that in the new config instead of hd * we have / dev / xvda. (for example: set root = '(/ dev / xvda, msdos1)', while it should be set root = '(hd1, msdos1)'). Accordingly, we will immediately make a heart anddestructive replace (in nano, this is control + /). We will replace / dev / xvda (/ dev / xvda *, if you have / dev / xvda1 for example, or whatever you found there) with hd0 (in my case it was hd1, because I had two screws in the system Originally, I deleted one). Voila! everything is working.

If you were patient, and at first at least glanced through the article, then you will see what I write here, and probably you will not step on my rake:

 echo "grub hold" | dpkg --set-selections && echo "grub-common hold" | dpkg --set-selections && echo "grub-pc hold" | dpkg --set-selections 


will not allow Debian to update Grub packages, and you, dear reader, will not have to solve a problem, since she will not arise ...

By the way, I had some problems with changes in the bootloader of another machine:

 [root@madoka ~]# xe-edit-bootloader -u 797840f1-8c18-d202-6b5f-1b834a33128a -p1 Creating dom0 VBD: 6d115a71-c22d-4e4f-23ae-9e223272c701 Plugging VBD: add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>1</b> (252:20): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 2048 add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>2</b> (252:21): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 15990782 add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>5</b> (252:22): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 15990784 Waiting for /dev/mapper/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1eep1: .....Device /dev/mapper/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1eep1 not found. You must specify the correct partition number with -p Unplugging VBD: . done d81e4f5dc1ee <b> [root@madoka ~]# xe-edit-bootloader -u 797840f1-8c18-d202-6b5f-1b834a33128a -p1 Creating dom0 VBD: 6d115a71-c22d-4e4f-23ae-9e223272c701 Plugging VBD: add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>1</b> (252:20): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 2048 add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>2</b> (252:21): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 15990782 add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>5</b> (252:22): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 15990784 Waiting for /dev/mapper/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1eep1: .....Device /dev/mapper/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1eep1 not found. You must specify the correct partition number with -p Unplugging VBD: . done ccf550d5-fbc8-d8ec-ce5e-013de789ec9a / fa3c691b-dc18-4d8b [root@madoka ~]# xe-edit-bootloader -u 797840f1-8c18-d202-6b5f-1b834a33128a -p1 Creating dom0 VBD: 6d115a71-c22d-4e4f-23ae-9e223272c701 Plugging VBD: add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>1</b> (252:20): 0 15986688 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 2048 add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>2</b> (252:21): 0 2 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 15990782 add map fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee<b>5</b> (252:22): 0 784384 linear /dev/sm/backend/ccf550d5-fbc8-d8ec-ce5e-013de789ec9a/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1ee 15990784 Waiting for /dev/mapper/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1eep1: .....Device /dev/mapper/fa3c691b-dc18-4d8b-b54b-d81e4f5dc1eep1 not found. You must specify the correct partition number with -p Unplugging VBD: . done 


Here, for some reason, sections are marked not as p * in addition to the uuid of our repository, but simply as a number. I was unable to edit the bootloader in these sections, I am looking for a solution to this problem.

Good luck in exements!
And if someone is hurt by familiarity - I beg your pardon.
Edit - in a personal, discussion / condemnation - in kamenty. I can not fix it right away, but if the grammar does not entail a penalty execution, then technical errors can lead to.

Source: https://habr.com/ru/post/197552/


All Articles