当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 4 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : grub2中如何发送自定义的scsi命令!
帖子发表于 : 2017-04-27 16:24 

注册: 2008-06-25 11:27
帖子: 6
送出感谢: 0 次
接收感谢: 0 次
因为一些定制的需要,我想在grub2中发送自定的scsi命令,就是一些自定义的读写操作,针对特殊的设备,应该怎么做呢?查看源码没有找到添加scsi命令的地方。


页首
 用户资料  
 
2 楼 
 文章标题 : Re: grub2中如何发送自定义的scsi命令!
帖子发表于 : 2017-04-27 20:01 

注册: 2009-08-04 16:33
帖子: 16900
送出感谢: 21
接收感谢: 1830
引用:
我想在grub2中发送自定的SCSI命令,就是一些自定义的读写操作,针对特殊的设备,应该怎么做呢?

1. Grub 無法區分 IDE, ESDI, SCSI 或 其它裝置
http://mcs.une.edu.au/doc/grub2-tools/grub.html
1-1. Note that GRUB does not distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.
1-2. Historically, the device map file was used because GRUB device names had to be used in the configuration file, and they were derived from BIOS drive numbers. The map between BIOS drives and OS devices cannot always be guessed correctly: for example, GRUB will get the order wrong if you exchange the boot sequence between IDE and SCSI in your BIOS.
1-3. GRUB uses a special syntax for specifying disk drives which can be accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish between IDE, ESDI, SCSI, or others. You must know yourself which BIOS device is equivalent to which OS device. Normally, that will be clear if you see the files in a device or use the command search (see search).

2. 不知道 跟你的指令 有無關聯


页首
 用户资料  
 
3 楼 
 文章标题 : Re: grub2中如何发送自定义的scsi命令!
帖子发表于 : 2017-04-28 10:50 

注册: 2008-06-25 11:27
帖子: 6
送出感谢: 0 次
接收感谢: 0 次
poloshiao 写道:
引用:
我想在grub2中发送自定的SCSI命令,就是一些自定义的读写操作,针对特殊的设备,应该怎么做呢?

1. Grub 無法區分 IDE, ESDI, SCSI 或 其它裝置
http://mcs.une.edu.au/doc/grub2-tools/grub.html
1-1. Note that GRUB does not distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.
1-2. Historically, the device map file was used because GRUB device names had to be used in the configuration file, and they were derived from BIOS drive numbers. The map between BIOS drives and OS devices cannot always be guessed correctly: for example, GRUB will get the order wrong if you exchange the boot sequence between IDE and SCSI in your BIOS.
1-3. GRUB uses a special syntax for specifying disk drives which can be accessed by BIOS. Because of BIOS limitations, GRUB cannot distinguish between IDE, ESDI, SCSI, or others. You must know yourself which BIOS device is equivalent to which OS device. Normally, that will be clear if you see the files in a device or use the command search (see search).

2. 不知道 跟你的指令 有無關聯


不是,不管他是否区分设备,最终要实现读写,他其实都是通过scsi命令进行的吧,我只是想在他发送命令的时候增加一个命令,这个命令格式是标准的scsi命令格式,只不过命令本身是自定义的,实现对特定地址的读写,这些device的固件已经做了修改,但是我如何能在grub启动的时候发送这些命令,要收到了上层命令,固件才会做读写特定地址。


页首
 用户资料  
 
4 楼 
 文章标题 : Re: grub2中如何发送自定义的scsi命令!
帖子发表于 : 2017-04-28 12:14 

注册: 2009-08-04 16:33
帖子: 16900
送出感谢: 21
接收感谢: 1830
http://mcs.une.edu.au/doc/grub2-tools/g ... figuration
6.4 Embedding a configuration file into GRUB
GRUB supports embedding a configuration file directly into the core image, so that it is loaded before entering normal mode. This is useful, for example, when it is not straightforward to find the real configuration file, or when you need to debug problems with loading that file. grub2-install uses this feature when it is not using BIOS disk functions or when installing to a different disk from the one containing /boot/grub, in which case it needs to use the search command (see search) to find /boot/grub.

看看 這個 在 grub 嵌入 一個設定檔 的功能
適合嗎


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 4 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 3 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译