尝试 01
sudo apt-get update
sudo apt --fix-broken install
sudo dpkg --configure -a
sudo do-release-upgrade -y
sudo apt-get autoremove
sudo apt-get clean
尝试 02
克隆 / 分区后操作
sudo apt install schroot debootstrap
df
umount <sys_blk>
# 卸载系统分区
blkid
sudo tune2fs -U random /dev/<sys_blk>
# 修改 uuid
sudo mkdir /mnt/<path_name>
sudo mount /dev/<blk> /mnt/<path_name>
schroot /mnt/<path_name>
sudo apt update &&
sudo apt dist-update
查看日志
- 值得注意的日志
/var/log
- dmesg:显示信息
- boot.log:启动信息
- syslog / messages:系统信息
- kern.log:内核信息
- Xorg.#.log:桌面信息
- 监控日志的工具:tail -f / inotifywait -m -r / auditd / sysdig
- 修改启动输出的方法:修改 grub 文件的 GRUB_CMDLINE_LINUX_DEFAULT 和GRUB_CMDLINE_LINUX,然后记得修改后运行 update-grub
- 查看启动输出:journalctl -b / jourbalctl -f
- 出错关键字
- kernel panic
- error: file not found
- Failed to start / dependency failed
- Emergency mode
-
lsmod 的使用
DM 问题
不想换 DM 就换 amd 或者禁用 wayland
/etc/gdm3/custom.conf
中 WaylandEnable=false
- 安装 DM
以 LightDM 为例
echo $XDG_SESSION_TYPE
apt-get install lightdm
重新配置 DM
dpkg-reconfigure lightdm
- 如果不管用,试试下面的命令
sudo echo '/usr/sbin/lightdm' > /etc/X11/default-display-manager
sudo echo 'DEFAULT_LIGHTDM=true' >> /etc/initramfs-tools/conf.d/resume
sudo mv /usr/share/xsessions/gnome.desktop
/usr/share/wayland-sessions/
sudo update-rc.d lightdm defaults
sudo systemctl status gdm3*
sudo systemctl [enable|start|restart] lightdm.service
cat << EOF > $HOME/.dmrc
[Desktop]
Session=wayland
EOF
sudo cp /etc/default/grub /etc/default/grub.mybak_here
sudo nvim /etc/default/grub
# 修改 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash lightdm.service"
sudo update-grub
- DM 的选择和启动方式
如果给不同的 DM 配不同的 DE 服务器,我们就可以同时使用多个 DM。这需要在
/etc/init.d
相应的目录下配置它们对应的 init 脚本来实现,并在配置后禁用默认 DE。(因为自动会干扰手动
sudo systemctl get-default # 查看启动方式
sudo systemctl set-default multi-user.target # CLI 启动
sudo systemctl set-default graphical.target # GUI 启动
- DM 配置文件
配置位置:/etc/lightdm 和 /usr/share/lightdm
将文件例如命名为 /etc/lightdm/lightdm.conf.d/50-wayland.conf
cat /etc/log/lightdm/lightdm.log
sudo systemctl restart lightdm
其它
- 如果你 emacs 和 nvim 暂时无法使用,可能是因为它依赖于snap的服务。这是 nano 的实用快捷键
- M-N 显示行号
- M-/ 跳转文件尾部
- ^Q 搜索
- M-Q/W 上一个/下一个
- ^S ^O 保存退出
- 试试不同的内核模式
- 检查文件系统:sudo fsck -f -t ext4 /dev/<your_blk>
- 检查分区表:fdisk gparted
- 任选一种检查显卡的办法
- lspci | grep -i vga
- lspci -k | grep -A 2 -i vga
- lshw -class display
- grep -i nvidia /var/log/Xorg.0.log
- glxinfo && uname -r
- inxi -G
- hwinfo --gfxcard
- lsmod # 关键字是 nvme / nvidia
- 检查其它硬件:smartctl memtest
参考
- https://blog.youkuaiyun.com/weixin_46121449/article/details/119905074
- https://blog.youkuaiyun.com/Perfect886/article/details/134381953
- https://askubuntu.com/questions/1271535/while-upgrading-my-ubuntu-from-18-04-to-20-04-it-stopped-responding-and-i-forced
- https://askubuntu.com/questions/1371674/oh-no-something-has-gone-wrong-please-contact-system-administrator
- https://askubuntu.com/questions/1283955/computer-crashed-while-updating-to-new-ubuntu-20-04-release
- https://askubuntu.com/questions/1433027/upgrade-to-ubuntu-20-04-but-get-message-oh-no-something-has-gone-wrong
- https://askubuntu.com/questions/1500526/oh-no-something-has-gone-wrong-the-system-cant-recover
- https://askubuntu.com/questions/1407871/ubuntu-22-04-unity-desktop-environment-oh-no-something-has-gone-wrong
- https://askubuntu.com/questions/1186962/gnome-not-starting-on-19-10-with-my-existing-user-but-does-start-with-a-new-user
- https://askubuntu.com/questions/1446788/ubuntu-22-10-oh-no-something-has-gone-wrong
- https://askubuntu.com/questions/1253349/upgrading-from-18-04-to-20-04-oh-no-something-has-gone-wrong
- https://askubuntu.com/questions/1403433/update-to-22-04-on-dell-latitude-e7440
- https://askubuntu.com/questions/1187562/cant-use-my-desktop-on-ubuntu-19-10-after-upgrading-from-18-04
- https://askubuntu.com/questions/1288929/partial-upgrade-from-20-04-lts-to-20-10
- https://askubuntu.com/questions/1461463/kubuntu-22-04-oh-no-something-has-gone-wrong
- https://askubuntu.com/questions/1471200/orange-pi-ubuntu-jammy-unable-to-login-new-user
- https://askubuntu.com/questions/1467452/ubuntu-22-04-oh-no-something-has-gone-wrong-after-installing-nvidia
- https://askubuntu.com/questions/1214624/ubuntu-19-10-gui-gnome-will-not-load
- https://askubuntu.com/questions/1349224/problems-upgrading-to-ubuntu-21-04
- https://askubuntu.com/questions/1509060/i-updated-ubuntu-22-and-got-oh-no-something-has-gone-wrong
- https://askubuntu.com/questions/1268860/ubuntu-20-04-oh-no-something-has-gone-wrong-and-the-system-cant-recover-erro
- https://askubuntu.com/questions/1369310/ubuntu-21-10-gdm-problem-login-screen
- https://askubuntu.com/questions/1433546/ubuntu-22-04-1-lts-oh-no-something-went-wrong-please-contact-your-administrator
- https://askubuntu.com/questions/1475045/oh-no-something-has-gone-wrong-ubuntu-23-04-xrdp-xfce-desktop-google
- https://askubuntu.com/questions/1490182/how-to-solve-the-oh-no-something-has-gone-wrong-error
- https://askubuntu.com/questions/1481577/vm-crashed-during-ubuntu-update-and-doesnt-start-anymore
- https://askubuntu.com/questions/1183210/login-loop-on-ubuntu-19-10