如何正确调试 do-release-upgrade 失败?

如何正确调试 do-release-upgrade 失败?

我正在尝试在系统映像上运行do-release-upgrade(当 chrooted 时),但命令失败,没有任何进一步的错误消息或指导:

root@gilneas:/var/run# do-release-upgrade 
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                                                                                    
Get:2 Upgrade tool [1,240 kB]                                                                                                           
Fetched 1,241 kB in 0s (0 B/s)                                                                                                          
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' 
extracting 'bionic.tar.gz'

Reading cache

Checking package manager
Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://mirrors.cc.if.ufrj.br/ubuntu xenial InRelease                                                                                
Hit http://mirrors.cc.if.ufrj.br/ubuntu xenial-updates InRelease                                                                        
Hit http://mirrors.cc.if.ufrj.br/ubuntu xenial-security InRelease                                                                       
Hit http://mirrors.cc.if.ufrj.br/cc/deb xenial InRelease                                                                                
Get:1 http://packages.microsoft.com/repos/vscode stable InRelease [3,182 B]                                                             
Get:2 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages [130 kB]                                                    
Hit https://download.sublimetext.com apt/stable/ InRelease                                                                              
Fetched 133 kB in 0s (0 B/s)                                                                                                            
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Restoring original system state

Aborting
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

它只是在“读取状态信息”之后中止,日志文件中/var/log/dist-upgrade/main.log也没有任何内容:

root@gilneas:/var/run# cat /var/log/dist-upgrade/main.log 
2019-07-30 14:08:23,858 INFO Using config files '['./DistUpgrade.cfg.xenial']'
2019-07-30 14:08:23,858 INFO uname information: 'Linux gilneas 4.15.0-55-generic #60-Ubuntu SMP Tue Jul 2 18:22:20 UTC 2019 x86_64'
2019-07-30 14:08:24,307 INFO apt version: '1.2.32'
2019-07-30 14:08:24,308 INFO python version: '3.5.2 (default, Nov 12 2018, 13:43:14) 
[GCC 5.4.0 20160609]'
2019-07-30 14:08:24,312 INFO release-upgrader version '18.04.34' started
2019-07-30 14:08:24,331 INFO locale: 'en_US' 'UTF-8'
2019-07-30 14:08:24,422 INFO screen could not be run
2019-07-30 14:08:24,463 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for kernel?
2019-07-30 14:08:24,463 WARNING estimate_kernel_initrd_size_in_boot() returned '0' for initrd?
2019-07-30 14:08:24,641 DEBUG Using 'DistUpgradeViewText' view
2019-07-30 14:08:24,728 DEBUG enable dpkg --force-overwrite
2019-07-30 14:08:24,774 DEBUG creating statefile: '/var/log/dist-upgrade/apt-clone_system_state.tar.gz'
2019-07-30 14:08:30,723 DEBUG lsb-release: 'xenial'
2019-07-30 14:08:30,725 DEBUG _pythonSymlinkCheck run
2019-07-30 14:08:30,727 DEBUG openCache()
2019-07-30 14:08:30,728 DEBUG No such plugin directory: ./plugins
2019-07-30 14:08:30,728 DEBUG plugins for condition 'PreCacheOpen' are '[]'
2019-07-30 14:08:30,728 DEBUG plugins for condition 'bionicPreCacheOpen' are '[]'
2019-07-30 14:08:30,728 DEBUG plugins for condition 'from_xenialPreCacheOpen' are '[]'
2019-07-30 14:08:30,728 DEBUG quirks: running PreCacheOpen
2019-07-30 14:08:30,728 DEBUG running Quirks.PreCacheOpen
2019-07-30 14:08:31,451 DEBUG /openCache(), new cache size 58297
2019-07-30 14:08:31,452 DEBUG need_server_mode(): run in 'desktop' mode, (because of pkg 'ubuntu-desktop')
2019-07-30 14:08:31,452 DEBUG checkViewDepends()
2019-07-30 14:08:31,453 DEBUG running doUpdate() (showErrors=False)
2019-07-30 14:08:37,647 DEBUG openCache()
2019-07-30 14:08:38,440 DEBUG /openCache(), new cache size 58297
2019-07-30 14:08:38,441 DEBUG doPostInitialUpdate
2019-07-30 14:08:38,441 DEBUG plugins for condition 'PostInitialUpdate' are '[]'
2019-07-30 14:08:38,441 DEBUG plugins for condition 'bionicPostInitialUpdate' are '[]'
2019-07-30 14:08:38,441 DEBUG plugins for condition 'from_xenialPostInitialUpdate' are '[]'
2019-07-30 14:08:38,441 DEBUG quirks: running bionicPostInitialUpdate
2019-07-30 14:08:38,441 DEBUG running Quirks.bionicPostInitialUpdate
2019-07-30 14:08:43,463 DEBUG abort called
2019-07-30 14:08:43,464 DEBUG openCache()
2019-07-30 14:08:44,245 DEBUG /openCache(), new cache size 58297

奇怪的是,我有两台服务器有同样的问题。其中一台服务器运行的是 14.04,我成功地用 更新到了 16.04 do-release-upgrade,但从 16.04 到 18.04 却失败了。

需要特别说明的是,系统正在运行 LTSP,而 chroot 映像是 LTSP Fat Client 映像。我试图实现的是更新映像,因为系统已经更新。

对于图像,从 18.04 开始创建是可能的,我知道这一点,我只是想避免记住所有自定义内容的麻烦,并尝试升级图像。从 14.04 到 16.04 时它有效;所以这应该是 16.04 到 18.04 的问题。

相关内容