deepin
问答
1. 上电自启动脚本配置?
上电自动联网,其中login是联网自动登录的程序。在~/.config/autostart
路径下新建login
服务脚本。 随后添加一下内容。
[Desktop Entry]
Type=Application
Exec="/home/orig/login/login"
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_IN]=autologin
Name=自动联网
Comment[en_IN]=autologin
Comment=自动联网登录
2. 双系统时间不一致?
由于deepin和win10双系统,时间不一致。linux采用utc时间,win10采用本地时间。因此会有8小时的时差。
# 在deepin中设置
timedatectl set-local-rtc 1
timedatectl
3. 双系统引导报错?
error: file'/boot/grub/i386-pc/nornal.nod’ not found.
Entering rescue node...
grub rescue>
解决办法如下:
# 0. 在grub rescue模式下,输入
ls
# 查看磁盘和分区情况
# 示例
# (hd1), (hd2), (hd1,msdos1), (hd1,msdos2), (hd2,gpt3), (hd2,gpt1),...
# 1. 通过ls命令查看磁盘和分区情况,找到根目录分区
ls (hd2, gpt6) # 我当时linux根目录的分区是gpt6
# 如果命令行提示:
# The filesystem is unknown
# 那么就换其他分区试试,直到找到根目录所在分区
# The filesystem is ext4 (Roota) # 当时deepin提示这个
# 2. 配置grub
set root=(hd2,gpt6) # 配置grub的根目录为gpt6分区
set prefix=(hd2,gpt6)/boot/grub
# 当然了,如果/boot单独一个分区,比如(hd2,gp7)那么prefix=(hd2,gpt7)/grub
insmod normal # 加载normal模块
normal # 加载正常模式
# 随后出现linux引导界面,正常进入系统
# 3. 修复grub
sudo update-grub # 更新grub
# sudo grub-install /dev/sda # sda是efi分区所在硬盘号,不要指定具体分区。
sudo grub-install /dev/nvme0n1 # 因为我的efi装在了固态上,因此这里是nvme0n1
# 4. 重启