问题解决方法: 需要Solaris X86 1/06的第一张CD光盘或者DVD光盘,就可以重新安装Grub 步骤: 1)设置机器并从Solaris X86 1/06光盘启动 2)在出现Grub界面的时候,按“c”进入grub命令模式,如下界面: GNU GRUB version 0.95 (640K lower /1046043K upper memory) Solaris Solaris Serial Console ttya Solaris Serial Console ttyb (for lx50,v60 and v65x)
Use the arrow up and arrow down keys to select which entry is highlighted. Press enter to boot the selected OS,'e'to edit the commands before booting, or 'c' for a command-line. The highlighted entry will be booted automatically in 60 seconds. 3)在grub命令模式下,找到硬盘上已安装的Solaris系统(两种方法选择其一即可,在find的时候软驱会很响,不用担心大概10秒左右结果就输出了)
grub>root (hd0,1,a) Filesystem type is ufs, partition type 0xbf 5) 指定boot和archive文件,最后直接由grub界面启动Solaris X86系统 grub>kernel /platform/i86pc/multiboot 输出:[Multiboot-elf,<0x1000000:0x13ab3:0x12906>,shtab=0x1027258,entry=0x1000000] grub>module /platform/i86pc/boot_archive 输出:[Multiboot-module @ 0x1034000,0x45bd000 bytes] grub>boot 此时系统直接从grub命令模式启动Solaris X86系统(有ufs挂接的系统启动) 如果记不住这些命令,我们可以借助menu.lst文件,其实这个文件是原grub用于启动的菜单,并含有这些启动命令,可供我们参考。一般这个文件的位置在/boot/grub/menu.lst,我们可以使用cat显示内容。 grub>cat /boot/grub/menu.lst 6) 进入Solaris后,使用root身份安装grub,最后重新启动系统 #/usr/sbin/installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0d0s0 输出:Updating master boot sector destorys existing boot managers (if any) Continue (y/n)? y stage1 written to partition 1 sector 0 (abs 31455270) stage2 written to partition 1, 233 sectors starting at 50 (abs 31455320) stage1 written to master boot sector # init 6 其中c0d0s0是所安装的Solaris X86系统的根卷所在位置,该命令会将Grub文件安装到该硬盘的MBR,至此重新启动 7) 重新启动后系统即可将grub修复完成。
附件(/boot/grub/menu.lst有效语句): # default menu entry to boot ======定义默认启动的系统序列号 default 2 ======以本例所示:Solaris 10 11/06 s10x_u3wos_10 X86为default 0 Solaris failsafe为default 1 Windows2003Server为default 2 Diagnostic Partition为default 3
# menu timeout in second before default OS is booted ======定义系统等待选择时间 # set to -1 to wait for user input timeout 10 #---------- ADDED BY BOOTADM - DO NOT EDIT ---------- ======定义SolarisX86系统正常启动参数 title Solaris 10 11/06 s10x_u3wos_10 X86 root (hd0,1,a) kernel /platform/i86pc/multiboot module /platform/i86pc/boot_archive #---------------------END BOOTADM-------------------- #---------- ADDED BY BOOTADM - DO NOT EDIT ---------- ======定义SolarisX86系统故障启动参数 title Solaris failsafe root (hd0,1,a) kernel /boot/multiboot kernel/unix -s module /boot/x86.miniroot-safe #---------------------END BOOTADM-------------------- title Windows 2003 Server ============定义Other OS启动参数 rootnoverify (hd0,0) chainloader +1 title Diagnostic Partition ============定义Other OS启动参数 rootnoverify (hd0,2) chainloader +1