系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
头像
doctorlzr1988
帖子: 184
注册时间: 2009-09-11 15:31

系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#1

帖子 doctorlzr1988 » 2009-11-05 13:04

在论坛里搜索、用过很多人的方法就是不能进去root,总是在输入密码认证那里挂了!!说认证失败!但是我记得安装时没有设过root的密码!! :em20 :em20 :em20

grub1.97beta4 的默认时间 timeout 10 让人光火阿
真不想用 grub4dos 跳转到 grub2 ,多一个步骤开机时间就长很多,但是c:\boot.mbr="grub2"又不成功!!真是烦阿!!
上次由 doctorlzr1988 在 2009-11-05 13:51,总共编辑 2 次。
头像
peakgg
帖子: 1122
注册时间: 2006-10-10 9:40

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行

#2

帖子 peakgg » 2009-11-05 13:17

安装时确实没有设定过root密码 因此你需要到 系统管理-用户和组 那里手动设置你的root用户密码 或者在命令行下输入

代码: 全选

 sudo passwd root
设置
billbear
帖子: 3681
注册时间: 2008-05-03 23:42

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行

#3

帖子 billbear » 2009-11-05 13:35

sudo -i
用你自己的密码
头像
daf3707
论坛版主
帖子: 12731
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行

#4

帖子 daf3707 » 2009-11-05 13:40

默认无写权限。加上便可

代码: 全选

sudo chmod +w /boot/grub/grub.cfg
头像
doctorlzr1988
帖子: 184
注册时间: 2009-09-11 15:31

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行

#5

帖子 doctorlzr1988 » 2009-11-05 13:49

谢谢拉,!!! :em05 :em05
但是我怎么就没有找到你们的方法呢???
头像
doctorlzr1988
帖子: 184
注册时间: 2009-09-11 15:31

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行

#6

帖子 doctorlzr1988 » 2009-11-05 13:53

daf3707 写了:默认无写权限。加上便可

代码: 全选

sudo chmod +w /boot/grub/grub.cfg


这个好像没反应哟!!看图
附件
Screenshot-1.png
头像
daf3707
论坛版主
帖子: 12731
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行

#7

帖子 daf3707 » 2009-11-05 13:56

doctorlzr1988 写了:
daf3707 写了:默认无写权限。加上便可

代码: 全选

sudo chmod +w /boot/grub/grub.cfg
这个好像没反应哟!!看图
没反应就对了,可以编辑了
头像
doctorlzr1988
帖子: 184
注册时间: 2009-09-11 15:31

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#8

帖子 doctorlzr1988 » 2009-11-05 14:16

接着你的去做
sudo gedit /boot/grub/grub.cfg
他说不属于我的权限阿!!
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#9

帖子 smallapple » 2009-11-05 14:21

看非要写这个干嘛?
看我的签名档,不用动这个东东。
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#10

帖子 leeaman » 2009-11-05 15:11

smallapple 写了:看非要写这个干嘛?
看我的签名档,不用动这个东东。
绝对要看smallapple的帖子,改grub.cfg不是什么好主意,一更新就完了,改别的配置文件可以一劳永逸的
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
头像
spectater
帖子: 665
注册时间: 2008-02-03 18:53

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#11

帖子 spectater » 2009-11-05 15:13

leeaman 写了:
smallapple 写了:看非要写这个干嘛?
看我的签名档,不用动这个东东。
绝对要看smallapple的帖子,改grub.cfg不是什么好主意,一更新就完了,改别的配置文件可以一劳永逸的

smallapple的帖子一定要先看
头像
doctorlzr1988
帖子: 184
注册时间: 2009-09-11 15:31

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#12

帖子 doctorlzr1988 » 2009-11-05 16:26

:em06 apple来了反倒要问一问呢!!
:em09是得要改这个东东,但是我想学学用 gedit 和 vim 命令修改一下文本而已
:em03 另外,我看不明白苹果你的grub2教程的某些部分。例如是修改部分,说明解释倒是很清楚了 :em11 !!!
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#13

帖子 smallapple » 2009-11-05 16:38

具体哪些看不懂的,讲一讲,看看需要修改不 :em09
头像
doctorlzr1988
帖子: 184
注册时间: 2009-09-11 15:31

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#14

帖子 doctorlzr1988 » 2009-11-05 19:13

#! /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
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
EOF



这个是00_header的内容,我有些要修改的地方找不到,估计是从新写过吧!!要apple你再读读了。另外就是为什么你的有数字分行的(说明文档)???
如 1
2
3
~~~~~~
104
这类的!!可以教教我吗??
头像
smallapple
论坛版主
帖子: 7868
注册时间: 2009-03-28 15:12

Re: 系统就是不认劳资的帐!想用root修改grub.cfg都不行[已解决]

#15

帖子 smallapple » 2009-11-05 19:39

另外就是为什么你的有数字分行的(说明文档)???
gedit 首选项有个显示行号的,勾上就有了。 :em04

至于要修改的地方,掌握一个原则,先找到 cat <<EOF 然后到 EOF 中间就是可以修改的地方。
不知道你想修改什么东西?
你这个版本好象比较新,你看看我的google 文档,里有更新,可能较接近。
回复