多内核,多版本Linux操作系统测试机的安装过程

来源:互联网 发布:淘宝客活动关闭返利 编辑:程序博客网 时间:2024/05/17 04:01

测试需要:

我们的设备在FC11下碰到问题,需要验证并寻求解决方案。所以,大夯计划在同一台机器上安装两个一样的FC11操作系统。这样,一个系统保留原样作为测试对比,另一个操作系统可以自由升级,寻找解决方案。

 

以下是简单的安装过程:

  1. FC11安装光盘安装第一个FC11操作系统(/dev/sda2)

    1. 为了能够让不同的系统共享一些启动信息,大夯根据LFS的建议,申明了一个独立的Ext3boot分区,大小为200MB,该分区为/dev/sda1。在本系统里被mount/boot

      1. 参考LinuxFrom Scrach的建议:

        /boot – Highly recommended. Usethis partition to store kernels and other booting information. Tominimize potential boot problems with larger disks, make this thefirst physical partition on your first disk drive. A partitionsize of 100 megabytes is quite adequate.http://www.linuxfromscratch.org/lfs/view/stable/chapter02/creatingpartition.html

        The location of the boot partition is a choice of the user thataffects the configuration. One recommendation is to have aseparate small (suggested size is 100 MB) partition just for bootinformation. That way each build, whether LFS or some commercialdistro, can access the same boot files and access can be made fromany booted system. If you choose to do this, you will need tomount the separate partition, move all files in the current /bootdirectory (e.g. the linux kernel you just built in the previoussection) to the new partition. You will then need to unmount thepartition and remount it as /boot. If you do this, besure to update /etc/fstab.

        http://www.linuxfromscratch.org/lfs/view/stable/chapter08/grub.html

    2. 安装Grub2到该系统。

  2. 在一个新的分区(/dev/sda3)安装第二个FC11系统。

  3. 回到第一个FC11系统,手动更新Grub2的启动信息/boot/grub/grub.cfg.

    1. grub-mkconfig生成的grub.cfg

    2. 修改grub.cfg为可写;

    3. 参考已有的menuentry,将新安装的FC11启动选项加入 grub.cfg

    4. 注意,这时候需要用'ls/dev/disk/by-uuid -l'来获取对应分区的UUID

  4. 这时候,机器已经有两个一样的FC11系统了。

  5. 进入第一个FC11系统(/dev/sda2),升级该系统的内核。

    1. 下载最新的kernelpackage: linux-2.6.35-rc5.tar.bz2

    2. /home下创建工作目录;

    3. root用户编译生成新的内核:

      1. 参考http://www.linuxfromscratch.org/lfs/view/stable/chapter08/kernel.html

      2. make mrproper

      3. make oldconfig

      4. make

      5. make modules-install

      6. vmlinux文件,System.map文件,.config文件拷贝到/boot目录下;

      7. 安装kernel文档;

    4. /sbin/mkinitrd生成intird文件;

    5. 更新/boot/grub/grub.cfg文件;

  6. 到这个时候,测试机已经拥有3Linux启动选项了;

  7. 试着安装Ubuntu9.10到分区(/dev/sda4)Disable默认的bootloader安装。在FC11/dev/sda2)中通过手动更新grub.cfg,实现了Ubuntu9.10与其他系统的共存。

       

 

一些备忘录:

  1. 感谢LFS网站(http://www.linuxfromscratch.org/)。碰到相关问题时候,LFS网站经常能给出解决方案。

  2. FC11系统默认支持Ext4文件系统,但是grub不支持。据说grub2支持。大夯很保守地将文件系统都设定为ext3

  3. 不太理解LFS里面说的boot分区存放的boot信息到底有哪些?

  4. LFS建议创建独立的/home/opt分区。在做测试机用的时候,这么设置比较浪费硬盘资源。

 

原创粉丝点击