请教大家个问题,关于GRUB启动加入图片的

2 views
Skip to first unread message

Elvis

unread,
Dec 16, 2009, 6:20:20 AM12/16/09
to ubuntu-cn, ubuntu-zh mailing lists
我得硬盘是串口320G得,图片放在/boot/grub/下,/boot,/,/home,/swap单独分区,显示的是/boot 挂载得是/dev/sda11,我按照GRUB 的教程都设好了,可是还是无法启动显示图片,请大家帮我解决问题,谢谢了!下面是我修改后的文件参数
 /etc/default/grub得参数如下:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768

#Uncomment if you don't want GRUB to pass "root=/dev/sdax" parameter to Linux
GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
#GRUB_DISABLE_LINUX_RECOVERY="true"


 /etc/grub.d/00_header参数如下:

#! /bin/sh -e

# grub-mkconfig helper script.
# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
#
# GRUB is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# GRUB is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GRUB.  If not, see <http://www.gnu.org/licenses/>.

transform="s,x,x,"

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
grub_prefix=`echo /boot/grub | sed ${transform}`

. ${libdir}/grub/grub-mkconfig_lib

# Do this as early as possible, since other commands might depend on it.
# (e.g. the `loadfont' command might need lvm or raid modules)
for i in ${GRUB_PRELOAD_MODULES} ; do
  echo "insmod $i"
done

if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 ; fi
if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi
if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi
if [ "x${GRUB_GFXMODE}" = "x" ] ; then GRUB_GFXMODE=640x480 ; fi

cat << EOF
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="${GRUB_DEFAULT}"
if [ \${prev_saved_entry} ]; then
  saved_entry=\${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod jpeg
EOF

case ${GRUB_TERMINAL_INPUT}:${GRUB_TERMINAL_OUTPUT} in
  serial:* | *:serial)
    if ! test -e ${grub_prefix}/serial.mod ; then
      echo "Serial terminal not available on this platform." >&2 ; exit 1
    fi

    if [ "x${GRUB_SERIAL_COMMAND}" = "x" ] ; then
      grub_warn "Requested serial terminal but GRUB_SERIAL_COMMAND is unspecified. Default parameters will be used."
      GRUB_SERIAL_COMMAND=serial
    fi
    echo "${GRUB_SERIAL_COMMAND}"
  ;;
esac

case x${GRUB_TERMINAL_INPUT} in
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_input
  terminal ${GRUB_TERMINAL_INPUT}
fi
EOF
  ;;
esac

case x${GRUB_TERMINAL_OUTPUT} in
 xgfxterm)
    # Make the font accessible
    prepare_grub_to_access_device `${grub_probe} --target=device ${GRUB_FONT_PATH}`

    cat << EOF
if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
  set gfxmode=${GRUB_GFXMODE}
  insmod gfxterm
  insmod ${GRUB_VIDEO_BACKEND}
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
EOF
  ;;
  x)
    # Just use the native terminal
  ;;
  x*)
    cat << EOF
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
  # For backward compatibility with versions of terminal.mod that don't
  # understand terminal_output
  terminal ${GRUB_TERMINAL_OUTPUT}
fi
EOF
  ;;
esac

cat << EOF
if [ \${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=${GRUB_TIMEOUT}
fi
background_image (hd0,11)/boot/grub/007.jpg
EOF


请高手看看我得哪些参数需要修改,是不是hd(0,x)不对,我不清楚是多少?再次感谢!!



--
Elvis

SongWeiZhi

unread,
Dec 16, 2009, 8:43:27 AM12/16/09
to ubun...@googlegroups.com
boot单独分区的话,是不是应该background_image (hd0,11)/grub/007.jpg
这样呢?
btw:从来不认为boot单独分区有啥好处,桌面的话

2009/12/16 Elvis <skybl...@gmail.com>

--

您收到此邮件是因为您订阅了 Google 网上论坛的“Ubuntu China”论坛。
要向此网上论坛发帖,请发送电子邮件至 ubun...@googlegroups.com
要取消订阅此网上论坛,请发送电子邮件至 ubuntu-cn+...@googlegroups.com
若有更多问题,请通过 http://groups.google.com/group/ubuntu-cn?hl=zh-CN 访问此网上论坛。

小武

unread,
Dec 16, 2009, 9:08:38 AM12/16/09
to ubun...@googlegroups.com
(hd0,0)=/dev/sda1.
sda11应该是(hd0,10)


.Wu


2009/12/16 SongWeiZhi <yafe...@gmail.com>

Elvis

unread,
Dec 16, 2009, 6:35:30 PM12/16/09
to ubun...@googlegroups.com
我改成(hd0,11)就对了。谢谢大家

2009/12/16 小武 <hnt...@gmail.com>



--
Elvis

陆铠

unread,
Dec 16, 2009, 8:15:23 PM12/16/09
to ubun...@googlegroups.com
话说……google groups被墙了?怎么不用代理就上不了啊

2009/12/16, SongWeiZhi <yafe...@gmail.com>:

>> ubuntu-cn+...@googlegroups.com<ubuntu-cn%2Bunsu...@googlegroups.com>


>> 。
>> 若有更多问题,请通过 http://groups.google.com/group/ubuntu-cn?hl=zh-CN 访问此网上论坛。
>>
>
> --
>
> 您收到此邮件是因为您订阅了 Google 网上论坛的“Ubuntu China”论坛。
> 要向此网上论坛发帖,请发送电子邮件至 ubun...@googlegroups.com
> 要取消订阅此网上论坛,请发送电子邮件至 ubuntu-cn+...@googlegroups.com
> 若有更多问题,请通过 http://groups.google.com/group/ubuntu-cn?hl=zh-CN 访问此网上论坛。
>
>
>

--
从我的移动设备发送

K.K.

unread,
Dec 16, 2009, 10:46:05 PM12/16/09
to Ubuntu China
通过https,不用代理也可以访问。

On 12月17日, 上午9时15分, 陆铠 <spoo...@gmail.com> wrote:
> 话说......google groups被墙了?怎么不用代理就上不了啊
>
> 2009/12/16, SongWeiZhi <yafeng...@gmail.com>:


>
>
>
>
>
> > boot单独分区的话,是不是应该background_image (hd0,11)/grub/007.jpg
> > 这样呢?
> > btw:从来不认为boot单独分区有啥好处,桌面的话
>

> > 2009/12/16 Elvis <skyblue...@gmail.com>

> >> ubuntu-cn+...@googlegroups.com<ubuntu-cn%2Bunsubscribe@googlegroups .com>
> >> 。
> >> 若有更多问题,请通过http://groups.google.com/group/ubuntu-cn?hl=zh-CN访问此网上论坛。

陆铠

unread,
Dec 17, 2009, 1:25:37 AM12/17/09
to ubun...@googlegroups.com
是把网址前的http://改为https://吗?

2009/12/17, K.K. <cok...@gmail.com>:

Reply all
Reply to author
Forward
0 new messages