关于GRUB的疑问

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

关于GRUB的疑问

#1

帖子 jinjiachen » 2014-08-08 12:38

为什么debian下的GRUB会检测到其它系统,而arch下的GRUB安装完后只有arch,没有发现其它系统?
注:我的电脑里有WIN7,debian,arch
头像
daf3707
论坛版主
帖子: 12739
注册时间: 2007-06-13 15:57
来自: 在他乡

Re: 关于GRUB的疑问

#2

帖子 daf3707 » 2014-08-08 12:43

安装os-prober就有了
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于GRUB的疑问

#3

帖子 poloshiao » 2014-08-08 12:48

debian下的GRUB会检测到其它系统
debian :
sudo ls -al /etc/grub.d | grep 30_os-prober
看看 有沒有這個檔案
arch下的GRUB安装完后只有arch
arch :
sudo ls -al /etc/grub.d | grep 30_os-prober
看看 有沒有這個檔案
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#4

帖子 jinjiachen » 2014-08-08 14:33

poloshiao 写了:
debian下的GRUB会检测到其它系统
debian :
sudo ls -al /etc/grub.d | grep 30_os-prober
看看 有沒有這個檔案
arch下的GRUB安装完后只有arch
arch :
sudo ls -al /etc/grub.d | grep 30_os-prober
看看 有沒有這個檔案
嗯嗯 回家看看,你这么一说,我有个疑问,我的电脑里有win7,debian6.0 arch这三个系统嘛,在debian下有grub,在arch下有grub,那不是有两个grub了吗?而grub我是安装的MBR上的,那不是应该只有一个引导吗?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于GRUB的疑问

#5

帖子 poloshiao » 2014-08-08 14:49

在debian下有grub,在arch下有grub,那不是有两个grub了吗?而grub我是安装的MBR上的,那不是应该只有一个引导吗?
每次執行 sudo grub-install /dev/sdk # /dev/sdk 最優先開機硬盤
就會覆蓋掉以前安裝在 /dev/sdk 的 grub
所以 目前在 /dev/sdk 的 grub 就是來自 你最近執行
sudo grub-install /dev/sdk
所在的作業系統

補充
每顆硬盤 都有一個 唯一的 MBR 可以安裝 grub
所以 不同的硬盤上面的 MBR 的 Grub
可以來自 不同的作業系統
但是 同一顆硬盤 只有一個 MBR 可以安裝一個 grub
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#6

帖子 jinjiachen » 2014-08-08 16:33

poloshiao 写了:
在debian下有grub,在arch下有grub,那不是有两个grub了吗?而grub我是安装的MBR上的,那不是应该只有一个引导吗?
每次執行 sudo grub-install /dev/sdk # /dev/sdk 最優先開機硬盤
就會覆蓋掉以前安裝在 /dev/sdk 的 grub
所以 目前在 /dev/sdk 的 grub 就是來自 你最近執行
sudo grub-install /dev/sdk
所在的作業系統

補充
每顆硬盤 都有一個 唯一的 MBR 可以安裝 grub
所以 不同的硬盤上面的 MBR 的 Grub
可以來自 不同的作業系統
但是 同一顆硬盤 只有一個 MBR 可以安裝一個 grub
嗯嗯 明白了,debian的GRUB界面要漂亮很多,arch的一片黑。。。不过普通的PNG好像不能当作GRUB背景,要是可以就好了~~
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于GRUB的疑问

#7

帖子 poloshiao » 2014-08-08 18:07

不过普通的PNG好像不能当作GRUB背景
grub 2 部份
Arch 跟 Ubuntu 差距不大
參閱
https://help.ubuntu.com/community/Grub2 ... ound_Image
GRUB 2 can use PNG, JPG/JPEG and TGA images for the background.
The image must meet the following specifications:
...
https://wiki.archlinux.org/index.php/GR ... tmap_fonts
Image formats supported include tga, png and jpeg, providing the correct modules are loaded.
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#8

帖子 jinjiachen » 2014-08-08 19:26

poloshiao 写了:
不过普通的PNG好像不能当作GRUB背景
arch 跟 Ubuntu 差距不大
參閱
https://help.ubuntu.com/community/Grub2 ... ound_Image
GRUB 2 can use PNG, JPG/JPEG and TGA images for the background.
The image must meet the following specifications:
...
嗯嗯 能请教个其它问题不
我安装了arch的基础系统 现在想安装图形界面,命令如下
pacman-S xorg
pacman -S openbox
然后startx想启动试试 提示没此命令
我想那就登录管理器吧 于是
pacman-S slim
然后输入slim 屏幕一闪卡住了 不知道如何能进入图形界面
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于GRUB的疑问

#9

帖子 poloshiao » 2014-08-08 19:28

jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#10

帖子 jinjiachen » 2014-08-08 19:50

这个我看过 首先没有startx这个命令 其次无xinitrc这个配置文件 只有xinit.d这个文件夹
还有就是也没有~/.xinitrc这文件
是不是wiki过时了?所以我没有头绪了
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于GRUB的疑问

#11

帖子 poloshiao » 2014-08-08 20:39

https://wiki.archlinux.org/index.php/op ... vironments
檢查一下
你的 arch 是否預設什麼 桌面環境 ?
如果你不確定 請提供 arch 版本
或你下載的 ISO 全名
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#12

帖子 jinjiachen » 2014-08-08 22:42

poloshiao 写了:https://wiki.archlinux.org/index.php/op ... vironments
檢查一下
你的 arch 是否預設什麼 桌面環境 ?
如果你不確定 請提供 arch 版本
或你下載的 ISO 全名
thank you for your help along the way!
i have entered the openbox environment now. Through the command below:

代码: 全选

echo 'exec openbox-session' >>~/.bash_profile


but i have the new problem now! maybe you have realize it!!
1.i can't type the chinese now, i have install the 'fcitx', i haven't find the wubi, and i install sunpinyin by

代码: 全选

pacman -S fcitx fcitx-sunpinyin

then i find sunpinyin in the fcitx table. but i still can't type chinese. can you help me ?
2.the sound
i have install the alsa by

代码: 全选

pacman -S alsa-utils
there is no sound yet.
3.i want to install chrome, not chromium ,but google is banned these days, and i found there is no chrome for arch on the offical website. am I right? how can i install chrome? compile in the only way? i'm new to arch
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 关于GRUB的疑问

#13

帖子 poloshiao » 2014-08-09 5:09

echo 'exec openbox-session' >>~/.bash_profile
要使用 startx
試試
echo 'exec openbox-session' >> ~/.xinitrc

1. https://wiki.archlinux.org/index.php/openbox#Standalone
In either instance, it will be necessary to modify the Xinitrc file in order to add the following command:
exec openbox-session
2. https://wiki.archlinux.org/index.php/Xinitrc
The ~/.xinitrc file is a shell script read by xinit and by its front-end startx.
i haven't find the wubi
試試 安裝 fcitx-table-extra
3. viewtopic.php?t=447732
官方仓库提供的 fcitx 输入法引擎有
拼音输入法:fcitx-cloudpinyin fcitx-googlepinyin fcitx-libpinyin fcitx-sunpinyin
五笔、郑码输入法:fcitx-table-extra
4. https://www.archlinux.org/packages/comm ... tra/files/
usr/share/fcitx/table/wubi-large.conf
usr/share/fcitx/table/wubi-large.mb
5. Arch Linux 安装 有問題 可以參考這一篇
viewtopic.php?t=447732
Arch Linux 安装指南(ArchISO 2014.07.03 适用)
but i still can't type chinese.
參閱
6. viewtopic.php?t=447732
安装输入法
7. https://wiki.archlinux.org/index.php/fc ... figuration
Fcitx
there is no sound yet.
參閱
8. https://wiki.archlinux.org/index.php/Ad ... chitecture
i want to install chrome
試試
viewtopic.php?p=3095112#p3095112
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#14

帖子 jinjiachen » 2014-08-09 8:16

1. startx
我现在在deblian下,否则不能打中文不能很好交流,首先这个startx好像行不通了,没命令,并且无.xinitrc,看了wiki, 是从/etc/skel/xinitrc中复制过来的,我看了下,在该目录
下依然没有,可能是arch改用systemd来启动了,所以该命令通过

代码: 全选

systemctl start slim
来实现相同的功能
2.fcitx
我已经安装fcitx及fcitx-table-extra,发现了该输入法面板,并且能选择输入为拼音或五笔,可是选择后并没有什么改变,打出来的还是英文,我有两个疑问
2.1 是否和LANG有关?我使用过如下命令

代码: 全选

LANG=zh_CN.UTF8
                   export LANG
不过重启后我发现又变成LANG=C
2.2 是否和字体有关?没有中语文字体就不能打中文 ?我有安装过wqy-microhei
3.再次无法进入桌面
我之前都是开机后进入的是字符界面,然后要运行如下命令才能进入桌面

代码: 全选

systemctl start slim
然后我想开机就进去图形界面,因此运行了如下命令:

代码: 全选

systemctl enable slim
再次重启后黑屏,无输出,alt ctrl f1等无效,请问是我最后运行的命令导致的吗?
jinjiachen
帖子: 2148
注册时间: 2012-12-16 15:43
系统: debian

Re: 关于GRUB的疑问

#15

帖子 jinjiachen » 2014-08-09 8:19

不好意思,还有个问题忘写了,就是chrome,你那个贴文是deb格式的,意思是arch可以安装deb的?我不是很懂,刚接触arch,好像有个yaourt,但我在源里搜也没有,不知道如何安装
回复