无忧启动论坛

 找回密码
 注册
搜索
系统gho:最纯净好用系统下载站投放广告、加入VIP会员,请联系 微信:wuyouceo
查看: 3761|回复: 2
打印 上一主题 下一主题

[求助] 初次编译GRUB,出错了,求指导

[复制链接]
跳转到指定楼层
1#
发表于 2016-5-31 08:08:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-gunzip.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-hercules.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-md5.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-serial.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-stage2.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-terminfo.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-tparm.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-graphics.o
O binary pre_stage2.exec pre_stage2
/bin/bash: O: 未找到命令
make[3]: [pre_stage2] 错误 127 (忽略)
if [ pre_stage2 = pre_stage2 ]; then dd if=pre_stage2 of=pre_stage2_fullsize bs=65536 skip=48 2>/dev/null || echo "DD failed!" ;fi
DD failed!
if [ pre_stage2 = pre_stage2 ]; then sed -e "1s/^\x00*//" pre_stage2_fullsize > pre_stage2_tail ;fi
sed: 无法读取 pre_stage2_fullsize: 没有那个文件或目录
make[3]: *** [pre_stage2] 错误 2
make[3]:正在离开目录 `/tmp/grub4dos-temp/stage2'
make[2]: *** [all-recursive] 错误 1
make[2]:正在离开目录 `/tmp/grub4dos-temp'
make[1]: *** [all] 错误 2
make[1]:正在离开目录 `/tmp/grub4dos-temp'
make: *** [build_default] 错误 2
root@jason-virtual-machine:/home/jason/grub4dos#
2#
发表于 2016-11-12 14:01:35 | 只看该作者
ubuntu@ubuntu:~/Desktop/grub4dos-046a$ ll
总用量 1344
drwxrwxr-x 3 ubuntu ubuntu    860 11月  5 01:44 ./
drwxr-xr-x 3 ubuntu ubuntu    120 11月 12 13:33 ../
-rw-rw-r-- 1 ubuntu ubuntu  10585 11月  5 01:44 acinclude.m4
-rw-rw-r-- 1 ubuntu ubuntu  44373 11月  5 01:44 aclocal.m4
-rw-rw-r-- 1 ubuntu ubuntu   2056 11月  5 01:44 AUTHORS
-rwxr-xr-x 1 ubuntu ubuntu    157 11月  5 01:44 autogen.sh*
-rwxr-xr-x 1 ubuntu ubuntu    120 11月  5 01:44 bootstrap.sh*
-rw-rw-r-- 1 ubuntu ubuntu    182 11月  5 01:44 BUGS
-rwxr-xr-x 1 ubuntu ubuntu   4582 11月  5 01:44 build*
-rw-rw-r-- 1 ubuntu ubuntu 333731 11月  5 01:44 ChangeLog
-rw-rw-r-- 1 ubuntu ubuntu  39044 11月  5 01:44 ChangeLog_chenall.txt
-rw-rw-r-- 1 ubuntu ubuntu  40930 11月  5 01:44 ChangeLog_GRUB4DOS.txt
-rwxr-xr-x 1 ubuntu ubuntu   3695 11月  5 01:44 compile*
-rwxr-xr-x 1 ubuntu ubuntu  43458 11月  5 01:44 config.guess*
-rw-rw-r-- 1 ubuntu ubuntu   2490 11月  5 01:44 config.h.in
-rwxr-xr-x 1 ubuntu ubuntu  31483 11月  5 01:44 config.sub*
-rw-rw-r-- 1 ubuntu ubuntu    933 11月  5 01:44 config.sys
-rwxr-xr-x 1 ubuntu ubuntu 247715 11月  5 01:44 configure*
-rw-rw-r-- 1 ubuntu ubuntu  14126 11月  5 01:44 configure.ac
-rw-rw-r-- 1 ubuntu ubuntu  17989 11月  5 01:44 COPYING
-rw-rw-r-- 1 ubuntu ubuntu   2048 11月  5 01:44 default
-rwxr-xr-x 1 ubuntu ubuntu  15205 11月  5 01:44 depcomp*
-rw-rw-r-- 1 ubuntu ubuntu     75 11月  5 01:44 GNUmakefile
-rw-rw-r-- 1 ubuntu ubuntu      7 11月  5 01:44 grub4dos_version
-rw-rw-r-- 1 ubuntu ubuntu    967 11月  5 01:44 grub.pif
-rw-rw-r-- 1 ubuntu ubuntu   9789 11月  5 01:44 INSTALL
-rwxr-xr-x 1 ubuntu ubuntu   9231 11月  5 01:44 install-sh*
-rw-rw-r-- 1 ubuntu ubuntu    276 11月  5 01:44 ipxegrldr.ipxe
-rw-rw-r-- 1 ubuntu ubuntu    666 11月  5 01:44 ldscript
-rw-rw-r-- 1 ubuntu ubuntu   2850 11月  5 01:44 MAINTENANCE
-rw-rw-r-- 1 ubuntu ubuntu    198 11月  5 01:44 Makefile.am
-rw-rw-r-- 1 ubuntu ubuntu  24949 11月  5 01:44 Makefile.in
-rw-rw-r-- 1 ubuntu ubuntu   4617 11月  5 01:44 menu.lst
-rwxr-xr-x 1 ubuntu ubuntu  10587 11月  5 01:44 missing*
-rwxr-xr-x 1 ubuntu ubuntu   3421 11月  5 01:44 mkinstalldirs*
-rw-rw-r-- 1 ubuntu ubuntu  26706 11月  5 01:44 NEWS
-rw-rw-r-- 1 ubuntu ubuntu    732 11月  5 01:44 preset_menu.lst
-rw-rw-r-- 1 ubuntu ubuntu   1057 11月  5 01:44 README
-rw-rw-r-- 1 ubuntu ubuntu 167768 11月  5 01:44 README_GRUB4DOS_CN.txt
-rw-rw-r-- 1 ubuntu ubuntu 153319 11月  5 01:44 README_GRUB4DOS.txt
drwxrwxr-x 2 ubuntu ubuntu   1460 11月  5 01:44 stage2/
-rw-rw-r-- 1 ubuntu ubuntu   4751 11月  5 01:44 THANKS
-rw-rw-r-- 1 ubuntu ubuntu   3536 11月  5 01:44 TODO
ubuntu@ubuntu:~/Desktop/grub4dos-046a$


ubuntu@ubuntu:~/Desktop/grub4dos-046a$ ./build
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/tmp/grub4dos-temp/missing: Unknown `--is-lightweight' option
Try `/tmp/grub4dos-temp/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking dependency style of gcc... gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... (cached) gcc
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking dependency style of gcc... (cached) gcc3
checking for ranlib... ranlib
checking whether optimization for size works... yes
checking whether gcc has -fno-stack-protector... yes
checking whether gcc has -fno-reorder-functions... yes
checking whether -Wundef works... yes
checking whether -falign-loops works... yes
checking whether linker accepts `--build-id=none'... yes
checking for objcopy... objcopy
checking if C symbols get an underscore after compilation... no
checking whether objcopy works for absolute addresses... yes
checking whether addr32 must be in the same line as the instruction... yes
checking for .code16 addr32 assembler support... yes
checking whether an absolute indirect call/jump must not be prefixed with an asterisk... no
checking if start is defined by the compiler... no
checking if _start is defined by the compiler... yes
checking if __bss_start is defined by the compiler... yes
checking if _edata is defined by the compiler... yes
checking if edata is defined by the compiler... yes
checking if end is defined by the compiler... yes
checking if _end is defined by the compiler... yes
checking for opendisk in -lutil... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating stage2/Makefile
config.status: creating config.h
config.status: executing depfiles commands
Making clean in stage2
make[1]: 正在进入目录 `/tmp/grub4dos-temp/stage2'
test -z "grub.exe badgrub.exe grldr grldr.mbr bootlace.com hmload.com eltorito.sys pre_stage2 dosstart badgrubstart grldrstart mbrstart bootlacestart hmloadstart pre_stage2_fullsize pre_stage2_head pre_stage2_tail " || rm -f grub.exe badgrub.exe grldr grldr.mbr bootlace.com hmload.com eltorito.sys pre_stage2 dosstart badgrubstart grldrstart mbrstart bootlacestart hmloadstart pre_stage2_fullsize pre_stage2_head pre_stage2_tail
test -z "pre_stage2.exec dosstart.exec badgrubstart.exec grldrstart.exec mbrstart.exec bootlacestart.exec hmloadstart.exec" || rm -f pre_stage2.exec dosstart.exec badgrubstart.exec grldrstart.exec mbrstart.exec bootlacestart.exec hmloadstart.exec
rm -f *.o
test -z "pre_stage2.exec dosstart.exec badgrubstart.exec grldrstart.exec mbrstart.exec bootlacestart.exec hmloadstart.exec" || rm -f pre_stage2.exec dosstart.exec badgrubstart.exec grldrstart.exec mbrstart.exec bootlacestart.exec hmloadstart.exec
test -z "" || rm -f
test -z "" || rm -f
test -z "test-suite.log" || rm -f test-suite.log
make[1]:正在离开目录 `/tmp/grub4dos-temp/stage2'
make[1]: 正在进入目录 `/tmp/grub4dos-temp'
make[1]: 没有什么可以做的为 `clean-am'。
make[1]:正在离开目录 `/tmp/grub4dos-temp'
make  all-recursive
make[1]: 正在进入目录 `/tmp/grub4dos-temp'
Making all in stage2
make[2]: 正在进入目录 `/tmp/grub4dos-temp/stage2'
  CPPAS    pre_stage2_exec-asm.o
  CC       pre_stage2_exec-bios.o
  CC       pre_stage2_exec-boot.o
  CC       pre_stage2_exec-builtins.o
  CC       pre_stage2_exec-char_io.o
  CC       pre_stage2_exec-cmdline.o
  CC       pre_stage2_exec-common.o
  CC       pre_stage2_exec-console.o
  CC       pre_stage2_exec-dec_lz4.o
  CC       pre_stage2_exec-dec_lzma.o
  CC       pre_stage2_exec-dec_vhd.o
dec_vhd.c: In function ‘dec_vhd_open’:
dec_vhd.c:185:6: warning: variable ‘bytesread’ set but not used [-Wunused-but-set-variable]
  int bytesread = (int)grub_read((unsigned long)&footer, 0x200, 0xedde0d90);
      ^
  CC       pre_stage2_exec-disk_io.o
  CC       pre_stage2_exec-fsys_ext2fs.o
  CC       pre_stage2_exec-fsys_fat.o
  CC       pre_stage2_exec-fsys_ntfs.o
  CC       pre_stage2_exec-fsys_ffs.o
  CC       pre_stage2_exec-fsys_iso9660.o
  CC       pre_stage2_exec-fsys_jfs.o
  CC       pre_stage2_exec-fsys_minix.o
  CC       pre_stage2_exec-fsys_reiserfs.o
  CC       pre_stage2_exec-fsys_ufs2.o
  CC       pre_stage2_exec-fsys_vstafs.o
  CC       pre_stage2_exec-fsys_xfs.o
  CC       pre_stage2_exec-fsys_pxe.o
  CC       pre_stage2_exec-fsys_initrd.o
  CC       pre_stage2_exec-fsys_ipxe.o
  CC       pre_stage2_exec-fsys_fb.o
  CC       pre_stage2_exec-gunzip.o
  CC       pre_stage2_exec-hercules.o
  CC       pre_stage2_exec-md5.o
  CC       pre_stage2_exec-serial.o
  CC       pre_stage2_exec-stage2.o
  CC       pre_stage2_exec-terminfo.o
  CC       pre_stage2_exec-tparm.o
  CC       pre_stage2_exec-graphics.o
  CCLD     pre_stage2.exec
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-bios.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-boot.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-builtins.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-char_io.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-cmdline.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-common.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-console.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-dec_lz4.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-dec_lzma.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-dec_vhd.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-disk_io.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_ext2fs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_fat.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_ntfs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_ffs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_iso9660.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_jfs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_minix.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_reiserfs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_ufs2.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_vstafs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_xfs.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_pxe.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_initrd.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_ipxe.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-fsys_fb.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-gunzip.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-hercules.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-md5.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-serial.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-stage2.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-terminfo.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-tparm.o
/usr/bin/ld: Warning: alignment 1 of symbol `grub_putchar' in pre_stage2_exec-asm.o is smaller than 4 in pre_stage2_exec-graphics.o
  OBJ    pre_stage2
  CPPAS    dosstart_exec-dosstart.o
  CCLD     dosstart.exec
  CPPAS    badgrubstart_exec-badgrubstart.o
  CCLD     badgrubstart.exec
  CPPAS    grldrstart_exec-grldrstart.o
  CCLD     grldrstart.exec
  CPPAS    mbrstart_exec-mbrstart.o
  CCLD     mbrstart.exec
  CPPAS    bootlacestart_exec-bootlacestart.o
  CCLD     bootlacestart.exec
  CPPAS    hmloadstart_exec-hmloadstart.o
  CCLD     hmloadstart.exec
  OBJ    dosstart
  GEN      grub.exe
  OBJ    badgrubstart
  GEN      badgrub.exe
  OBJ    grldrstart
  GEN      grldr
  OBJ    mbrstart
  GEN      grldr.mbr
  OBJ    bootlacestart
  GEN      bootlace.com
记录了10+0 的读入
记录了10+0 的写出
5120字节(5.1 kB)已复制,0.000205003 秒,25.0 MB/秒
记录了1+0 的读入
记录了1+0 的写出
512字节(512 B)已复制,0.000178334 秒,2.9 MB/秒
  OBJ    hmloadstart
  GEN      hmload.com
/bin/bash: nasm: 未找到命令
Failed in building eltorito.sys!
/bin/bash: upx: 未找到命令
/bin/bash: upx: 未找到命令
upx command not found!
make[2]:正在离开目录 `/tmp/grub4dos-temp/stage2'
make[2]: 正在进入目录 `/tmp/grub4dos-temp'
make[2]:正在离开目录 `/tmp/grub4dos-temp'
make[1]:正在离开目录 `/tmp/grub4dos-temp'
记录了64+0 的读入
记录了64+0 的写出
64字节(64 B)已复制,0.000352029 秒,182 kB/秒
记录了42944+0 的读入
记录了42944+0 的写出
42944字节(43 kB)已复制,0.0418801 秒,1.0 MB/秒
./build: 126: ./build: 7z: not found
7z failed. Continue with zip or tar...
ubuntu@ubuntu:~/Desktop/grub4dos-046a$


ubuntu@ubuntu:~/Desktop/grub4dos-046a$ ll grub4dos-0.4.6a*.zip
-rw-rw-r-- 1 ubuntu ubuntu 746302 11月 12 13:35 grub4dos-0.4.6a-2016-11-12.zip
ubuntu@ubuntu:~/Desktop/grub4dos-046a$



回复

使用道具 举报

3#
发表于 2016-11-12 19:16:50 | 只看该作者
所用的警告(Warning)在要求不高的情况下的都可以忽略,只注意错误(error)就行了.

缺少nasm,upx,7z,分别安装这几个软件即可。

nasm:http://blog.csdn.net/liangxanhai/article/details/8521937
upx:https://launchpad.net/ubuntu/zesty/+package/upx-ucl
7z: 终端中输入sudo  apt-get install p7zip-full



回复

使用道具 举报

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

本版积分规则

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

闽公网安备 35020302032614号

GMT+8, 2024-11-30 13:40

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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