|
发表于 2003-11-9 15:45:02
|
显示全部楼层
GNU Mach enumerates disks starting at zero. IDE drives are prefixed with hd, while SCSI disks are prefixed with sd. Like Linux, drives are number by their position on the controller. For instance, the primary master is hd0 and the secondary slave is hd3. Partitions use the BSD slice naming convention and append sM to the drive name to indicate a given partition. Note that M is a one, not zero, based index. The slice number is simple to calculate: just increment what was used for Grub by one.
GNU Mach以零开始命名磁盘.IDE盘加前缀hd,SCSI盘加前缀sd.像linux那样,驱动器按它们在控制器上的位置来排序.比如:第一个主控制器primary master 是hd0,而第二个副控制器是hd3.分区使用BSD slice命名惯例,通过在驱动器后加上sM来指出所给分区.(注意:M是以一开始的,而不是以零开始),slice号很容易算:就是在Grub所用的基础上加上一个1.
Since the Hurd has not yet been configured, it must be started in single user mode. Adding a ‘?s’ to the kernel command line is all that is required.
在hurd还没有配置之前,必须以单用户模式启动,只需要在"内核命令行"上加上参数-s选项
Assuming that the first drive (i.e. ‘(hd0)’) is the master on the secondary controller, we would have:
假设第一个驱动器比如(hd0)是第二个控制器上的主驱动器,我们必须用:
grub> kernel (hd0,0)/boot/gnumach.gz root=device:hd2s1 ?s [Multiboot?elf, ...]
Next, the root filesystem server and the exec server must be loaded. This is done using Grub’s boot module capability. The ${var} are filled in by GNU Mach. The arguments are used by the Hurd to indicate what type of information is being provided. Since the ext2fs command line is very long, it can be broken up by escaping the newline character in the normal Unix fashion. Be sure that there is not space after the slash at the end of each line. Also be sure to differentiate { and } from ( and ).
下一步,必须先加载根文件系统服务和执行系统服务.通过使用Grub的启动模块化功能做到这一步.由GNU Mach提供${var}值.这个参数被THE HURD用来识别提供的是哪种信息,因为这样ext2fs命令行会很长,可能在通常的UNIX形式里会以换行符的方式被打断.??请确定在每一行的结尾斜线后没有空格,并且要从(and)中区分出{and}.
grub> module (hd0,0)/hurd/ext2fs.static \
??multiboot?command?line=${kernel?command?line} \
??host?priv?port=${host?port} \
??device?master?port=${device?port} \
??exec?server?task=${exec?task} ?T typed ${root} \
$(task?create) $(task?resume)
[Multiboot?module 0x1c4000, 0x2cfe6a bytes] grub> module (hd0,0)/lib/ld.so.1 /hurd/exec $(exec?task=task?create) [Multiboot?module 0x494000, 0x27afe bytes]
Once the GNU Hurd is running, process can be automated by adding the appropriate commands to Grub’s ‘/boot/grub/menu.lst’ configuration file.
一旦GNU Hurd在运行,进程可以通过在Grub的'/boot/grub/menu.lst’配置文件适当的位置添加而自动运行
The GNU Hurd can be now booted:
GNU Hurd现在可以启动了:
grub> boot
Sit back and watch the messages. This is actually more important than most people believe: there is a bug in GNU Mach whereby hitting a key during the boot process causes the kernel to panic.
坐下来看着信息.这事实上是比大多数人相信的更重要的:因为在GNU Mach里有一个bug,在启动进程过程中通过按住一个键可以导致内核紊乱(出错).???
If the Hurd fails to boot, it could be due to shared IRQs: GNU Mach does not play well with these. You can verify your situation by looking at, for instance, the ‘/proc/interrupts’file under GNU/Linux. Also, as GNU Mach does not support loadable kernel modules, many of the drivers are compiled into the default kernel. If there are old peripherals, this can be a problem: a device may incorrectly respond to a probe intended for a completely unrelated device and thereby cause a crash. Building a new kernel with only the required device drivers will usually solve this problem. GNU Mach is easily cross compiled. If you are running Debian, try installing the ‘gcc?i386?gnu’ package.
如果Hurd启动失败,可能是因为IRQ的问题:GNU Mach在这方面没有做好.你可以通过别的方式查看你的情况,比如说,在GNU/Linux下的/proc/interrupts文件.另外,因为GNU Mach不支持可加载内核模块,很多驱动都编译进缺省的内核里去了.如果你有旧的周边设备的话,这可能是个问题.一个设备可能不能正确的回应一个企图对完全无关设备的检测,这样就导致了死机.编译一个新的内核,只加进需要的设备驱动常常可以解决这个问题.GNU Mach是易于跨平台编译的,如果你在运行Debian,可以尝试安装‘gcc?i386?gnu’包.
If this does not help, explore the resources listed at the end of this document. Finally, ask on the appropriate mailing list.
如果这样还不行的话,浏览这个文档结尾列出的资源列表.再不行的话,请在适当的邮件列表上提问.
6 Native Install
6本地安装
Once you are presented with a shell prompt, and any time that the the Hurd is in single user mode, it is necessary to set the terminal type:
一旦你在一个shell上,或者任何时候如果HURD在单用户模式的话,必须设置终端类型:
# export TERM=mach
Be warned that ?CONTROL?C? and family will not work in single user mode.
必须清楚:在单用户模式下control +c 键和family键无法用.
We can now run the native?install script. This will configure the packages and set up several important translators:
现在可以运行nativeinstall脚本.这样就会配置程序包并设置许多重要的转换.
# ./native?install
Before the script terminates, it will indicate that it needs to be run a second time. Follow its instructions and reboot using the reboot command. Again, go into single user mode and run ./native?install.
在脚本结束前,它会指出还需要运行第二次.跟着指示用reboot命令启动计算机.再次进入单用户模式并再次运行./native?install. |
|