华为悦盒EC6108V9C(hi3798mv100_hi3798mdmo1g)刷入debian9

首先非常非常感谢海思机顶盒NAS社区teasiu大佬的盒子ubuntu nas(海纳思)系统,我的系统完全基于其开发。强烈推荐新手和小白刷teasiu大佬的系统,我的仅供参考和学习。

刷入方法和海纳思系统U 盘卡刷一样,参考 U 盘卡刷教程 (ecoo.top) ,注意我的盒子专有 REG 名称是 mv100-mdmo1g 我手上没有其他盒子,和我不一样的把我的压缩包里面的 www_ecoo_top.ext4 替换过去应该就可以(请自行测试!)

更新日志

2022.10.14

修改U盘自动挂载方法,之前会导致ntfs挂载失败

添加wifi驱动方法

2022.10.15

我测试了debootstrap构建生成Ubuntu20.04和22.04,都可以正常启动

2022.10.16

经过测试,目前Ubuntu20.04是最稳定的,更新百度云链接,更新u盘自动挂载脚本

系统下载

链接: https://pan.baidu.com/s/14eRBIKrDBd5jaBhRlHpOIg 提取码: j7cr

简单介绍

我的系统采用debootstrap生成,只配置了用户、网络、locales、ssh、vim,系统十分纯净,不建议小白使用,安装完成后,使用 ssh debian@盒子ip 连接,密码为 password ,默认root不能登录,需要开启的话添加 PermitRootLogin yes 到/etc/ssh/sshd_config,然后执行 sudo systemctl restart sshd

安装完成后配置

基础配置

系统十分精简,安装完成后占用不到300m,默认使用的shell是sh

2fe44cb9afc13721b1602aa6807b4009/20230318172140.png

修改hosts ( /etc/hosts ),添加一行 127.0.0.1 hi3798mv100

sudo usermod --shell /bin/bash debian 修改debian用户的默认shell为bash

修改时区 ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

安装完成后root分区会很小(只有420m),执行命令 sudo resize2fs /dev/mmcblk0p9 扩展到正常大小

U盘自动挂载

如果想要开启u盘自动挂载,首先 sudo systemctl edit systemd-udevd 添加

1
2
3
[Service]
MountFlags=shared
PrivateMounts=no

然后 sudo systemctl restart systemd-udevd

添加文件

/usr/local/bin/usb-mount.sh,chmod +x /usr/local/bin/usb-mount.sh

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash

# This script is called from our systemd unit file to mount or unmount
# a USB drive.

usage()
{
echo "Usage: $0 {add|remove} device_name (e.g. sdb1)"
exit 1
}

if [[ $# -ne 2 ]]; then
usage
fi

ACTION=$1
DEVBASE=$2
DEVICE="/dev/${DEVBASE}"
MOUNT_ROOTDIR="/mnt/"

# See if this drive is already mounted, and if so where
MOUNT_POINT=$(/bin/mount | /bin/grep ${DEVICE} | /usr/bin/awk '{ print $3 }')

do_mount()
{
if [[ -n ${MOUNT_POINT} ]]; then
echo "Warning: ${DEVICE} is already mounted at ${MOUNT_POINT}"
exit 1
fi

# Get info for this drive: $ID_FS_LABEL, $ID_FS_UUID, and $ID_FS_TYPE
eval $(/sbin/blkid -o udev ${DEVICE})

# Figure out a mount point to use
MOUNT_POINT="${MOUNT_ROOTDIR}/${DEVBASE}"

echo "Mount point: ${MOUNT_POINT}"

/bin/mkdir -p ${MOUNT_POINT}

# Global mount options
OPTS="rw,relatime"

# File system type specific mount options
if [[ ${ID_FS_TYPE} == "vfat" ]]; then
OPTS+=",users,gid=100,umask=000,shortname=mixed,utf8=1,flush"
fi
if [[ ${ID_FS_TYPE} == "ntfs" ]]; then
OPTS+=",permissions"
fi

if ! /bin/mount -o ${OPTS} ${DEVICE} ${MOUNT_POINT}; then
echo "Error mounting ${DEVICE} (status = $?)"
/bin/rmdir ${MOUNT_POINT}
exit 1
fi

echo "**** Mounted ${DEVICE} at ${MOUNT_POINT} ****"
}

do_unmount()
{
if [[ -z ${MOUNT_POINT} ]]; then
echo "Warning: ${DEVICE} is not mounted"
else
/bin/umount -l ${DEVICE}
echo "**** Unmounted ${DEVICE}"
fi

# Delete all empty dirs in ${MOUNT_ROOTDIR}/ that aren't being used as mount
# points. This is kind of overkill, but if the drive was unmounted
# prior to removal we no longer know its mount point, and we don't
# want to leave it orphaned...
for f in ${MOUNT_ROOTDIR}/* ; do
if [[ -n $(/usr/bin/find "$f" -maxdepth 0 -type d -empty) ]]; then
if ! /bin/grep -q " $f " /etc/mtab; then
echo "**** Removing mount point $f"
/bin/rmdir "$f"
fi
fi
done
}

case "${ACTION}" in
add)
do_mount
;;
remove)
do_unmount
;;
*)
usage
;;
esac

/etc/systemd/system/[email protected]

1
2
3
4
5
6
7
8
[Unit]
Description=Mount USB Drive on %i

[Service]
Type=oneshot
RemainAfterExit=true
ExecStart=/usr/local/bin/usb-mount.sh add %i
ExecStop=/usr/local/bin/usb-mount.sh remove %i

/etc/udev/rules.d/10-usbstorage.rules

1
2
3
4
5
6
7
KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ACTION=="add", RUN+="/bin/systemctl start usb-mount@%k.service"

KERNEL=="sd[a-z][0-9]", SUBSYSTEMS=="usb", ACTION=="remove", RUN+="/bin/systemctl stop usb-mount@%k.service"

KERNEL=="mmcblk1[a-z][0-9]", SUBSYSTEMS=="block", ACTION=="add", RUN+="/bin/systemctl start usb-mount@%k.service"

KERNEL=="mmcblk1[a-z][0-9]", SUBSYSTEMS=="block", ACTION=="remove", RUN+="/bin/systemctl stop usb-mount@%k.service"

然后 执行 sudo systemctl daemon-reload

recoverbackup

recoverbackup指令要从海纳思系统复制,同时也要复制bootargs7.bin

其他

目前本系统还没有测试其稳定性和功能,请谨慎使用,并且做好之前系统的备份以便排查和修复错误。

如果想要使用新的debian系统,可以网上自行搜索debian升级教程

wifi可以参考论坛教程 WIFI驱动安装教程(自动/手动) - 海思机顶盒NAS社区 (histb.com)

添加文件 /etc/NetworkManager/conf.d/disable-random-mac.conf 然后重启

1
2
[device]
wifi.scan-rand-mac-address=no
打赏
  • 版权声明: 本博客所有文章除特别声明外,著作权归作者所有。转载请注明出处!
  • Copyrights © 2021-2025 lorzzn
  • 访问人数: | 浏览次数:

      请我喝杯咖啡吧~

      支付宝
      微信