找回密码
 注册
搜索
系统gho:最纯净好用系统下载站升级VIP会员,联系 微信:wuyouceo
楼主: zhaohj

GRUB4DOS更新建议、bug反馈专帖

 荐  火... [复制链接]
发表于 2012-2-29 09:01:29 | 显示全部楼层
原帖由 zhaohj 于 2012-2-28 17:46 发表


比较了一下,gcc4.5与gcc4.6编译后文件大小一致了。感谢roy,解决了长期编译困惑的问题。

只限tc吧
debian/ubuntu/fedora的gcc-4.6還是298KB

[ 本帖最后由 roytam1 于 2012-2-29 09:05 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2012-2-29 12:35:46 | 显示全部楼层
原帖由 roytam1 于 2012-2-29 09:01 发表

只限tc吧
debian/ubuntu/fedora的gcc-4.6還是298KB


测试了一下debian版的gcc4.6.2编译出来是298KB,但引导是成功的。以前无法引导。
回复

使用道具 举报

发表于 2012-2-29 12:45:38 | 显示全部楼层
原帖由 zhaohj 于 2012-2-29 12:35 发表


测试了一下debian版的gcc4.6.2编译出来是298KB,但引导是成功的。以前无法引导。

變大的問題乃 .eh_frame, .eh_frame_hdr ELF section 礙事之故,修正已提交 svn。
回复

使用道具 举报

 楼主| 发表于 2012-2-29 13:13:50 | 显示全部楼层
debian版的gcc4.6.2编译出来266459(260kb),哇,小了。
wee的编译再看一下。
回复

使用道具 举报

发表于 2012-2-29 14:20:58 | 显示全部楼层
原帖由 zhaohj 于 2012-2-29 13:13 发表
debian版的gcc4.6.2编译出来266459(260kb),哇,小了。
wee的编译再看一下。

wee也用同樣方法處置。
http://code.google.com/p/grubutils/source/detail?r=104
回复

使用道具 举报

 楼主| 发表于 2012-2-29 15:55:55 | 显示全部楼层
svn co http://grubutils.googlecode.com/svn/wee wee
cd wee
make
下载版本是104
编译后wee63.mar大小是34725,超容量了啊?!

[ 本帖最后由 zhaohj 于 2012-2-29 15:57 编辑 ]
回复

使用道具 举报

发表于 2012-2-29 16:12:18 | 显示全部楼层

回复 #2450 roytam1 的帖子

wee应该用grubutils目录下的那个

http://grubutils.googlecode.com/svn/grubutils/wee
回复

使用道具 举报

 楼主| 发表于 2012-2-29 20:51:26 | 显示全部楼层
见鬼了,还是这样

2011-06-27 (tinybit)In grub4dos.h, added API wee_skip_to, added the 2nd argument of "int" for API print_a_completion.
2011-06-26 (tinybit)corrected the return data type of grub_read from 32bit to 64bit to match the defination in grub4dos.h. also updated grub4dos.h.
2011-05-22 (Roy)fix wee127 stage2_size issue. (tinybit)fix find --active issue.
2011-05-21 added asm command and subcommands db/go to write/run machine code.
2011-05-18 added hexdump command. Its shortcut is Delete key leading the line.
2011-05-09 (Roy)packed up a snippet of code to form read_dbr().
2011-05-08 (Roy)supported Dell Real-Mode Kernel(DRMK) and ReactOS freeldr.
2011-05-06 move fat_dir to asm.S.
2011-04-30 move fat_read to asm.S.
2011-04-29 corrected the output message of root command.
2011-04-26 move fat_mount to asm.S.
2011-04-25 Makefile by Roy(-momit-leaf-frame-pointer to -fomit-frame-pointer).
2011-04-23 implemented a simplified map command for only whole-drive mappings.
2011-04-20 added wee127.mbr with the blocklist and map commands built in it.
2011-03-23 excluded NTFS short filenames.
2011-03-22 fixed a bug on case sensitivity in filename completion. added a new parameter "case_insensitive" to print_a_completion().
2011-03-19 fixed a bug on NTFS unicode filename handling. let unicode_to_utf8() return string length after convertion.
2011-03-06 add new find option --active to gain the active primary partition.
2011-03-04 set the current root device as the default boot device of grub.exe.
2011-02-25 fixed endless timeout 0 issue. let checkkey wait a timer interrupt.
2011-02-17 fixed a bug of "0xEA not properly restored" in realmode_run(asm.S).
2011-02-16 fixed a bug on stack checking in realmode_run(asm.S).
2011-02-01 prevent IO.SYS from wiping out int32-int3F.
2011-01-31 realmode .com style program support.
2011-01-14 add comments on how to alter the leading 0xEB for buggy Acer.
2011-01-07 (Roy)supported drbio.sys that is packed with pack101.
------------------------------------------------------------------------
r14 | Roy | 2010-12-26 09:03:13 +0800 (Sun, 26 Dec 2010) | 3 lines
wee-2010-12-25 import.
- makefile patch from http://bbs.znpc.net/viewthread.php?tid=5838&page=16&fromuid=14598#pid46984
- changed prototype of rawread to match Grub4DOS
------------------------------------------------------------------------
r13 | Roy | 2010-12-23 19:07:09 +0800 (Thu, 23 Dec 2010) | 1 line
remove intermediate file.
------------------------------------------------------------------------
r12 | Roy | 2010-12-19 18:37:09 +0800 (Sun, 19 Dec 2010) | 3 lines

[ 本帖最后由 zhaohj 于 2012-2-29 20:53 编辑 ]
Snap1.jpg
回复

使用道具 举报

发表于 2012-2-29 21:08:48 | 显示全部楼层

回复 #2453 zhaohj 的帖子

我在TCL(Tiny Core Linux)下4.6.1编译正常。debian没有试。

你可以先用TCL试试。
回复

使用道具 举报

发表于 2012-2-29 22:50:25 | 显示全部楼层
確定是從 http://grubutils.googlecode.com/svn/grubutils/wee checkout 嗎?
我這邊是正常。

  1. roy@debian:/mnt/f/jatf/grubutils-ext/wee$ make clean
  2. rm -f ./*.o ./wee63start ./pre_stage2
  3. make WEE127=1 clean
  4. make[1]: Entering directory `/mnt/f/jatf/grubutils-ext/wee'
  5. rm -f wee127/*.o wee127/wee63start wee127/pre_stage2
  6. rm -f wee127/wee63.mbr
  7. make[1]: Leaving directory `/mnt/f/jatf/grubutils-ext/wee'
  8. roy@debian:/mnt/f/jatf/grubutils-ext/wee$ make
  9. make: Warning: File `wee63.mbr' has modification time 2.8e+04 s in the future
  10. gcc  -c asm.S -o ./asm.o
  11. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef  -c builtins.c -o ./builtins.o
  12. builtins.c: In function 'map_func':
  13. builtins.c:1210:8: warning: variable 'p' set but not used [-Wunused-but-set-variable]
  14. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef  -c disk_io.c -o ./disk_io.o
  15. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef  -c fsys_ext2fs.c -o ./fsys_ext2fs.o
  16. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef  -c fsys_fat.c -o ./fsys_fat.o
  17. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef  -c fsys_ntfs.c -o ./fsys_ntfs.o
  18. gcc -o pre_stage2 -nostdlib -Wl,-N -Wl,-Ttext -Wl,308200 -Wl,-N  -Wl,--build-id=none ./asm.o ./builtins.o ./disk_io.o ./fsys_ext2fs.o ./fsys_fat.o ./fsys_ntfs.o
  19. objcopy -O binary pre_stage2
  20. echo -n -e "\0260\002\032\0316" >> pre_stage2
  21. gcc  -c wee63start.S -o ./wee63start.o
  22. objcopy -O binary wee63start.o wee63start
  23. rm -f ./wee63.mbr
  24. echo -n -e "\000\000\000\000\000\000\000\000\000\000\000\000" | cat ./wee63start ./pre_stage2 - > ./wee63.mbr
  25. if [ -f ./preset_menu_used ]; then echo -n -e "\000" | cat ./preset_menu_used - >> ./wee63.mbr ;fi
  26. make WEE127=1 BUILDIDUNSUPPORTTED=0 wee127/wee63.mbr
  27. make[1]: Entering directory `/mnt/f/jatf/grubutils-ext/wee'
  28. gcc -DMBRSECTORS127 -c asm.S -o wee127/asm.o
  29. make[1]: Warning: File `builtins.c' has modification time 2.3e+04 s in the future
  30. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef -DMBRSECTORS127 -c builtins.c -o wee127/builtins.o
  31. builtins.c: In function 'map_func':
  32. builtins.c:3381:16: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
  33. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef -DMBRSECTORS127 -c disk_io.c -o wee127/disk_io.o
  34. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef -DMBRSECTORS127 -c fsys_ext2fs.c -o wee127/fsys_ext2fs.o
  35. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef -DMBRSECTORS127 -c fsys_fat.c -o wee127/fsys_fat.o
  36. gcc -Os -fno-stack-protector -fno-builtin -mpreferred-stack-boundary=2 -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -nostdinc -Wall -Wmissing-prototypes -Wunused -Wshadow -Wpointer-arith -Wundef -DMBRSECTORS127 -c fsys_ntfs.c -o wee127/fsys_ntfs.o
  37. gcc -o wee127/pre_stage2 -nostdlib -Wl,-N -Wl,-Ttext -Wl,308200 -Wl,-N  -Wl,--build-id=none wee127/asm.o wee127/builtins.o wee127/disk_io.o wee127/fsys_ext2fs.o wee127/fsys_fat.o wee127/fsys_ntfs.o
  38. objcopy -O binary wee127/pre_stage2
  39. echo -n -e "\0260\002\032\0316" >> wee127/pre_stage2
  40. gcc -DMBRSECTORS127 -c wee63start.S -o wee127/wee63start.o
  41. objcopy -O binary wee127/wee63start.o wee127/wee63start
  42. rm -f wee127/wee63.mbr
  43. echo -n -e "\000\000\000\000\000\000\000\000\000\000\000\000" | cat wee127/wee63start wee127/pre_stage2 - > wee127/wee63.mbr
  44. if [ -f ./preset_menu_used ]; then echo -n -e "\000" | cat ./preset_menu_used - >> wee127/wee63.mbr ;fi
  45. make[1]: warning:  Clock skew detected.  Your build may be incomplete.
  46. make[1]: Leaving directory `/mnt/f/jatf/grubutils-ext/wee'
  47. cp wee127/wee63.mbr wee127.mbr
  48. make: warning:  Clock skew detected.  Your build may be incomplete.
  49. roy@debian:/mnt/f/jatf/grubutils-ext/wee$ ls -l *.mbr
  50. -rwxr-xr-x 1 roy roy 61939 Feb 29 14:51 wee127.mbr*
  51. -rwxr-xr-x 1 roy roy 31835 Feb 29  2012 wee63.mbr*
  52. roy@debian:/mnt/f/jatf/grubutils-ext/wee$ gcc -v
  53. Using built-in specs.
  54. COLLECT_GCC=gcc
  55. COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.6/lto-wrapper
  56. Target: i486-linux-gnu
  57. Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.2-12' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
  58. Thread model: posix
  59. gcc version 4.6.2 (Debian 4.6.2-12)
  60. roy@debian:/mnt/f/jatf/grubutils-ext/wee$ ld --version
  61. GNU ld (GNU Binutils for Debian) 2.22
  62. Copyright 2011 Free Software Foundation, Inc.
  63. This program is free software; you may redistribute it under the terms of
  64. the GNU General Public License version 3 or (at your option) a later version.
  65. This program has absolutely no warranty.
  66. roy@debian:/mnt/f/jatf/grubutils-ext/wee$
复制代码

[ 本帖最后由 roytam1 于 2012-2-29 22:52 编辑 ]
回复

使用道具 举报

 楼主| 发表于 2012-3-1 08:22:25 | 显示全部楼层
v.105 debian版本与tc版本编译相同了,wee.mbr正好是63扇区。
Snap1.jpg
回复

使用道具 举报

发表于 2012-3-1 09:01:03 | 显示全部楼层
请教C大看到http://code.google.com/p/grub4dos-chenall/downloads/list 上面2012-02-27日同时上了grub4dos-0.4.5c和grub4dos-0.4.6a两个版本,里面的更新日志也一样,不知道这两个有什么区别啊?
回复

使用道具 举报

发表于 2012-3-1 09:11:37 | 显示全部楼层
回复

使用道具 举报

发表于 2012-3-1 13:12:18 | 显示全部楼层

回复 #2456 zhaohj 的帖子

这是正常的啊。还没有超过63个扇区。
回复

使用道具 举报

 楼主| 发表于 2012-3-1 13:46:39 | 显示全部楼层
原帖由 chenall 于 2012-3-1 13:12 发表
这是正常的啊。还没有超过63个扇区。


嗯,现在正常了。Roy已经修改过了,debian、tc及其他版本用gcc4.6编译现在都正常了(wee也在规定容量范围)。
回复

使用道具 举报

发表于 2012-3-2 09:57:51 | 显示全部楼层
最新版的编译环境,直接解压,然后在E:创建一个目录E:\colinux,就可以使用 吗?
我怎么下载后,快速启动只一闪就没了。
1.jpg

[ 本帖最后由 mygamexxx 于 2012-3-2 10:01 编辑 ]
回复

使用道具 举报

发表于 2012-3-2 10:53:11 | 显示全部楼层

回复 #2461 mygamexxx 的帖子

你的电脑之前有装过colinux不同的版本吗?要不然就是被杀毒软件之类的阻止了。

可以在用记事本打开快速启动的批处理
在
del %sys%.pid
后面添加一行pause就可以看到出错信息了
回复

使用道具 举报

发表于 2012-3-2 13:36:41 | 显示全部楼层
安装过前一个版本的编译环境。

1.jpg

[ 本帖最后由 mygamexxx 于 2012-3-2 13:41 编辑 ]
回复

使用道具 举报

发表于 2012-3-2 15:38:23 | 显示全部楼层

回复 #2463 mygamexxx 的帖子

可能是很早之前的吧,如果是最近的版本应该都是一样的。

试试这里的解决方法
http://bbs.wuyou.net/forum.php?m ... page=239#pid2381516
回复

使用道具 举报

发表于 2012-3-2 15:45:58 | 显示全部楼层

回复 #2464 chenall 的帖子

是这个问题,问题解决。谢谢。
回复

使用道具 举报

发表于 2012-3-4 23:40:33 | 显示全部楼层
反馈一个关于password命令的问题,请大神帮忙看看:
2009年我学习ubuntu的时候知道了G4D,一直用到现在,password --md5 这个命令也一直在menu.lst里。
这两天我把我的G4D从0.4.4升级到0.4.5c-2012-02-21,又用gfxmenu添加了一个漂亮的背景。但奇怪的是一直黑屏。
1)开始我怀疑是message文件有问题,于是换了好几个,包括正常使用的PE系统里面的message,无效。
2)又怀疑UNIFONT和U16HEI字体文件有问题,但我修改正常使用的PE系统的menu.lst,能显示出我期望的文字。
3)menu.lst文件格式经确认为不带BOM头的UTF-8格式。
4)我甚至怀疑是不是外置菜单没添加判断网启的首行所致……
……
各种排除法实验啊,从昨天晚上到今天晚上。机器重启了无数遍……
最后发现,我把password --md5 *************给注释掉就没事了!
换最新的grldr版本0.4.6a-2012-02-27,依然是这个问题,还得把password注释掉。
请问诸位大神,这个问题是怎么回事?password是按照帮助文件里的介绍写的,用了两年多没出毛病。这是gfxmenu指令跟它有冲突吗?
最后附上我的menu.lst:
terminal console
debug off
# 默认延迟时间(秒)
timeout 5
# 启动项默认值
default 1
# 设置修改密码(问题就在下面一行,必须注释掉)
password --md5 $1$1$YuszzzlcqCXgurFbh6ctK0
# 加载图形界面
gfxmenu ()/GRUB/MESSAGE
()/GRUB/UNIFONT ()/GRUB/U16HEI
# 启动项
title 【1】启动Windows
rootnoverify (hd0,0)
makeactive
chainloader +1
title 【2】启动SkyPE
configfile ()/AXPE/MENU.LST
title 【3】进入任意磁盘根目录下的my.iso
find --set-root /my.iso
map /my.iso (0xff) || map --mem /my.iso (0xff)
map --hook
chainloader (0xff)
#title 【3】启动Ubuntu10.04 RC 光盘
#root (hd0,11)
#kernel /vmlinuz boot=casper noacpi iso-scan/filename=/ubuntu-10.04-desktop-#amd64.iso ro quiet splash
#initrd /initrd.lz
title 【4】启动Ubuntu10.04, kernel 2.6.32-32-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.32-32-generic root=/dev/sda2 ro quiet splash
initrd /boot/initrd.img-2.6.32-32-generic
quiet
title 【5】启动Ubuntu10.04, kernel 2.6.32-32-generic (恢复模式)
root (hd0,1)
kernel /boot/vmlinuz-2.6.32-32-generic root=/dev/sda2 ro quiet single
initrd /boot/initrd.img-2.6.32-32-generic
title 【6】内存检测 memtest86+
root (hd0,1)
kernel /boot/memtest86+.bin
quiet
title 【7】从光盘启动
cdrom --init
map --hook
chainloader (cd0)
boot
title 【8】重新启动
reboot
title 【9】关闭计算机
halt
回复

使用道具 举报

发表于 2012-3-5 16:38:32 | 显示全部楼层

回复 #2466 2011sniper9877 的帖子

又是一个没有看文档就来提问题的。
自己看看
README_GRUB4DOS_CN.txt就明白了。

我对这些不太熟,暂时没有考虑解决这个问题 。
回复

使用道具 举报

发表于 2012-3-5 21:23:24 | 显示全部楼层

回复 #2467 chenall 的帖子

谢谢您的批评。我在文档靠后的位置找到了这个:
“gfxmenu 不能与全局密码保护功能同时使用。”
如果您能考虑一下解决这个问题,广大的G4D使用者会十分感激的。再次感谢!
回复

使用道具 举报

发表于 2012-3-5 22:52:31 | 显示全部楼层

回复 #2468 2011sniper9877 的帖子

没人能做这个工作。如果能做的话,就不会写那句话了。
回复

使用道具 举报

发表于 2012-3-5 22:53:19 | 显示全部楼层

回复 #2468 2011sniper9877 的帖子

哈哈 那就麻烦一点,每个菜单单独设置就是了(可以单独设置相同密码或不同密码)
回复

使用道具 举报

发表于 2012-3-6 12:04:03 | 显示全部楼层
有PE的ISO文件放到exFAT
哪个版本可以搜索得到
更新了最新的启动不了
想换回来已经删除了
最新测试版本不支持exFAT
回复

使用道具 举报

发表于 2012-3-7 18:45:59 | 显示全部楼层

回复 #2470 zhs509 的帖子

谢谢!我单独lock我的菜单吧。
回复

使用道具 举报

发表于 2012-3-8 11:21:57 | 显示全部楼层
原帖由 zlgs 于 2012-3-6 12:04 发表
有PE的ISO文件放到exFAT
哪个版本可以搜索得到
更新了最新的启动不了
想换回来已经删除了
最新测试版本不支持exFAT

已经在C大硬盘工具箱找到
0.45c可用
回复

使用道具 举报

发表于 2012-3-8 12:42:03 | 显示全部楼层

我发现find命令的一个比较诡异的地方。

我发现find命令的一个比较诡异的地方。
假设grub4dos相关文件放在(hd0,4)/boot/grub目录下,test.bat、test2.bat放在(hd0,5)/boot/grub目录下,当root目录不是某分区的根目录时,例如%@root%==(hd0,4)/boot时,命令find /boot/grub/test.bat 执行会失败。
下面是test.bat的内容:
  1. !BAT
  2. clear
  3. font
  4. font (bd)/BOOT/GRUB/UNIFONT.HEX

  5. root (bd)/boot && echo -e 当前工作目录是%@root%\n

  6. echo -e 将要执行下列命令:\n"find /boot/grub/test.bat"
  7. find /boot/grub/test.bat && echo -e 找到了test.bat\n ! echo -e
  8. 未找到test.bat\n
  9. pause --wait=3
复制代码

结果是找不到test.bat。
下面是test2.bat的内容:
  1. !BAT
  2. clear
  3. font
  4. font (bd)/BOOT/GRUB/UNIFONT.HEX

  5. root (bd)/boot && echo -e 当前工作目录是%@root%\n

  6. echo -e 将要执行下列命令:\n"find /grub/test.bat"
  7. find /grub/test.bat && echo -e 找到了test.bat\n ! echo -e
  8. 未找到test.bat\n
  9. pause --wait=3

  10. echo -e 将要执行下列命令:\n"root (bd) && find /boot/grub/test.bat"
  11. root (bd) && find /boot/grub/test.bat && echo -e
  12. 找到了test.bat\n ! echo -e 未找到test.bat\n
  13. pause --wait=3
复制代码

此时可以找到test.bat。
结论:当%@root%==%work_device%/%work_path%时,命令find FILENAME的含义是:在在所有分区的%work_path%目录下查找FILENAME。在本例中,%work_device%==(hd0,4),%work_path%==/boot,FILENAME=/grub/test.bat,即在在所有分区的/boot目录下查找grub子目录下的test.bat文件。
避开这个问题的一个办法:在使用find命令前先执行root (bd)命令,以保证find命令按照我们的本来的逻辑运行。
回复

使用道具 举报

发表于 2012-3-8 15:19:32 | 显示全部楼层

回复 #2474 dihuo0 的帖子

这个是正常的

root不是根目录 而是(hd0,4)/boot/的时候  执行find /boot/grub/test.bat

实际上将查找 /boot/boot/grub/test.bat 文件  如果没有的话肯定会提示找不到
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|捐助支持|无忧启动 ( 闽ICP备05002490号-1|闽公网安备35020302032614号 )

GMT+8, 2026-11-23 00:15

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表