用户讨论:Ryoohki:修订间差异

来自Ubuntu中文
跳到导航跳到搜索
Ryoohki留言 | 贡献
无编辑摘要
Ryoohki留言 | 贡献
无编辑摘要
 
(未显示2个用户的10个中间版本)
第2行: 第2行:
https://help.ubuntu.com/community/FakeRaidHowto
https://help.ubuntu.com/community/FakeRaidHowto


'''在 (主板芯片)RAID 硬盘上安装 Ubuntu 仅适用于 Ubuntu9.04 及 Ubuntu9.10 的图形界面'''
'''在 RAID 硬盘上安装 Ubuntu 仅适用于 Ubuntu9.04 及 Ubuntu9.10 的图形安装界面'''


Live CD 安装 (Ubuntu 图形化安装界面)
Live CD 安装 (Ubuntu 图形化安装界面)
第8行: 第8行:
'''MAKE SURE YOU BACK UP ANYTHING OF IMPORTANCE!!!'''
'''MAKE SURE YOU BACK UP ANYTHING OF IMPORTANCE!!!'''


本文将介绍如何使用 Live CD 的图形安装方式在 (主板芯片)RAID 磁盘上安装 Ubuntu '''(仅限于9.04和9.10)'''.
本文将介绍如何使用 Live CD 的图形安装方式在 RAID 磁盘上安装 Ubuntu '''(仅限于9.04和9.10)'''.


如果您想获得更多的在 (主板芯片)RAID 硬盘上安装 Ubuntu 的信息,请浏览原文
如果您想获得更多的在 RAID 硬盘上安装 Ubuntu 的信息,请浏览原文
 
1. 用 Live CD 引导启动计算机,进入试用模式.
 
2. 打开一个虚拟终端.


1. 用 Live CD 引导启动计算机.
(如果您要安装的 Ubuntu 版本为 9.10 ,请跳过)
2. 打开一个终端窗口.
3. 输入下列命令.
3. 输入下列命令.
(如果您使用的 RAID 模式是 0 或 1 ,请跳过下面的第一步,从 b 开始)
(如果您使用的 RAID 模式是 0 或 1 ,请跳过下面的第一步,从 b 开始)
     a. $ sudo modprobe dm-raid4-5
     a. $ sudo modprobe dm-raid4-5
第22行: 第24行:
         禁用交换分区(swap分区)
         禁用交换分区(swap分区)
     d. $ sudo dmraid -ay
     d. $ sudo dmraid -ay
4. 查看一下 RAID 磁盘是否被识别并加载.
4. 查看一下 RAID 磁盘是否被识别并加载.
     a. $ ls -l /dev/mapper/
     a. $ ls -l /dev/mapper/
输出信息:
输出信息:
control
isw_beeaakeeaa_five  ##随硬件设备的不同信息略有区别,请以实际情况为准.


control            isw_beeaakeeaa_five -- 随硬件设备的不同信息略有区别,请以实际情况为准.
下面的内容将使用 /dev/mapper/isw_beeaakeeaa_five 来代表 RAID 磁盘进行安装.


使用 /dev/mapper/isw_beeaakeeaa_five 来代表 RAID 磁盘进行下面的安装.
5. 使用分区工具对 RAID 磁盘进行分区 (如果 RAID 磁盘上已经有了分区请跳过下面a步骤)
    a. $ sudo cfdisk /dev/mapper/isw_beeaakeeaa_five
 
6. 本文在接下来的演示中将在 /dev/mapper/isw_beeaakeeaa_five5 分区中安装 Ubuntu ,请阅读本文的读者视自己的实际情况为准.
 
7. 运行桌面上的"安装 Ubuntu"
    a. 如果进行指导安装一定要选择 RAID 分区。如果你要进行手动安装,确保您不会引起任何的磁盘分区组成 RAID 分区.
    b. 在安装的最后一步,点击"高级"选项,移除"安装启动引导程序"项目. 我们要在安装完毕后手动进行启动引导程序的安装.
    c. 在安装结束后选择"继续测试"选项,回到 Live CD 的桌面.
 
8. 为新安装的 Ubuntu 安装 dmraid 和 grub 组件:(在虚拟终端中操作)
    a. $ sudo mount /dev/mapper/isw_beeaakeeaa_five5 /target/
如果此操作失败, /target 目录也许已经被加载了,如果不是 /target 目录已经被加载,那么必需进行一些调试.如果您知道以上问题的原因,欢迎将解决之道添加进本文.
    b. $ sudo mount --bind /dev /target/dev/
    c. $ sudo mount -t proc proc /target/proc/
    d. $ sudo mount -t sysfs sys /target/sys/
    e. $ sudo cp /etc/resolv.conf /target/etc/resolv.conf
    f. $ sudo chroot /target/
    g. # apt-get update
    h. # apt-get install -y dmraid
    i. # apt-get install -y grub
    j. # mkdir /boot/grub
    k. # cp /usr/lib/grub/x86_64-pc/* /boot/grub/
    l. # grub --no-curses ##接下来将会在 grub 命令行下操作
          (1) grub> device (hd0) /dev/mapper/isw_beeaakeeaa_five
          (2) grub> find /boot/grub/stage1
输出信息:
find /boot/grub/stage1
(hd0,4)


Create partitions on your raid array with your preferred partition manager, or do so using the partitioning tool provided in ubiquity (partitioning with ubiquity installer have not been tested)
          (3)grub> root (hd'x','x')
$ sudo cfdisk /dev/mapper/isw_beeaakeeaa_five
                在 'x' 处输入上一步操作中获得的数值
We used /dev/mapper/isw_beeaakeeaa_five5 partition as Ubuntu root partition in this example.
          (4) 在硬盘上安装 grub (如果你使用其它的启动引导程序,将 grub 安装到指定分区中)
Begin the install process
                (a) grub> setup (hd'x')  
If doing a guided install make sure you select the raid partition. if you are going to do a manual install make sure you do not create a partition on any of the disks that make up the raid partition.
                      在 'x' 处输入上一步操作中获得的数值
On the last step before installing, click the Advanced options and uncheck the install boot loader option. We will install grub (the boot loader later).
或者
After installer finishes, close ubiquity installer without rebooting the machine.
                      grub> setup (hd'x','x') ##将 grub 安装到分区.
Install dmraid and grub in your new Ubuntu installation:
                      你的硬盘上必须具备其它的引导启动程序,否则系统将无法引导
$ sudo mount /dev/mapper/isw_beeaakeeaa_five5 /target/
          (5) grub> quit
if this fails maybe the /target directory is already mounted if not then some debuging will be required. If any more information can be provided related to this issue place add your knowledge to this document
    m. # update-grub
$ sudo mount --bind /dev /target/dev/
$ sudo mount -t proc proc /target/proc/
$ sudo mount -t sysfs sys /target/sys/
$ sudo cp /etc/resolv.conf /target/etc/resolv.conf
$ sudo chroot /target/
# apt-get update
# apt-get install -y dmraid
# apt-get install -y grub
# mkdir /boot/grub
# cp /usr/lib/grub/x86_64-pc/* /boot/grub/
# grub --no-curses you will now be at the grub prompt grub>
grub> device (hd0) /dev/mapper/isw_beeaakeeaa_five
grub> find /boot/grub/stage1
OUTPUT:
find /boot/grub/stage1
(hd0,4)
make a note of the output from this command it will be needed later. in my case I have my linux partition as the first extended partition you most likely will have different results (remember that grub starts partition numbers in zero, so partition 5 for linux is partition 4 for grub).
grub> root (hd'x','x')
replace 'x' with the partition number from the previous step
Install grub on your disk (or partition if you prefer boot your computer with another boot manager)
grub> setup (hd'x')  
replace 'x' with the values gathered in the previous step
or
grub> setup (hd'x','x') to install grub on the partition.
YOU WILL NEED ANOTHER BOOT MANAGER TO START YOUR COMPUTER
grub> quit
# update-grub
say yes to creating a menu.lst
say yes to creating a menu.lst
now open the newly created menu list and make the following changes. Any editor can be used it is not required that you use nano # nano /boot/grub/menu.lst
now open the newly created menu list and make the following changes. Any editor can be used it is not required that you use nano # nano /boot/grub/menu.lst

2009年11月21日 (六) 17:03的最新版本

原文 https://help.ubuntu.com/community/FakeRaidHowto

在 RAID 硬盘上安装 Ubuntu 仅适用于 Ubuntu9.04 及 Ubuntu9.10 的图形安装界面

Live CD 安装 (Ubuntu 图形化安装界面)

MAKE SURE YOU BACK UP ANYTHING OF IMPORTANCE!!!

本文将介绍如何使用 Live CD 的图形安装方式在 RAID 磁盘上安装 Ubuntu (仅限于9.04和9.10).

如果您想获得更多的在 RAID 硬盘上安装 Ubuntu 的信息,请浏览原文

1. 用 Live CD 引导启动计算机,进入试用模式.

2. 打开一个虚拟终端.

3. 输入下列命令.

(如果您使用的 RAID 模式是 0 或 1 ,请跳过下面的第一步,从 b 开始)

   a. $ sudo modprobe dm-raid4-5
   b. $ sudo aptitude install -y dmraid
   c. $ sudo swapoff -a
       禁用交换分区(swap分区)
   d. $ sudo dmraid -ay

4. 查看一下 RAID 磁盘是否被识别并加载.

    a. $ ls -l /dev/mapper/

输出信息:

control
isw_beeaakeeaa_five   ##随硬件设备的不同信息略有区别,请以实际情况为准.

下面的内容将使用 /dev/mapper/isw_beeaakeeaa_five 来代表 RAID 磁盘进行安装.

5. 使用分区工具对 RAID 磁盘进行分区 (如果 RAID 磁盘上已经有了分区请跳过下面a步骤)

   a. $ sudo cfdisk /dev/mapper/isw_beeaakeeaa_five

6. 本文在接下来的演示中将在 /dev/mapper/isw_beeaakeeaa_five5 分区中安装 Ubuntu ,请阅读本文的读者视自己的实际情况为准.

7. 运行桌面上的"安装 Ubuntu"

   a. 如果进行指导安装一定要选择 RAID 分区。如果你要进行手动安装,确保您不会引起任何的磁盘分区组成 RAID 分区.
   b. 在安装的最后一步,点击"高级"选项,移除"安装启动引导程序"项目. 我们要在安装完毕后手动进行启动引导程序的安装.
   c. 在安装结束后选择"继续测试"选项,回到 Live CD 的桌面.

8. 为新安装的 Ubuntu 安装 dmraid 和 grub 组件:(在虚拟终端中操作)

   a. $ sudo mount /dev/mapper/isw_beeaakeeaa_five5 /target/

如果此操作失败, /target 目录也许已经被加载了,如果不是 /target 目录已经被加载,那么必需进行一些调试.如果您知道以上问题的原因,欢迎将解决之道添加进本文.

   b. $ sudo mount --bind /dev /target/dev/
   c. $ sudo mount -t proc proc /target/proc/
   d. $ sudo mount -t sysfs sys /target/sys/
   e. $ sudo cp /etc/resolv.conf /target/etc/resolv.conf 
   f. $ sudo chroot /target/
   g. # apt-get update 
   h. # apt-get install -y dmraid
   i. # apt-get install -y grub
   j. # mkdir /boot/grub
   k. # cp /usr/lib/grub/x86_64-pc/* /boot/grub/
   l. # grub --no-curses ##接下来将会在 grub 命令行下操作
         (1) grub> device (hd0) /dev/mapper/isw_beeaakeeaa_five
         (2) grub> find /boot/grub/stage1 

输出信息:

find /boot/grub/stage1
(hd0,4)
          (3)grub> root (hd'x','x')
               在 'x' 处输入上一步操作中获得的数值
          (4) 在硬盘上安装 grub (如果你使用其它的启动引导程序,将 grub 安装到指定分区中)
               (a) grub> setup (hd'x') 
                     在 'x' 处输入上一步操作中获得的数值
或者
                     grub> setup (hd'x','x') ##将 grub 安装到分区.
                     你的硬盘上必须具备其它的引导启动程序,否则系统将无法引导
          (5) grub> quit
   m. # update-grub

say yes to creating a menu.lst now open the newly created menu list and make the following changes. Any editor can be used it is not required that you use nano # nano /boot/grub/menu.lst Change

  1. groot=(hd0,0) TO # groot=(hd0,'x')

root option in the boot entries to root (hd0,'x') Replace the 'x' with the partition that was found earlier Add the Windows boot entry if need be.

 title                 Windows
 rootnoverify (hd0,0)   # use the correct partition for Windows, of course
 makeactive
 chainloader +1

For all Ubuntu-related boot entries, such as

  title         Ubuntu ...
  root          (hd0,0)
  ...

change (hd0,0) to (hd'x','x') (in my case, Linux partition was not the first one, and without these changes I would get grub "Error 17" after reboot). Save and exit nano. or what ever text editor you are using.

  1. update-grub

make sure the new install of Ubuntu loads the raid module kernel

  1. echo dm-raid4-5 >> /etc/initramfs-tools/modules
  2. update-initramfs -u
  3. nano /etc/modules

and add 'dm-raid4-5' if not exists Reboot and verify both Ubuntu and the existing Windows partition boot if Windows is installed.