linux重做raid出现grub,在主板RAID 0上安装 Ubuntu 11.04 最后grub出现的问题及解决办法...

Install Ununtu 11.04 on an OCZ RevoDrive 120G SSD with RAID0, part two: The solution

Installing Ubuntu 11.04 (Natty Narwhal) on a (fake) RAID0 SSD is not easy or straight-forward. This post describes how I got it all to work!

...

All changes I made was done through a terminal running from the Live media (USB or CD doesn't matter.)

My hard-drives were set up as follows:

/dev/mapper/sil_bhafabbhfgah2    /

/dev/mapper/sil_bhafabbhfgah1    /boot

/dev/sda1                        /var

/dev/sdb2                        /home

tmpfs                            /tmp

First we mount all hard-drives of the computer, in their own places:

$ sudo mount /dev/mapper/sil_bhafabbhfgah2  /target

$ sudo mount /dev/mapper/sil_bhafabbhfgah1  /target/boot

$ sudo mount /dev/sda1 /target/var

$ sudo mount /dev/sdb2 /target/home

$ sudo mount -o bind /proc /target/proc

$ sudo mount -o bind /sys /target/sys

$ sudo mount --rbind /dev /target/devIt is important that all target partitions are mounted.

Now we do a chroot to the mount system.

$ sudo chroot /target /bin/bash

From here we need to install the dmraid package:

$ apt-get install dmraid

Now create the file device.map, used by GRUB.

$ echo "(hd0) /dev/mapper/sil_bhafabbhfgah" > /boot/device.map

$ cp /boot/device.map /boot/grub/Change the device name (sil_bhafabbhfgah) to the appropriate for your system.

Now make sure GRUB is installed properly on the device:

$ grub-setup /dev/mapper/sil_bhafabbhfgah

$ update-grub

Now we might need to edit the GRUB configuration file: /boot/grub/grub.cfg. All lines looking something like:

set root='(hd6,msdos2)'should be changed to:

set root='(hd0,msdos2)'The actual line (the parts containing hd6 and msdos2) may of course be different.

The final thing to do is edit the /etc/fstab file, replacing all partion-references with UUIDs. Here is my fstab as example:

UUID=7e9f38de-b0b3-4eaf-8f5b-2f83b1a0674c /                  ext4    errors=remount-ro,noatime,nodiratime           0       1

none            /tmp            tmpfs   rw,nodev,nosuid,noatime,nodiratime,size=1024m,auto 0 2

none            /var/tmp        tmpfs   rw,nodev,nosuid,noatime,nodiratime,size=1024m,auto 0 2

# /var was on /dev/sda1 during installation

UUID=f1abaa31-25a9-414e-a7fa-f05ab492d5a0 /var               ext4    rw,noatime,auto,nodev,nodiratime               0       2

# /boot was on /dev/mapper/sil_bhafabbhfgah1 during installation

UUID=55a9024e-7806-4ec5-b68e-8e6065cf3587 /boot              ext4    rw,nodev,noexec,noatime,nodiratime,auto        0       2

# /home was on /dev/sdb2 during installation

UUID=2e0f5ff4-146d-492f-a6e7-cad460db79ee /home              ext4    rw,noatime,nodiratime,auto,nodev,nosuid        0       2

# /home/arrow/extra1 was on /dev/sdc2 during installation

UUID=4867268a-b6d1-469f-9190-b2807695b09e /home/arrow/extra1 ext4    rw,noatime,nodiratime,auto,nodev,nosuid        0       2

# /home/arrow/extra2 was on /dev/sdc2 during installation

UUID=73430b1a-91df-4908-bd16-4b1ed07876e4 /home/arrow/extra2 ext4    rw,noatime,nodiratime,auto,nodev,nosuid        0       2

# swap was on /dev/sdc1 during installation

UUID=68a20ae0-12e0-413d-b80f-b39fd42e3153 none            swap    sw              0       0

/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

Now reboot, and keep your fingers crossed!0b1331709591d260c1c78e86d0c51c18.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值