Frankie's blog


  • 首页

  • 归档

How to use dd command to change disk data?

发表于 2020-08-03 | 分类于 开发

Step 1: Get from offset 0x1000000(byte) and 512 bytes image.

$ sudo dd if=/dev/disk2 bs=512 count=1 skip=32768 of=./test.img

Step 2: Check the hex files

1
2
3
4
5
6
7
8
9
10
11
12
13
14
$ hexdump ./test.img
0000000 55 aa f0 0f 31 2e 30 30 31 2e 30 32 00 00 00 00
0000010 ed d2 5b 75 00 00 00 00 00 00 00 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02
0000050 30 38 43 33 46 44 46 31 42 31 37 45 43 34 46 34
0000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
0000080 32 30 31 35 31 32 31 32 5f 53 56 4e 30 33 37 37
0000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*
00001f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 31 59
0000200

Step 3: Unmount disk2

1
2
$ diskutil unmount /dev/disk2s1
$ umount /dev/disk2s1

Step 4: Use UltraEdit to change it and write back to disk

sudo dd if=./test_Mod.img of=/dev/disk2 bs=512 count=1 oseek=32768

利用 wakeonlan 远程唤醒网络(WOL Magic Packet)

发表于 2020-08-03 | 分类于 开发

利用 wakeonlan 远程唤醒网络(WOL Magic Packet)

此方法即可以唤醒休眠中的主机,也可以实现开机。

需唤醒主机设置

硬件设置

  1. 目前大部分网卡都支持此功能,貌似默认也为开启状态。
  2. 去相应的主板官网下载最新网卡驱动包安装。
  3. 去到 计算机管理 -> 设备管理器 -> 网络适配器,双击对应的物理网卡,在弹出的属性菜单中选择 电源管理,勾选允许远程唤醒选项。
  4. 进入BIOS,将”Power Management Setup”中的”Wake Up On LAN”或”Resume by LAN”项设置为Enable或On,主板不一样,BIOS设置位置有可能有差异。
  5. [可选] 安装向日葵或者AnyDesk已方便远程访问。

获取主机物理地址(HWaddr)

  • Windows主机进入网络界面查看详细信息或进入dos窗口输入:
    ipconfig /all
  • Linux主机终端中输入:
    ifconfig

局域网中另一台主机或者Nas

Unbutu

  • 安装wakeonlan工具:
    sudo apt-get install wakeonlan
  • 唤醒command:
    wakeonlan 00:11:22:33:44:55

Nas主机

  • 获取相应的可执行文件或者自己编译:
    https://github.com/GramThanos/WakeOnLAN#pre-compiled-binaries
  • Usage:
    ./WakeOnLAN <mac address>[ <broadcast address>]
  • Example:
    ./WakeOnLAN 00:11:22:33:44:55 192.168.1.255

解决UNRAID无法安装访问APPS应用中心的问题

发表于 2020-08-03 | 分类于 开发

官方Plugin地址

 https://raw.githubusercontent.com/Squidly271/community.applications/master/plugins/community.applications.plg

添加快速域名解析到host文件

1
2
3
4
cat <<EOF >> /etc/hosts
151.101.76.133 raw.githubusercontent.com
151.101.76.133 raw.github.com
EOF

安装 apps 应用中心(Community Applications)按照下面的操作步骤即可

  1. 单击unRaid web页面上面菜单PLUGINS
  2. 单击Install Plugin选项卡
  3. 在Enter URL of remote plugin file or local plugin file输入
    https://raw.githubusercontent.com/Squidly271/community.applications/master/plugins/community.applications.plg

ip解析查询

 https://www.ip138.com/

个性签名咋样啊?

发表于 2020-06-10

纯手工打造的个性签名

我设计的个性签名

<123

24 日志
3 分类
22 标签
© 2025 John Doe
由 Hexo 强力驱动
|
主题 — NexT.Pisces v5.1.4