CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了CentOS5.6U盘启动安装笔记大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

概述

一、制作启动安装U盘 用UlTraiSO打开CentOS5.6镜像 点击启动->写入硬盘映像->格式化 ,格式化成fat32格式 点击启动->写入硬盘映像->写入 打开U盘,删掉除isolinux和images外的所有文件和目录 将CentOS5.6镜像拷贝到U盘根目录 二、CentOS5.6安装启动 BIOS设置为从U盘启动 U盘一般为/dev/sdb 安装好后第一次启动(如果已经拔掉U盘)可能

一、制作启动安装U盘


用UlTraiSO打开CentOS5.6镜像

点击启动->写入硬盘映像->格式化 ,格式化成fat32格式

点击启动->写入硬盘映像->写入

打开U盘,删掉除isolinux和images外的所有文件和目录

将CentOS5.6镜像拷贝到U盘根目录


二、CentOS5.6安装启动


BIOS设置为从U盘启动

U盘一般为/dev/sdb

安装好后第一次启动(如果已经拔掉U盘)可能需要将grub引导由root (hd1,0)改为root (hd0,0)才可以正常进入系统

以下为永久更改grub使正常引导:

[root@mfsmaster home]# /sbin/grub

grub> find /grub/stage1

(hd1,0)


如果提示Error 15: File not found,则尝试 find /boot/grub/stage1 或者 find stage1

(hd1,0)代表的第二个硬盘的第一个分区,相应的(hd0,0)代表的就是第一个硬盘第一个分区,这一步其实就是告诉我们引导被写入了U盘中= =


grub> root (hd0,0)

Filesystem type is ext2fs,partition type 0x83

grub> setup (hd0)

checking if "/boot/grub/stage1" exists... no

checking if "/grub/stage1" exists... yes

checking if "/grub/stage2" exists... yes

checking if "/grub/e2fs_stage1_5" exists... yes

Running "embed /grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.

succeeded

Running "install /grub/stage1 (hd0) (hd0)1+15 p (hd0,0)/grub/stage2 /grub/grub.conf"... succeeded

Done.

grub> reboot


然后修改启动的 /boot/grub/menu.lst 或者 /boot/grub/grub.conf CentOS下这两个文件是绑定的,改一个即可


[root@mfsmaster home]# vi /boot/grub/menu.lst

# grub.conf generated by anaconda

#

# Note that you do not have to rerun grub after making changes to this file

# NOTICE: You have a /boot partition. This means that

# all kernel and initrd paths are relative to /boot/,eg.

# root (hd1,0)

# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00

# initrd /initrd-version.img

#boot=/dev/sdb

default=0

timeout=5

splashimage=(hd0,0)/grub/splash.xpm.gz

hiddenmenu

title CentOS (2.6.18-274.3.1.el5)

root (hd0,0)

kernel /vmlinuz-2.6.18-274.3.1.el5 ro root=/dev/VolGroup00/LogVol00

initrd /initrd-2.6.18-274.3.1.el5.img

title CentOS (2.6.18-238.el5)

root (hd0,0)

kernel /vmlinuz-2.6.18-238.el5 ro root=/dev/VolGroup00/LogVol00

initrd /initrd-2.6.18-238.el5.img

title Other

rootnoverify (hd0,3)

chainloader +1

把当中的(hd1,0)都改成(hd0,0),splashimage=(hd0,0)/grub/splash.xpm.gz 这个是开机引导背景图片的位置,改不改都关系不大,重启CentOS就可以正常启动了

大佬总结

以上是大佬教程为你收集整理的CentOS5.6U盘启动安装笔记全部内容,希望文章能够帮你解决CentOS5.6U盘启动安装笔记所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。