目前为止windows全系列包括server系统都无解,装linux可以解决。
Ubuntu 22.04.2 LTS
将/sys/class/scsi_disk/里的manage_start_stop文件由0改为1
查看硬盘型号
cat /sys/class/scsi_disk/0:0:0:0/device/model
批量修改
su root
for i in /sys/class/scsi_disk/*/manage_start_stop; do echo 1 > $i; done
设置开机自启动(未成功)
cd /opt
sudo mkdir scripts
sudo vi /opt/scripts/custom.sh
sudo sh -c “sudo for i in /sys/class/scsi_disk/*/manage_start_stop; do echo 1 > $i; done”
sudo chmod 755 /opt/scripts/custom.sh
sudo vi /etc/systemd/system/custom.service
[Unit]
Description = Custom Startup Service
[Service]
Type = simple
ExecStart = opt/scripts/custom.sh
[Install]
WantedBy = multi-user.target
:wq
运行脚本
sudo systemctl enable custom.service
查看脚本
systemctl status custom.service
解锁密钥环
安装seahorse
开机root登录
评论前必须登录!
注册