【教程】嫁接Deepin到一个兼容你设备的Linux系统~
Tofloor
poster avatar
verdure
deepin
2020-11-18 05:34
Author

楼主的机器装deepin一直驱动不了显卡,所以就想了个办法在ubuntu的基础上跑Deepin,达到让Deepin兼容我的显卡的目的~~[尾]

此教程适用于机器有兼容的Linux系统但是却无法兼容Deepin的状况。如果你的机器有兼容的Linux系统但无法安装Deepin,可以按照这篇教程的步骤来嫁接Deepin到一个兼容你机器的系统上。[尾]

正文:

首先,你需要安装一个兼容你机器的Linux系统,装好Xorg和display manager(lightdm gdm sddm等)新手用户推荐直接装带图形界面的系统。

如果你不知道什么系统兼容你的硬件,manjaro/arch一般对新的硬件友好,比如说AMD最新的APU,ubuntu对n卡友好,如果你用的是n卡,尝试ubuntu。Debian stable/centos 的内核稳定性要比deepin好。如果deepin在你的硬件上不稳定那么在这些系统上运行deepin可能会解决问题。Fedora也是一个广泛支持硬件的发行版。也可以尝试。

安装Deepin系统需要在兼容系统中安装unsquashfs这个程序,这个需要在兼容系统的包管理中去查找squash,查到包含该程序的软件包,一般是squshfs-tools。

使用su/sudo命令切换到当前系统的root账户,执行命令:

mount “存放Deepin ISO文件的路径” /mnt

cd /

unsquashfs /mnt/live/filesystem.squashfs

mv squashfs-root deepin

ln -s /deepin /var/lib/machines

nano /lib/systemd/system/deepin.service 

填写如下内容:

[Unit]
Descrīption=”Deepin“
After=network.target systemd-resolved.service
PartOf=machines.target
Before=machines.target
RequiresMountsFor=/var/lib/machines

[Service]
ExecStart=/usr/bin/systemd-nspawn -bD /deepin --bind-ro=/tmp/.X11-unix --bind /dev/dri/card0(如果是n卡:/dev/nvidia0) --bind /mnt
KillMode=mixed
Type=notify
RestartForceExitStatus=133
SuccessExitStatus=133
WatchdogSec=3min
Slice=machine.slice
Delegate=yes
TasksMax=16384
DevicePolicy=closed
DeviceAllow=/dev/net/tun rwm
DeviceAllow=char-pts rw
DeviceAllow=/dev/loop-control rw
DeviceAllow=block-loop rw
DeviceAllow=block-blkext rw
DeviceAllow=/dev/mapper/control rw
DeviceAllow=block-device-mapper rw


[Install]
WantedBy=machines.target

control+o 保存 然后输入命令

systemctl enable deepin

nano /etc/pulse/default.pa
添加load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

control+o 保存 然后输入命令

nano /bin/deepin

填写:

#!/bin/bash
xhost +local:
rm -rf /deepin/etc/securetty /deepin/usr/share/factory/etc/securetty
rm -rf /deepin/etc/resolv.conf
echo 'nameserver 114.114.114.114' > /deepin/etc/resolv.conf
machinectl shell root@deepin /bin/bash /bin/gui

control+o 保存 执行命令

chmod 755 /bin/deepin


nano /deepin/bin/gui

export DISPLAY=:0
export LANG="zh_CN.UTF-8"
export LANGUAGE="zh_CN:zh"
export PULSE_SERVER="tcp:127.0.0.1:4713"
/etc/X11/xinit/xinitrc
control+o 保存 执行命令

chmod 755 /deepin/bin/gui


nano /usr/share/xsessions/deepin.desktop

填写:
[Desktop Entry]
Name=Deepin
Comment=Deepin
Exec=/bin/deepin
TryExec=/bin/deepin
Icon=
Type=Application

control+o 保存

重启后,在登陆界面桌面环境项选择deepin,输入用户名密码即可登入deepin系统


已知问题:

deepin的关机和重启会退回到登录界面

挂载U盘需要切换到其他tty手动挂载到/mnt

dde无法开启桌面特效

Reply Favorite View the author
All Replies
element
deepin
2020-11-18 05:44
#1

你这个是还在编辑么?。。。

Reply View the author
verdure
deepin
2020-11-18 05:46
#2
It has been deleted!
verdure
deepin
2020-11-18 06:06
#3
It has been deleted!
神末shenmo
Moderator
Spark-App
2020-11-18 06:10
#4
Reply View the author
verdure
deepin
2020-11-18 06:14
#5
It has been deleted!
lanyun7112
deepin
2020-11-18 06:30
#6

这都可以?厉害

Reply View the author
verdure
deepin
2020-11-18 06:36
#7
神末shenmo

我用deepin主要是看上了deepin的软件中心和里面的软件。。。。。

Reply View the author
Comments
mcaoser
2020-11-18 07:37
正解,不然我就用fedora或centos去了
verdure
deepin
2020-11-18 06:36
#8
element

你这个是还在编辑么?。。。

恩,已经写完了

Reply View the author
Ziggy
deepin
2020-11-18 06:58
#9

建议整合在一次,可以编辑的

Reply View the author
SamLukeYes
deepin
2020-11-18 07:00
#10

和我之前整过的 MSD 思路很像,但我现在干脆把 deepin 搬进 GNOME Boxes 了。正常使用肯定是不会开 deepin 虚拟机了,日常需要的 deepin 软件可以在 AUR 上找,没有的话就写个 PKGBUILD 挂 AUR 上,虚拟机只是用来打探 deepin 的情报的[开心]

Reply View the author
verdure
deepin
2020-11-18 07:08
#11
Ziggy

建议整合在一次,可以编辑的

已经整合好了

Reply View the author
Ziggy
deepin
2020-11-18 07:10
#12
verdure

已经整合好了

麻烦了[喜欢]

Reply View the author
verdure
deepin
2020-11-18 07:23
#13
SamLukeYes

和我之前整过的 MSD 思路很像,但我现在干脆把 deepin 搬进 GNOME Boxes 了。正常使用肯定是不会开 deepin 虚拟机了,日常需要的 deepin 软件可以在 AUR 上找,没有的话就写个 PKGBUILD 挂 AUR 上,虚拟机只是用来打探 deepin 的情报的[开心]

用nspawn运行deepin效率会更高 方法可以参考wiki的systemd-nspawn界面

Reply View the author
神末shenmo
Moderator
Spark-App
2020-11-18 12:37
#14
SamLukeYes

和我之前整过的 MSD 思路很像,但我现在干脆把 deepin 搬进 GNOME Boxes 了。正常使用肯定是不会开 deepin 虚拟机了,日常需要的 deepin 软件可以在 AUR 上找,没有的话就写个 PKGBUILD 挂 AUR 上,虚拟机只是用来打探 deepin 的情报的[开心]


卧底实锤了

Reply View the author
神末shenmo
Moderator
Spark-App
2020-11-18 12:42
#15


参加下上头条活动吧,精华估计稳了

Reply View the author
SamLukeYes
deepin
2020-11-18 15:11
#16
verdure

用nspawn运行deepin效率会更高 方法可以参考wiki的systemd-nspawn界面

nspawn 肯定比一般的虚拟机效率高,但大概不会比直接在 Arch 或 Manjaro 上运行 Deepin 的程序效率高。你也可以试试 bedrock linux[尾]

Reply View the author
Cris.Q
deepin
2020-11-19 08:29
#17

你这个。。。有必要吗?


Reply View the author
deepin爱好者
deepin
2020-11-22 20:34
#18

看不懂[困惑]

Reply View the author
fregie
deepin
2020-12-01 21:30
#19
verdure

我用deepin主要是看上了deepin的软件中心和里面的软件。。。。。

我是看上了缩放...

Reply View the author