WD MyCloud安装Debian Jessie #
拆开WD Drive #
- 拆开WD Drive并取下其中的数据硬盘
- 将WD Drive连接到电脑
- 使用安装Linux的电脑操作整个过程,或者使用USB启动的Linux系统也可以。
创建分区 #
You can skip this section if you have not formatted the drive after connecting it to your computer and have the original partitions.
- 安装所需软件
apt-get install parted
- 在计算机上找到您的 WD 驱动器,查看分区信息并找到与您的 WD MyCloud 大小相似的驱动器。对我来说,它是大小约为 1.8 TB 的 /dev/sdb。
fdisk -l
- 使用
parted
执行分区操作
parted /dev/sdb
- 查看当前分区信息
print
- 删除所有分区, 我当前只有一个1
remove 1
- 重新创建所需分区
```sh
mklabel gpt
mkpart primary 528M 2576M
mkpart primary 2576M 4624M
mkpart primary 16M 528M
mkpart primary 4828M 100%
mkpart primary 4624M 4724M
mkpart primary 4724M 4824M
mkpart primary 4824M 4826M
mkpart primary 4826M 4828M
set 1 raid on
set 2 raid on
- 退出parted
quit
- 格式化data分区和swap分区
mkfs -t ext4 /dev/sdb4
mkswap /dev/sdb3
- 创建RAID分区
mdadm --create /dev/md0 --level=1 --metadata=0.9 --raid-devices=2 /dev/sdb1 /dev/sdb2
安装Debian #
fdisk -l
安装RAID设备软件 #
apt-get install mdadm
- 挂载RAID分区
mdadm --stop /dev/md*
mdadm -A /dev/md0 /dev/sdb1 /dev/sdb2
- 挂在data分区
mount -t ext4 /dev/sdb4 /mnt
cd /mnt
- 下载Clean Debian并解压
wget https://github.com/abskmj/wd-mycloud-gen1/releases/download/packages/clean-debian-jessie.tgz
tar -xvfz clean-debian-jessie.tgz
If you are planning to install one of the original packages. You can download that package instead of Debian.
# v3.x
wget https://github.com/abskmj/wd-mycloud-gen1/releases/download/packages/original-v03.04.01-230.tar.gz
tar -xvfz original-v03.04.01-230.tar.gz
# v4.x
wget https://github.com/abskmj/wd-mycloud-gen1/releases/download/packages/original-v04.01.02-417.tar.gz
tar -xvfz original-v04.01.02-417.tar.gz
- 拷贝镜像至分区
dd if=kernel.img of=/dev/sdb5
dd if=kernel.img of=/dev/sdb6
dd if=config.img of=/dev/sdb7
dd if=config.img of=/dev/sdb8
dd if=rootfs.img of=/dev/md0
重新连接WD Drive #
- You can shut your computer down and remove the WD drive.
- You don’t have to assemble the device completely right now, you can simply connect the plate to the drive and attach a LAN / power cord to it.
- It should start up and show a yellow light.
- You should see a green light in a while, which means Debian has started properly.
- You can now ssh into your MyCloud device.
- root 用户的默认密码是 mycloud。
- DO WHATEVER YOU WANT WITH YOUR NEW LINUX BOX! : )
警告: 执行apt-get upgrade有时会使设备变砖,应该避免这种情况。
https://abskmj.github.io/notes/posts/wd-mycloud/install-debian-wdmycloud/