Software Raid0安装到Grub boot loader的时侯失败
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Software Raid0安装到Grub boot loader的时侯失败
4块SCSI硬盘,按照步骤设置好了Raid0之后,接下来安装,一直到“Install the GRUB boot loader on a hard disk"这一步出错,如图所示,然后我继续安装,continue to install without grub boot. 安装完了之后重启,光标就在黑黑的屏幕上闪,没有任何提示,也不知道如何进入命令界面,请指点
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
Re: Software Raid0安装到Grub boot loader的时侯失败
手工安装grub试试?
使用 root() 和 setup() 来安装。
使用 root() 和 setup() 来安装。
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
To fix a non-bootable system and ensure GRUB is installed on both drives, manually install GRUB as follows:
* Reboot the machine from the original Linux CDROM
* From the Linux boot menu, select “Rescue a broken system”
* Continue through the prompts until the screen “Device to use as a root file system” appears
* Press Alt-F2 to switch to a second console screen then press Enter to activate it.
* Mount the md0 RAID device and use chroot and grub to install the bootloader onto both sda and sdb using the following commands
mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sda
root (hd0,0)
setup (hd0)
device (hd1) /dev/sdb
root (hd1,0)
setup (hd1)
quit
* Reboot the system with command “shutdown -r now”, remove the CDROM and allow the system to boot from the hard drive.
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
I followed the instructions on "Setting up software RAID in Ubuntu Server" (posted on April 24th, 2007 by Derrick Webber at the advosys.ca site) and created RAID1 with 2 hard disks. The Ubuntu 8 Server system are installed on RAID1 and rebooted successfully. But when I tried to load the GRUB boot loader onto the second disk with these steps,
--
* Reboot the server from the original Ubuntu Server CDROM
* From the Ubuntu boot menu, select “Rescue a broken system”
* at the screen “Device to use as a root file system” appears
* Press Alt-F2 to switch to a second console screen then press Enter to activate it.
* then the following commands.
I received an error:
mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sd
Error: Device not found.
device (hd1) /dev/sdb
Error: Device not found.
--
Can anyone help?
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
Quote:
Originally Posted by weiyuanw View Post
I received an error:
mount /dev/md0 /mnt
chroot /mnt
grub
device (hd0) /dev/sd
Error: Device not found.
device (hd1) /dev/sdb
Error: Device not found.
--
Can anyone help?
I also came accross this very problem. The reason is that you are missing /dev/sda and /dev/sdb entries. Just make them with mknod and you are all set. The syntax is:
mknod /dev/sda b <major> <minor>
mknod /dev/sdb b <major> <minor>
Copy the <major> and <minor> from your rescue's system /dev directory.
Last edited by Robert_SK; 08-22-2008 at 04:36 PM..
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
Re: Software Raid0安装到Grub boot loader的时侯失败
忽略掉这个试试? device (hd0) /dev/sda
或 sudo fdisk -l 看看所有的分区?
或 sudo fdisk -l 看看所有的分区?
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
可是对于raid0的手动安装好像不是那么简单,到底安装到哪个盘?是全部盘都安装一个?有没有更具体点的步骤呢?oneleaf 写了:手工安装grub试试?
使用 root() 和 setup() 来安装。
- oneleaf
- 论坛管理员
- 帖子: 10441
- 注册时间: 2005-03-27 0:06
- 系统: Ubuntu 12.04
Re: Software Raid0安装到Grub boot loader的时侯失败
hd0,即可。你使用的是软阵列,我一般的做法是单独分一个/boot 位于 /dev/sda 再在 /dev/sdb 上划出交换分区 ,再将两个硬盘上剩下的分区作成md,这样就不会有任何问题。
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
# sudo fdisk -loneleaf 写了:忽略掉这个试试? device (hd0) /dev/sda
或 sudo fdisk -l 看看所有的分区?
cannot open /proc/partitions
郁闷了,在alt+f2之前没有仔细看各个磁盘和分区,现在遇到这个错误,有什么方法解决?
另外,我果然遇到和前人遇到的相同问题:
grub> device (hd0) /dev/sda
Error 15: File not found
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
[Enter rescue mod]
Enter a device you wish to use as your root file system. You will be able to choose among various rescue operations to perform on this file system.
Device to use as root file system:
/dev/sda1
/dev/sda2
/dev/sda5
/dev/sdb1
/dev/sdb2
/dev/sdb5
/dev/sdc1
/dev/sdc2
/dev/sdc5
/dev/sdd1
/dev/sdd2
/dev/sdd5
/dev/md0
Enter a device you wish to use as your root file system. You will be able to choose among various rescue operations to perform on this file system.
Device to use as root file system:
/dev/sda1
/dev/sda2
/dev/sda5
/dev/sdb1
/dev/sdb2
/dev/sdb5
/dev/sdc1
/dev/sdc2
/dev/sdc5
/dev/sdd1
/dev/sdd2
/dev/sdd5
/dev/md0
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
搜索网络,找到别人遇到相同错误的解决方法,从我上面的截图,对应这里的<major><minor>到底是什么?I also came accross this very problem. The reason is that you are missing /dev/sda and /dev/sdb entries. Just make them with mknod and you are all set. The syntax is:
mknod /dev/sda b <major> <minor>
mknod /dev/sdb b <major> <minor>
- yaoms
- 帖子: 4952
- 注册时间: 2007-10-19 14:51
- 来自: 深圳
Re: Software Raid0安装到Grub boot loader的时侯失败
代码: 全选
mknod /dev/sda b 8 0
Nothing 有事请发邮件到 yms541 AT gmail.com
alias 爱慕颇雷尔='mplayer'
alias 爱慕颇雷尔='mplayer'
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
iNutshell> helloyl: 我的 sda 是 8,0
<iNutshell> helloyl: 我的 sda 是 8 0
<helloyl> 8 0是如何查出来的呢
<iNutshell> helloyl: ls -l /dev/sda
<iNutshell> helloyl: 可以看到
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
- relaxssl
- 帖子: 1448
- 注册时间: 2007-01-30 7:13
Re: Software Raid0安装到Grub boot loader的时侯失败
# ls -l /dev/sda
brw-rw---- 1 root root 8, 0 Dec 23 10:54 /dev/sda
brw-rw---- 1 root root 8, 0 Dec 23 10:54 /dev/sda