刀片服务器硬盘启动Linux独立安装

豆豆网   技术应用频道   2008年03月28日  【字号: 收藏本文

内容摘要:本文将通过下面的九个步骤,为IBM BladeCenter® HS20刀片服务器去创建一个可启动的磁盘(驱动器),自安装硬盘驱动,运行SUSE Linux企业服务器10。

  e.输入a来在第一个分区(安装分区)切换启动标记,如下列列表3所示。选中使分区1可启动。

  列表3:使安装分区可启动

Command (m for help): a
Partition number (1-4) : 1

  f.输入w来写入所有分区信息到表格并且退出分区,如列表4所示:

  列表4:写入分区信息

Command (m for help): w
The partition table has been altered;
Calling ioctl() to re-read partition table.
Syncing disks.

  这一步将把变化提交到磁盘。

  现在就已成功地将磁盘B分区。

  第三步:格式化分区

  用ext3文件系统来格式化磁盘B的第一个分区:

  列表5:格式化第一个分区

blade8:~ # mkfs.ext3 /dev/sdb1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
904960 inodes, 1807304 blocks
90365 blocks (5.00%) reserved for the super user
First data block=0
56 block groups
32768 blocks per group, 32768 fragments per group
16160 inodes per group
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
The filesystem will be automatically checked every 37 mounts or 180 days,
whichever comes first. Use tune2fs -c or -I to override.

  第四步:安装grub 启动程序

  如下所示在磁盘B的第一个分区安装grub启动程序:

  a.挂载第一个分区到文件夹,例如/mnt/sdb. 运行 mount /dev/sdb1 /mnt/sdb.

  b. 从/boot/grub文件夹复制grub 启动文件到/mnt/sdb/boot/文件夹;包括grub进程文件和grub配置文件。

  c.输入下面的命令来安装grub到磁盘B的第一个分区,如下列表六所示:grub-install --root-directory=/mnt/sdb /dev/sdb1 -recheck:

  列表6:安装grub

blade8:~ # grub-install -root-directory=/mnt/sdb /dev/sdb1 -recheck
Probing devices to guess BIOS drives. This may take a long time.
Installation finished. No error reported.
This is the contents of the device map /mnt/sdb/boot/grub/device.map.
Check if this is correct or not. If any of the line is incorrect,
Fix it and re-run the script 'grub-install'.
(fd0)  /dev/fd0
(hd0)  /dev/sda
(hd1)  /dev/sdb

  你已经成功地制作了磁盘B的带grub的可启动的磁盘安装分区。接下来,当磁盘启动时你需要使grub开始SUSE安装程序。首先,你需要复制安装内核和initrd文件到安装分区,然后需要准备好grub配置文件。

  第五步:为安装准备内核

  通过从SUSE安装ISO文件来复制安装内核,从而为安装准备好内核。创造一个/mnt/sdb/boot文件夹,然后从ISO文件/boot/i386/loader/复制linux文件和initrd到新的文件夹。

  (未完待续……)

作者:刘琳倩    责编:豆豆技术应用

正在加载评论...