arrow_upward

Pages (2):
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Easy way to upgrade Debian 9 to Debian 10
#11
(04-07-2020, 05:45 PM)ikk157 Wrote: This can be done on VPS 9 since it’s all done using SSH, no panel is involved 


HOWEVER, I do not recommend doing it on VPS 9. Since if anything goes wrong, you’ll then need to request an OS re-install which the admins can only do for you. And due to the fact that the admins constantly emphasize that VPS 9 owners should never perform anything risky, I doubt that they’ll be happy with that request.

You absolutely got my thoughts. because VPS-9 in unmanaged. and i also bear this situation in past. and lost access to my machine. i wish provider also gave us virtualizer  CP for self control. Webmin and Cpanal also make failure in system files and situation out of control and at the end i request to reinstall OS. 
So thanks for ultimate me.
Heart LOVE FOR ALL  HATRED FOR NONE Heart
#12
@hamed @sagher

Have you both ignored the red text that is placed at almost the top of the tutorial post?

It answers your questions pretty much in terms of if you should do this or not and when you should do it or not.

About the question by @hamed: During the upgrade the packages are upgraded and the kernel. Of course partially configurations are replaced with newer versions that come with the new software. However for everything you changed or custom configured you will be asked mostly if you wish to replace the configuration or keep the original. And for the most it will NOT replace any configuration during an upgrade. So nothing is mixed up. You are still just upgrading the packages to the level the newer Debian version.
[Image: zHHqO5Q.png]
#13
(12-07-2019, 06:19 PM)Mashiro Wrote:
Hello Post4VPS Community

I would like to share the follow account of experience and a brief guide about how to upgrade Debian 9 to Debian 10 in a few easy steps. First I'd like to explain why I'm posting this. I have been taking part in the December giveaway and won a VPS. In my applicaton I requested the OS Debian 10 to be installed on the VPS and noted that Debian 9 can be installed if Debian 10 is not available. So it looks like Debian 10 was not available but thankfully Debian 9 was installed for me. I decided to upgrade Debian 9 to Debian 10 myself. Here is how I did i in a few steps.

Warning: Debian might be generally a very stable OS but distribution upgrades are something that can be rated as dangerous and should be handled with care. I don't recommend to dist upgrade a long running server with applications and other things already running on it. Even if you decide to do so take backups! Things could go wrong and the server could be rendered unusable! Therefore I would like to explain that I'm not responsible for any damage that might happen to any server when performing a distribution upgrade. I recommend only to do this on a fresh installed Debian 9 VPS where you have nothing to lose!


Let's get started with the guide.

1. Login into your Debian 9 VPS as root or a user that can use sudo via SSH or any other different way (direct TTY, emergency SSH, VNC or whatever else you have available).

2. First you have to get the current system up to date. To do so run the commands below in the order given.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

- The first command will update the package database on your machine which in return will compose a list of packages that can be updated.
- The second command will actually update the packages that have updates available for them.
- The third command will update some packages that have been hold back like the kernel and firmware.

Everything on the current system has to be up to date to avoid possible issues with package version mismatch and other things that can happen when you skip ahead package versions during updates.

3. Take a backup of your sources.list by using the command below.
cp /etc/apt/sources.list /etc/apt/sources.list.backup
(Don't forget to apply sudo before the commands if you use a non root user!)

4. Open the /etc/apt/sources.list file, wipe all the content in it and paste the following Debian 10 package sources into the file using a text editor like nano, vi or vim. When opening the file don't forget to use sudo if you use a non root user account.

Debian 10 package sources:
deb http://httpredir.debian.org/debian buster main
deb http://httpredir.debian.org/debian buster-updates main
deb http://security.debian.org buster/updates main

5. Update the package database again and finally upgrade all packages and kernel to Debian 10 level by using the commands below.
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
(Don't forget to apply sudo before the commands if you use a non root user!)

You might notice that this are the commands as from a few steps ago. So it's really that simple to perform the upgrade after changing the package sources.

You will be asked if you want to restart system services automatically or manually. Simply choose to restart all necessary services automatically. This will simply save you some work and steps.

6. After all packages have been upgraded to Debian 10 you can do a little clean up. To clean up no longer needed packages and files run the command below.
apt-get --purge autoremove -y
(Don't forget to apply sudo before the commands if you use a non root user!)

7. Finally restart your server to boot into the new Debian 10 kernel and you are done with the upgrade.


This has worked flawless for me. I'm not running Debian 10 on my VPS 16. In the paste I upgraded Debian 8 to Debian 9 to Debian 10 on a NanoKVM VPS without any issues.

This is one way to get the latest Debian version if your provider doesn't provide it or you don't want to reinstall your OS again.


Can we upgrade other versions without deleting our files? Like ubuntu?

If possible, please advise me how to do this. And please note I do not want to delete files inside the server
Thanks Post4VPS
#14
@Mashiro  I've just upgraded Debian 8 through to Debian 10 with your tutorial!

Quote:Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

Am curious. What does "No LSB modules are available" mean?  

I checked Solus VM and it still shows Debian 8 even after a reboot.

I absolutely can't believe the improvement in speed after I rebooted my VPS.  It ran some more packages after I booted in again.  I then used your apt-get upgrades again, but there was really nothing to do and everything was up to date.

Yesterday I was on Debian 9.  I then wanted to continue with my quest today to try and install a Web Server without a panel on Debian 9.  I was unsuccessful, but then when I wanted to reinstall the OS in Solus VM I had reached the final number of reinstalls for this month.  Tongue

I then discovered that with our WHMCS Panel I am still allowed to make more reinstalls, however the most up to date template in WHMCS was Debian 8.  I then reinstalled the myVestaCP Fork and to my surprise it was a totally different reinstall that is probably an install version specific to Debian 8 and very dated.  It had for example mysql instead of MariaDB.  It was OK in speed, however MUCH slower than Debian 9.  I missed that oompf of Debian 9.  So when I saw your tutorial, I went for it and couldn't believe how easy it was.  Totally brilliant in its simplicity.   Cool

OK let's see what dpeca's script says of my Debian as it always has comments.  For example when I was on Debian 8 and Debian 9 it asked for me to upgrade.  Let's see what it says now.



There was no comment about the Debian version when I installed dpeca's myVestaCP script which means mine is up to date.  I had to delete Exim4 and all of its dependencies though.  Before I could continue with the script.  I had to search around a lot to figure out how to delete Exim4 cleanly, as a simple remove purge was not enough.  I then learned here how to do it:

List Exim4 packages first:

dpkg -l | grep exim

And then delete them one by one in the list.  And then everything speeded along from there.  Big Grin

I've just installed WordPress.  MariaDB is back.  And again the speed going from Debian 8 to 10 is unbelievable.  Debian 8 is not slow, but Debian 10 is like lightning!  Installation of plugins the fastest yet.

I'd never be able to go back to CentOS again.  There is just such a great difference in speed.
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
#15
@deanhills

LSB = Linux Standard Base

It says "no modules available" simply because there are most likely no LSB modules installed. If you've read the Wiki article you might understand what it can be used for. In short: it is a system that attempts to make various Linux distributions being cross-compatible with each other with a standardized platform. Basically, it tries to reduce differences between the various Linux distributions.

A bit dated article with some information about LSB modules: https://lwn.net/Articles/658809/


About SolusVM: wot sure what you expect from it but what you see there is simply the template name or ISO name. It doesn't represent what really runs inside your VM after you performed upgrades or maybe even installed a totally different distribution by using some tricks. So you upgrading to Debian 10 from 8 will not change what SolusVM says in the panel. Nor will this happen in any other VPS control panel. However, if you have a panel running inside your VM you will see changes if they display the OS information.


Quote:I then wanted to continue with my quest today to try and install a Web Server without a panel on Debian 9. I was unsuccessful, but then when I wanted to reinstall the OS in Solus VM I had reached the final number of reinstalls for this month.

If your solution to running into issues is always reinstalling the OS... you won't get really far with that. It's like running away from the issues. Why not actually try to solve the issue and post it here?


Debian 8 was released in 2015. Back in 2015 MySQL was shipped out normally with Linux distributions as there was no big licensing issue (it started slowly though already a few years ago). So given the old age of the distribution, it comes with a lot of old software and software that isn't being shipped anymore nowadays (or has been replaced by better / newer alternatives).


You can remove all installed exim4 packages easily with a single command:
apt-get --purge remove exim4* && apt-get --purge autoremove

The above command should uninstall any exim4 package that is installed and afterward clean up no longer needed software packages that have been installed alongside when exim4 was installed.
[Image: zHHqO5Q.png]
#16
@Mashiro  Thanks for the feedback. I was able to Google "No LSB modules are available"  but at the time when I did, couldn't understand what it was doing,and particularly why it came up when I made an inquiry about the Debian Version.  The significance of it relative to the Version.  But now I get it.

In the meanwhile I also found this very interesting article about the Debian upgrade.  I like this description and explanation:

Quote:Right now, as with every release, Debian is pretty close to up to date with what the rest of the Linux world is doing. But Buster will be supported for five years, and Debian 11 won't arrive for at least two years (Buster comes just 26 months after Debian 9, though it has been five years since the big tweaks of Debian 8). So as time goes on, Buster will look increasingly outdated.

But wait, isn't Ubuntu based on Debian? That's not out of date, right? Ubuntu pulls its Debian base from what Debian calls the Testing Channel. Debian Linux consists of three major development branches: Stable, Testing, and Unstable. Work on new versions progresses through each, starting life in Unstable and eventually ending up in Stable. Ubuntu plucks its base from the middle, in Testing. But from Debian's point of view, that's only about half-baked. (Like I said, Debian is conservative.)
Source: https://arstechnica.com/information-tech...ood-thing/

I didn't realize Debian 10 has been around for as long as it had.  Time does fly fast.  I noticed at end of last night that your tutorial is dated 2019.  Feels like yesterday!

I've been doing all nighters for most of the week, so have now woken up after 7 hours of dead sleep.  I didn't quite know where I was when I woke up or what time it was.

You're right.  I'm not doing it right. I have to resolve the issues as they come up, when they come up and discuss them first.  My approach this far has been to work through all of the tutorials first that I can get on the Web - such as how to install Nginx on Debian 9 and WP on Nginx on Debian 9.  I then created the commands in a separate Cheat Sheet before I started with a fresh install.  In all of the cases there must have been something missing that is there, but assumed as "given".  Like something really very basic about the setup that I still have to get the hang off first. I don't think the quality of the tutorials is that great or maybe it's just a case of something I've been missing.  I'll start a new discussion on that.  In fact I've got a few discussions I'll post in other parts of the Forum.  So I won't go off topic in this tutorial. This tutorial to me is a GEM!  Cheers!   Cool
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
#17
@Mashiro  I've been trying to do the upgrade from Debian 8 to 10 on an OpenVZ VPS with 1 GB RAM and 60 GB SSD space.  For the first time I found a hickup with upgrading to Debian 10 - looks like the easy upgrades may be better with KVM?  I first tried the direct upgrade from Debian 8 to 10.  That didn't work well and it was searching for packages but wasn't clear about what was missing.  Then I tried it incrementally.  From Debian 8 to Debian 9 first, and then Debian 9 to 10. The upgrade went OK (as far as I could see) from Debian 8 to 9. The issues came up with the last upgrade from Debian 9 to 10.  The system asks for a Kernel upgrade to minimum 3.1.  Am I correct that one can't upgrade a Kernel at OS level on an OpenVZ Virtualization?  Only sponsor can?  Whereas with KVM one can upgrade a Kernel in OS?

The Kernel Version of the OpenVZ VPS is:

Linux version 2.6.32-042stab145.3

Virmach KVM VPS that upgraded so effortlessly to Debian 10 was: 4.19.0-16-amd64
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
#18
@deanhills

You cannot run Debian 10 on OpenVZ RHEL 6 (2.6.32 Kernel). It's not supported by OpenVZ at all. Attempting an upgrade to Debian 10 from previous version will always fail! Pretty much up-to-date and more modern Linux distribution IS NOT supported by this EOL OpenVZ version and will never be. Main reason being the kernel and the software versions requiring features that only newer kernels provide. DO NOT use old OpenVZ VPSs (really please don't). Pretty much any OS for it is almost EOL by now (with luck you get to use LTS version of some old Ubuntu/Debian versions but it's not worth it imho). OpenVZ RHEL 6 is really dead.
[Image: zHHqO5Q.png]
#19
(06-11-2021, 08:33 PM)deanhills Wrote: The Kernel Version of the OpenVZ VPS is:

Linux version 2.6.32-042stab145.3

Virmach KVM VPS that upgraded so effortlessly to Debian 10 was: 4.19.0-16-amd64
The VirMach upgrade was successful because you were using a KVM VM/VPS in it. KVM VMs have their own kernel that you can do whatever you like with them inside that VM (upgrade, downgrade, patch etc..) BUT an OpenVZ VM/VPS doesn't have a kernel of its own but it's using the Host's kernel. Thus kernel version 2.6.32-042stab145.3 is your OVZ-VPS host's kernel which you don't have permission to change.

Always Remember, OpenVZ VPSs aren't real VMs but CONTAINERS, just like Docker containers in a way, but functionally similar to LWD/LXC containers!

(06-11-2021, 08:33 PM)deanhills Wrote: The system asks for a Kernel upgrade to minimum 3.1.  Am I correct that one can't upgrade a Kernel at OS level on an OpenVZ Virtualization?  Only sponsor can?  Whereas with KVM one can upgrade a Kernel in OS?
Indeed!.. for the reasons outlined above.

This is why:
(06-11-2021, 08:33 PM)deanhills Wrote: @Mashiro  I've been trying to do the upgrade from Debian 8 to 10 on an OpenVZ VPS with 1 GB RAM and 60 GB SSD space.  For the first time I found a hickup with upgrading to Debian 10 - looks like the easy upgrades may be better with KVM?  I first tried the direct upgrade from Debian 8 to 10. That didn't work well and it was searching for packages but wasn't clear about what was missing.
This is most probably because Debian 10 includes packages that need a higher kernel version that you will never get, just like @Mashiro's said here:
(06-11-2021, 09:05 PM)Mashiro Wrote: You cannot run Debian 10 on OpenVZ RHEL 6 (2.6.32 Kernel). It's not supported by OpenVZ at all. Attempting an upgrade to Debian 10 from previous version will always fail! Pretty much up-to-date and more modern Linux distribution IS NOT supported by this EOL OpenVZ version and will never be. Main reason being the kernel and the software versions requiring features that only newer kernels provide.

(06-11-2021, 08:33 PM)deanhills Wrote: Then I tried it incrementally.  From Debian 8 to Debian 9 first, and then Debian 9 to 10. The upgrade went OK (as far as I could see) from Debian 8 to 9.
In the sense that Debian packages upgraded to the ones shipped with Debian 9, yes!... Except the kernel! since you'll be still using the host's kernel, ie kernel 2.6.32-042stab145.3, whatever Debian version you'll be running.


-----------
PS: This incident of yours reminds me of my first encounter with the OVZ-VPS @GigaRank :-) I wasn't aware at that time that OpenVZ VM were containers, till I learned it the hard-way!.. I think I touched on this in the review I've posted there.
There is always a first time for everything :-)
VirMach's Buffalo_VPS-9 Holder (Dec. 20 - July 21)
microLXC's Container Holder (july 20 - ?)
VirMach's Phoenix_VPS-9 Holder (Apr. 20 - June 20)
NanoKVM's NAT-VPS Holder (jan. 20 - ?)
#20
(06-12-2021, 07:27 AM)fChk Wrote: This incident of yours reminds me of my first encounter with the OVZ-VPS @GigaRank :-) I wasn't aware at that time that OpenVZ VM were containers, till I learned it the hard-way!.. I think I touched on this in the review I've posted there.
There is always a first time for everything :-)
Right. For me it's a great learning curve @fChk. Thanks for adding these notes to the tutorial.

Regrettably Hostdare VPS 11 and 12 are no longer supported with templates, and I was hoping to upgrade Debian. The VPSs are OpenVZ so of course looks like the sponsor is allowing them to die a natural death. We tried to upgrade the VPSs, but the replacement on offer was one that we could only refuse, regrettably so.
Terminal
Thank you to Post4VPS and VirMach for my awesome VPS 9!  
Pages (2):



person_pin_circle Users browsing this thread: 2 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting