本文为帮助自行编译引导的同学, 其余可自行寻找思路。
按照国外大佬: github的com/的非负数
pocopico/的 tinycore-redpill 的编译方案, 确实能编译出来一个loader.img, 但是安装的时候, 会提示错误:
无法安装此文件,文件可能已经损毁.
此时可以明确确定 sn/mac/pid/uid 一定是正确的。
telnet目标机器, 查看 /var/log 日志,提示的这段:
- echo "ERROR: Timeout waiting for /dev/synoboot device to appear."
- echo "Most likely your vid/pid configuration is not correct, or you don't have drivers needed for your USB/SATA controller"
复制代码 显然, 提示很明确, 需要一个 /dev/synoboot 的设备。
它从 usb 或者 sata 来(见名知意,就是编译的那个引导),找不到。 可是, 命名网页都启动起来了, 都可以telnet进来, 为何如此提示呢?
摘录一段疑似 群晖 员工的话(不能贴链接):
- There’s a flash chip on the motherboard (a usb dom located at /dev/synoboot) with uboot or grub and a tiny Linux kernel which enumerates all the disks and looks on all drives for dsm on a md raid 1 partition.
- It then pivots and kexecs the kernel from the raid 1.
- If no raid 1 is found it loads the dsm web assistant from the flash chip, which provides hooks to install dsm from either synology assistant or web assistant.
- If installing dsm fails it loads a telnet server for debugging, which you can use to view what’s on the flash chip’s bare bones linux system.
- When you set up DSM via synology assistant or web assistant, it is installed on a raid 1 located on all initialized drives. Setting up a storage pool adds a small section of every drive to this raid 1 array. Adding drives to a storage pool automatically extends the raid 1 to the new drives.
- There’s also a second raid 1 volume also set up on all initialized drives used as swap.
- Enable ssh on your nas and shell in, check mdstat and your mounts. Md0 is your dsm install, md1 is your swap partition, all the other md arrays are your storage arrays (you may have several if you use shr).
- I don’t recommend you fu12ck around with them, but if you understand mdraid and lvm2, you’re welcome to. Make a backup first.
复制代码 在白裙的主板上有一块专门的引导区芯片, 用作引导。
引导时发现找不到安装群晖的硬盘,就会启动安装程序。 如果安装失败, 则会启动telnet服务让你去debug。
问题就在这块引导芯片上(也就是黑裙里面的那个U盘,以及, 最好是U盘, 省事)。
U盘安装的引导一般是三个分区,
一个引导分区, 一个不知道啥分区, 一个不知道啥分区。
它们如果被加载, 则分别对应到 Linux 挂载设备上的 /dev/synoboot、/dev/synoboot1、/dev/synoboot2.(这也是pid和vid必须对应才能加载的原因)
而微内核所处位置是在引导分区的 rd.gz 里面的。
那么问题来了:
既然微内核能启动(网页能打开, 还能提示安装失败), 起码当前微内核所在的这分区(就是 /dev/synoboot)肯定是被加载了的, 为何它不能被挂载到/dev/synoboot 上去?
以及, 另外两个不知道是啥分区的分区(linux下不可读, windows下挂载之后发现磁盘需要被格式化), 究竟是确实就是不可读(需要特定格式),还是说编译的时候就编译失败了, 才导致不可读的?
留着更新, 折腾十几天了, 搞不出来不停止。
|
|