扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
第三步:格式化分区
用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到新的文件夹。
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者