Ubuntu-Server2024.04LTS升级安装到最新2026.04LTS-13年前老爷机实操升级过程

Ubuntu-Server2024.04LTS升级安装到最新2026.04LTS-13年前老爷机实操升级过程

1. 本次升级老机器信息

1. DELL笔记本

  • Dell Inspiron 14R (5420)

2. 处理器(CPU)

  • 型号: Intel® Core™ i5-3210M CPU @ 2.50GHz
  • 核心 / 线程:2 核 4 线程
  • 主频:2.5GHz,睿频:3.1GHz

3. 内存(RAM)

  • 8GB DDR3 1600MHz

2. 升级前版本与内核查看

  1. 简要查看系统信息
root@dev-server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.4 LTS
Release:        24.04
Codename:       noble
  1. 查看系统详细信息
root@dev-server:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.4 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.4 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
  1. 查看Linux内核信息
root@dev-server:~# uname -a
Linux dev-server 6.8.0-110-generic #110-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 15:09:20 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
root@dev-server:~# apt update && sudo apt full-upgrade -y

3. 升级到Ubuntu2026.04LTS

1. 升级要求

1. 服务器版本

  • 1.5 GB 系统内存
  • 5 GB 可用硬盘空间
  • 安装介质可以通过 USB 端口或 DVD 光驱传输。

2. 桌面版本

  • 2 GHz 双核处理器或更高配置
  • 6 GB 系统内存
  • 25 GB 可用硬盘空间
  • 安装介质可以通过 USB 端口或 DVD 光驱传输。

3. 升级准备

  1. 已安装/升级到了Ubuntu Server 2024.04 LTS
  2. 可以连接到Ubuntu Server 2024.04 LTS的终端工具
  3. 已通过终端工具连接到了Ubuntu Server 2024.04 LTS

2. 更新当前系统

命令:sudo apt update && sudo apt full-upgrade -y

# 1. 更新当前系统
Last login: Fri Apr 24 02:23:21 2026 from 192.168.95.12
root@dev-server:~# apt update && sudo apt full-upgrade -y
Get:1 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]               
Hit:2 https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble InRelease
Hit:3 https://mirrors.aliyun.com/ubuntu noble InRelease              
Get:4 https://mirrors.aliyun.com/ubuntu noble-updates InRelease [126 kB]
Get:5 https://mirrors.aliyun.com/ubuntu noble-backports InRelease [126 kB]
Get:6 http://security.ubuntu.com/ubuntu noble-security/main amd64 Packages [1,620 kB]
Get:7 https://mirrors.aliyun.com/ubuntu noble-updates/main amd64 Packages [1,919 kB]
Get:8 http://security.ubuntu.com/ubuntu noble-security/main Translation-en [259 kB]
Get:9 http://security.ubuntu.com/ubuntu noble-security/main amd64 Components [21.9 kB]
Get:10 http://security.ubuntu.com/ubuntu noble-security/main amd64 c-n-f Metadata [11.0 kB] 
Get:11 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Packages [1,182 kB]  
Get:12 http://security.ubuntu.com/ubuntu noble-security/universe amd64 Components [74.2 kB] 
Get:13 https://mirrors.aliyun.com/ubuntu noble-updates/main Translation-en [345 kB]         
Get:14 https://mirrors.aliyun.com/ubuntu noble-updates/main amd64 Components [177 kB]       
Get:15 https://mirrors.aliyun.com/ubuntu noble-updates/main amd64 c-n-f Metadata [17.1 kB]  
Get:16 https://mirrors.aliyun.com/ubuntu noble-updates/universe amd64 Packages [1,685 kB]   
Get:17 https://mirrors.aliyun.com/ubuntu noble-updates/universe amd64 Components [386 kB]   
Get:18 https://mirrors.aliyun.com/ubuntu noble-updates/multiverse amd64 Components [940 B]  
Get:19 https://mirrors.aliyun.com/ubuntu noble-backports/main amd64 Components [7,356 B]    
Get:20 https://mirrors.aliyun.com/ubuntu noble-backports/universe amd64 Components [10.5 kB]
Fetched 8,095 kB in 41s (198 kB/s)                                                          
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
 sudo apt: command not found
root@dev-server:~# 

3. 安装 update-manager-core

命令: sudo apt install update-manager-core

# 安装 update-manager-core 
root@dev-server:~# apt install update-manager-core
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
update-manager-core is already the newest version (1:24.04.12).
update-manager-core set to manually installed.
The following packages were automatically installed and are no longer required:
  python3-compose python3-docker python3-dockerpty python3-docopt python3-dotenv
  python3-texttable python3-websocket
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
root@dev-server:~#

4. 执行do-releaseupgrade升级

命令:sudo do-release-upgrade -d ,并根据安装过程中的提示完成升级

Last login: Fri Apr 24 02:38:24 2026 from 192.168.95.12
root@dev-server:~# do-release-upgrade -d
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
root@dev-server:~# 
# 上面意思是必须先把当前系统所有软件更新到最新,才能执行版本升级(do-release-upgrade)。
  1. 把当前系统所有软件更新到最新
sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo apt clean
  1. 再次执行do-release-upgrade命令升级
root@dev-server:~# do-release-upgrade -d
Checking for a new Ubuntu release

= Welcome to Ubuntu 26.04 LTS 'Resolute Raccoon' =

The Ubuntu team is proud to announce Ubuntu 26.04 LTS 'Resolute Raccoon'.

To see what's new in this release, visit:

  https://discourse.ubuntu.com/t/resolute-raccoon-release-notes

Ubuntu is a Linux distribution for your desktop or server. It is fast
and easy to install, it has regular releases, a tight selection of
excellent applications installed by default, and almost any other
software you can imagine available through the network.

We hope you enjoy Ubuntu.


== Feedback and helping ==

To help shape Ubuntu, look at the list of ways to participate at:

  https://documentation.ubuntu.com/project/community/contribute/

Your comments, bug reports, patches, and suggestions help ensure our
next release is the best release of Ubuntu ever. If you found a bug,
please read:

  https://help.ubuntu.com/community/ReportingBugs

Then report bugs using apport in Ubuntu. For example:

  ubuntu-bug linux

opens a bug report in Launchpad regarding the linux package.

If you have a question, or if you think you may have found a bug but aren't
sure, reach out on one of the communication channels. Matrix is the go-to
for instant chatting, while Discourse is the home to our support forum.
Otherwise, send an email to the Ubuntu Users mailing list:

  https://documentation.ubuntu.com/project/community/contributors/matrix/
  https://discourse.ubuntu.com/t/welcome-to-support-and-help
  https://lists.ubuntu.com/mailman/listinfo/ubuntu-users


== More information ==

You can find out more about Ubuntu on the Ubuntu website and in Ubuntu
Project documentation:

  https://ubuntu.com/
  https://documentation.ubuntu.com/project/

To sign up for future Ubuntu announcements, subscribe to Ubuntu's very
low-volume announcement list:

  https://lists.ubuntu.com/mailman/listinfo/ubuntu-announce


Continue [yN] # 这里输y

.... 

Reading cache

Checking package manager

Continue running under SSH? 

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
'1022'. 
Do you want to continue? 

Continue [yN] # 这里输入y

....
Starting additional sshd 

To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 
If you run a firewall, you may need to temporarily open this port. As 
this is potentially dangerous it's not done automatically. You can 
open the port with e.g.: 
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' 

To continue please press [ENTER] # 这里按ENTER
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Hit http://security.ubuntu.com/ubuntu noble-security InRelease                              
Hit https://mirrors.aliyun.com/docker-ce/linux/ubuntu noble InRelease                       
Hit https://mirrors.aliyun.com/ubuntu noble InRelease                                       
Hit https://mirrors.aliyun.com/ubuntu noble-updates InRelease                               
Hit https://mirrors.aliyun.com/ubuntu noble-backports InRelease                             
Fetched 0 B in 0s (0 B/s)                                                                   
Reading package lists... Done    
Building dependency tree... Done 
Reading state information... Done
No snaps are installed yet. Try 'snap
  1. 执行到这里
Building dependency tree... Done 
Reading state information... Done

Calculating the changes

Calculating the changes
No candidate ver:  linux-image-6.8.0-87-generic
No candidate ver:  linux-image-6.8.0-88-generic
No candidate ver:  linux-modules-6.8.0-87-generic
No candidate ver:  linux-modules-6.8.0-88-generic
No candidate ver:  linux-modules-extra-6.8.0-87-generic
No candidate ver:  linux-modules-extra-6.8.0-88-generic
No candidate ver:  linux-image-6.8.0-87-generic
No candidate ver:  linux-image-6.8.0-88-generic
No candidate ver:  linux-modules-6.8.0-87-generic
No candidate ver:  linux-modules-6.8.0-88-generic
No candidate ver:  linux-modules-extra-6.8.0-87-generic
No candidate ver:  linux-modules-extra-6.8.0-88-generic

Do you want to start the upgrade? 


5 packages are going to be removed. 116 new packages are going to be 
installed. 657 packages are going to be upgraded. 

You have to download a total of 1,318 M. This download will take 
about 22 minutes with your connection. 

Installing the upgrade can take several hours. Once the download has 
finished, the process cannot be canceled. 

 Continue [yN]  Details [d] # 这里输入y
 
 Continue [yN]  Details [d]y # 继续输入y
  1. 选择语言

在这里插入图片描述

回车后弹出如下

在这里插入图片描述

  1. 输入继续

大约等了35分钟后输出如下

..........
Processing triggers for linux-image-7.0.0-14-generic (7.0.0-14.14)…
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-7.0.0-14-generic
/etc/kernel/postinst.d/kdump-tools:
kdump-tools: Generating /var/lib/kdump/initrd.img-7.0.0-14-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/kdump-tools.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-7.0.0-14-generic
Found initrd image: /boot/initrd.img-7.0.0-14-generic
Found linux image: /boot/vmlinuz-6.8.0-110-generic
Found initrd image: /boot/initrd.img-6.8.0-110-generic
Found linux image: /boot/vmlinuz-6.8.0-90-generic
Found initrd image: /boot/initrd.img-6.8.0-90-generic
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Processing triggers for initramfs-tools (0.151ubuntu1)…
update-initramfs: Generating /boot/initrd.img-7.0.0-14-generic
packages have been installed but needrestart is suspended
packages have been installed but needrestart is suspended
Reading package lists... Done    
Building dependency tree... Done 
Reading state information... Done

Searching for obsolete software
Reading state information... Done

Remove obsolete packages? 


71 packages are going to be removed. 

 Continue [yN]  Details [d] # 这里输入y,其实就是一处就内核的依赖库
  1. 确认重启
(Reading database… 137352 files and directories currently installed.)
Purging configuration files for networkd-dispatcher (2.2.4-1.1ubuntu1)…
Purging configuration files for python3.12-minimal (3.12.3-1ubuntu0.13)…
Purging configuration files for byobu (6.11-0ubuntu3)…
Purging configuration files for fontconfig-config (2.17.1-3ubuntu1)…
Purging configuration files for linux-image-6.8.0-90-generic (6.8.0-90.91)…
rmdir: failed to remove '/lib/modules/6.8.0-90-generic': Directory not empty
Purging configuration files for linux-modules-extra-6.8.0-90-generic (6.8.0-90.91)…
Purging configuration files for linux-modules-6.8.0-90-generic (6.8.0-90.91)…
dpkg: warning: while removing linux-modules-6.8.0-90-generic, directory '/lib/modules/6.8.0-90-generic' not empty so not removed
Purging configuration files for fonts-dejavu-mono (2.37-8build1)…
Purging configuration files for fonts-dejavu-core (2.37-8build1)…
Purging configuration files for libcrypt-dev:amd64 (1:4.5.1-1)…
packages have been installed but needrestart is suspended
packages have been installed but needrestart is suspended
All snaps up to date.

System upgrade is complete.

Restart required 

To finish the upgrade, a restart is required. 
If you select 'y' the system will be restarted. 

Continue [yN] # 这里输入y重启

5. 整体升级安装耗时

本次升级大概40分钟左右,快慢取决于网络环境与硬件设备信息

6. 升级完成后

Welcome to Ubuntu 26.04 LTS (GNU/Linux 7.0.0-14-generic x86_64)

 * Documentation:  https://docs.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Fri Apr 24 03:48:45 AM UTC 2026

  System load:  1.47                Temperature:             80.0 C
  Usage of /:   12.6% of 436.04GB   Processes:               170
  Memory usage: 3%                  Users logged in:         0
  Swap usage:   0%                  IPv4 address for wlp2s0: 192.168.95.111

 * Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
   just raised the bar for easy, resilient and secure K8s cluster deployment.

   https://ubuntu.com/engage/secure-kubernetes-at-the-edge

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status

4. 升级后查看版本与内核

  1. 简要查看系统信息
root@dev-server:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 26.04 LTS
Release:        26.04
Codename:       resolute
  1. 查看系统详细信息
Last login: Fri Apr 24 05:21:10 2026 from 192.168.95.12
root@dev-server:~# cat /etc/os-release
PRETTY_NAME="Ubuntu 26.04 LTS"
NAME="Ubuntu"
VERSION_ID="26.04"
VERSION="26.04 (Resolute Raccoon)"
VERSION_CODENAME=resolute
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=resolute
LOGO=ubuntu-logo
  1. 查看Linux内核信息
root@dev-server:~# uname -a
Linux dev-server 7.0.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Mon Apr 13 11:09:53 UTC 2026 x86_64 GNU/Linux
root@dev-server:~#
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值