我想将受信任的发送/可信接收发送到我的硬盘。我找到了这个页面: ATA Trusted commands in Linux。 (谢谢你的流行和Dmitry Obukhov)。
目前,我的麻烦是如何设置libata allow_tpm = 1。 我正在使用Ubuntu 13.10。我的代码与Dmitry Obukhov相同(它适用于Identify和所有其他命令,但不适用于可信命令。)
从另一方面看,这些就是我所做的:
- In BIOS, set AHCI mode.
在终端:
- sudo dmesg -c:
[ 0.157207] SCSI subsystem initialized.
[ 0.157209] ACPI: bus type ATA registered.
[ 0.157236] libata version 3.00 loaded.
[ 0.878999] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6
Gbps 0x3 impl SATA mode.
[ 0.887125] ata1: SATA max UDMA/133 abar m2048@0xf7c16000 port
0xf7c16100 irq 41.
[ 0.887127] ata2: SATA max UDMA/133 abar m2048@0xf7c16000 port
0xf7c16180 irq 41.
[ 1.205449] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl
300).
[ 1.205477] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl
300).
[ 1.206127] ata2.00: supports DRM functions and may not be fully
accessible.
[ 1.206131] ata2.00: ATA-8: ST500LT025-1A5142, 0001SDM7, max
UDMA/133.
[ 1.206133] ata2.00: 976773168 sectors, multi 1: LBA48 NCQ (depth
31/32).
[ 1.206159] ata1.00: supports DRM functions and may not be fully
accessible.
[ 1.206163] ata1.00: ATA-8: ST500LT025-1A5142, 0001SDM7, max
UDMA/133.
[ 1.206165] ata1.00: 976773168 sectors, multi 1: LBA48 NCQ (depth
31/32).
- systool -a -v -m libata
Module = "libata"
Attributes:
uevent = <store method only>
version = "3.00"
Parameters:
acpi_gtf_filter = "7"
allow_tpm = "0"
ata_probe_timeout = "0"
atapi_an = "0"
atapi_dmadir = "0"
atapi_enabled = "1"
atapi_passthru16 = "1"
dma = "7"
fua = "0"
ignore_hpa = "0"
noacpi = "0"
zpodd_poweroff_delay= "30"
- sudo nano /etc/modprobe.d/local.conf.
Add this line: options libata allow_tpm=1
- sudo nano /boot/grub/menu.lst.
Add this line: combined_mode=libata
- sudo update-initramfs -u&& sudo update-grub2
重新启动后,我再次运行systool -a -v -m libata
,allow_tpm
没有任何变化。我该怎么做才能更改allow_tpm
?
答案 0 :(得分:2)
如果您想更改allow_tpm
,请grub
将libata.allow_tpm=1
添加到GRUB_CMDLINE_LINUX_DEFAULT
中的/etc/default/grub
。例如:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.allow_tpm=1"
然后运行sudo update-grub
并重新启动。
答案 1 :(得分:0)
我刚刚成功更改了allow_tpm的值,因此ATA Trusted命令现在正常工作。
- cd /sys/module/libata/parameters
- sudo chmod 644 allow_tpm
- sudo nano allow_tpm
Delete number 0 and write number 1. Save file.
也许这不是一个确切的方法,因为每次重新启动计算机时,文件allow_tpm中的值都会重置为0.
答案 2 :(得分:0)
我为CentOs 7:Uefi Boot尝试过
添加内核标志:libata.allow_tpm=1
我在CentOs 7上尝试过这个:Uefi Boot,它的工作原理很像魅力:
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash libata.allow_tpm=1"
运行命令:grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
或用于非uefi操作系统grub2-mkconfig -o /boot/grub2/grub.cfg
systemctl reboot
cat /proc/cmdline
如下所示BOOT_IMAGE=/vmlinuz-3.10.0-957.27.2.el7.X86_64 root=/dev/mapper/centos-root ro crashkernel=autord.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quite splash libata.allow_tpm=1