- ubuntu12.04环境下使用kvm ioctl接口实现最简单的虚拟机
- Ubuntu 通过无线网络安装Ubuntu Server启动系统后连接无线网络的方法
- 在Ubuntu上搭建网桥的方法
- ubuntu 虚拟机上网方式及相关配置详解
CFSDN坚持开源创造价值,我们致力于搭建一个资源共享平台,让每一个IT人在这里找到属于你的精彩世界.
这篇CFSDN的博客文章Linux全自动安装操作实例附原理由作者收集整理,如果你对这篇文章有兴趣,记得点赞哟.
手动安装Linux系统费时费力,需要操作的步骤非常多,使用kickstart等工具就能实现Linux系统的全自动安装,下面小编就给大家介绍下Linux全自动安装操作实例,一起来学习下吧.
原理:
使用光盘安装linux系统过程:
第一步,POST自检 。
第二步,MBR引导,这里使用的GRUB是CDROM中isolinux/文件夹中的grub.conf.
第三步,启动带有安装、升级、修复等选项的选择菜单,这是由isolinux.bin启动的.
第四步,vmlinuz(initrd)挂载根文件系统.
第五步,启动anaconda安装界面。而anaconda 。
详细解析:
第二步中,grub.conf菜单中定义了第三步中的引导内容.
所以这里的显示内容可以自定义 。
[root@CentOS6 cdrom]# cat isolinux/grub.conf 。
#debug --graphics 。
default=0 。
splashimage=@SPLASHPATH@ 。
timeout 5 。
hiddenmenu 。
title @PRODUCT@ @VERSION@ 。
kernel @KERNELPATH@ 。
initrd @INITRDPATH@ 。
title Install system with basic video driver 。
kernel @KERNELPATH@ xdriver=vesa nomodeset askmethod 。
initrd @INITRDPATH@ 。
title rescue 。
kernel @KERNELPATH@ rescue askmethod 。
initrd @INITRDPATH@ 。
第三步,进入启动界面,这里定义了启动界面的各种显示内容, 。
由isolinux.bin执行,由isolinux.cfg提供配置文件.
display boot.msg 。
引用boot.msg,其配置文件为boot.cfg 。
menu background splash.jpg 。
menu title Welcome to CentOS 6.4!最上面显示的内容 。
menu color border 0 #ffffffff #00000000定义界面的颜色显示 。
menu color sel 7 #ffffffff #ff000000 。
定义选项 。
label linux 。
menu label ^Install or upgrade an existing system 。
menu default 。
kernel vmlinuz 。
append initrd=initrd.img 。
label vesa 。
menu label Install system with ^basic video driver 。
kernel vmlinuz 。
append initrd=initrd.img xdriver=vesa nomodeset 。
label rescue 。
menu label ^Rescue installed system 。
kernel vmlinuz 。
append initrd=initrd.img rescue 。
label local 。
menu label Boot from ^local drive 。
localboot 0xffff 。
label memtest86 。
menu label ^Memory test 。
kernel memtest 。
append - 。
第五步,真正进入安装时,需要加载Packages/anaconda-VERSION.rpm文件 。
anaconda程序可以实现图形、字符方式的安装,而在这两种方式下, 。
也可以选择交互式安装或自问自答的自动安装.
anaconda安装详解:
其自动安装的配置文件是口kickstart。kickstart可以手动编写,可以文本方式生成,也可以 。
图形方式生成。(ks.cfg文件在安装完成后会在root家目录下生成anaconda.cfg详细配置) 。
下面是图形生成的步骤:
1,安装system-config-kickstart 。
yum install system-config-kickstart 。
2,启动system-config-kickstart 。
system-config-kickstart & 。
3,配置kickstart 。
Basic Configuration:
Encrypt root password表示加密root的密码串 。
Target Architecture:表示平台 。
Reboot system after installation安装后的动作是重启,需要勾上.
Perform installation in text text mode (grphical is default) 。
安装界面默认使用图形界面,所以这个需要勾上.
Perform installlation in interactive mode使用交互式模式,不勾。 。
Install Method:安装源 。
HTTP Server:安装源的IP 。
HTTP Directory:目录 。
Boot Loader Options:引导选项 。
Install new boot loader安装新的bootloader,下面是使用旧的.
Use GRUB password:GRUB要不要加密.
Install boot loader on Master Boot Record(MBR) 。
将bootloader装入MBR中 。
Install boot loasder on first sector of the boot partition 。
将bootloader装入某一个分区中引导.
kernel parameters:crashkernel=auto rhgb quiet使用静默模式.
Partition Information定义分区 。
Network Configuration网络配置 。
Authentication认证,默认sha512就可以 。
pre 。
post这里不用指定#!/bin/bash 。
4,保存kickstart配置文件.
文件默认保存名字为ks.cfg 。
5,检查ks.cfg配置文件的错误.
# ksvalidator 2ks.cfg 。
kscfg配置文件详解:
命令段:
#platform=x86, AMD64, 或 Intel EM64T 。
#version=DEVEL 。
# Firewall configuration 。
firewall --disabled禁用防火墙 。
# Install OS instead of upgrade 。
install默认动作是安装 。
# Use network installation 。
url --url=“ftp://1.0.0.12/centos/”使用FTP安装源 。
repo --name=“CentOS” --baseurl=“ftp://1.0.0.12/centos” 。
# Root password 。
rootpw --iscrypted $1$dpCtQEn6$pC3UGFPZEJJ5nVftiaScq0 。
# System authorization information 。
auth --useshadow --passalgo=sha512 。
# Use text mode install 。
text使用文本安装方式 。
# System keyboard 。
keyboard us使用美式英语键盘 。
# System language 。
lang zh_CN设置默认语言 。
# SELinux configuration 。
selinux --disabled禁用SELINUX 。
# Do not configure the X Window System 。
skipx 。
# Installation logging level 。
logging --level=info 。
# Reboot after installation 。
reboot安装完成时的动作 。
# System timezone 。
timezone Asia/Shanghai 。
# Network information 。
network --bootproto=static --device=eth0 --ip=1.0.0.7 --netmask=255.0.0.0 --onboot=on 。
# System bootloader configuration 。
bootloader --append=“crashkernel=auto rhgb quiet” --location=mbr --driveorder=“sda” 。
# Clear the Master Boot Record 。
zerombr 。
# Partition clearing information 。
clearpart --all --initlabel清空磁盘分区 。
# Disk partitioning information磁盘分区 。
part /boot --asprimary --fstype=“ext4” --ondisk=sda --size=100 。
part / --asprimary --fstype=“ext4” --ondisk=sda --size=20480 。
part swap --asprimary --fstype=“swap” --ondisk=sda --size=500 。
脚本段:
%post 。
touch /tmp/abc.txt 。
%end 。
软件包段:
%packages 。
@base 。
@basic-desktop 。
@chinese-support 。
@core 。
@debugging 。
@desktop-debugging 。
@desktop-platform 。
@desktop-platform-devel 。
@development 。
@directory-client 。
@fonts 。
使用引导光盘引导后的选择:
点击两次“ESC”键,进入命令行模式,然后 。
linux ip=1.0.0.7 netmask=255.0.0.0 ks=ftp://1.0.0.12/pub/ks.cfg 。
ftp安装源自动安装linux详细步骤:
1,制作引导光盘:
# mount /dev/cdrom /media/cdrom/ 。
# mkdir /root/myboot 。
# cp /media/cdrom/isolinux/ /root/myboot/isolinux 。
# cd /root/myboot/isolinux 。
# chmod +w 。/* 。
# chmod +x vmlinuz 。
# mkisofs -R -J -T -v -no-emul-boot -boot-load-size 4 -boot-info-table -V “MageEdu Testing Image” (-V跟光盘标签) -b isolinux/isolinux.bin (明确指定isolinux.bin的存放位置) -c isolinux/boot.cat (指定boot.cat的位置) -o /tmp/boot.iso (指定输出位置) /root/myboot/ (指定输入源) 。
2,制作ftp安装源 。
# yum install vsfptd 。
# service vsftpd start 。
# mkdir /var/ftp/CentOS 。
# mount /media/cdrom /var/ftp/CentOS, 。
3,将制作好的ks.cfg文件放到ftp目录 。
# cp /root/ks.cfg /var/ftp/pub 。
4,将前面的boot.iso挂载到目标主机的光驱,启动后两次“ESC”键,然后就输入:
linux ip=1.0.0.7 netmask=255.0.0.0 ks=ftp://1.0.0.12/pub/ks.cfg 。
5,自动安装启动 。
上面就是Linux全自动安装的方法介绍了,本文通过编译脚本实现Linux系统全自动化安装,需要安装anaconda,编译完anaconda后启动即可.
最后此篇关于Linux全自动安装操作实例附原理的文章就讲到这里了,如果你想了解更多关于Linux全自动安装操作实例附原理的内容请搜索CFSDN的文章或继续浏览相关文章,希望大家以后支持我的博客! 。
十,Spring Boot 的内容协商的详细剖析(附+Debug调试说明) @ 目录 十,Spring Boot 的内容协商的详细剖析(附+Debug调试说明) 1. 基本
八,SpringBoot Web 开发访问静态资源(附+详细源码剖析) @ 目录 八,SpringBoot Web 开发访问静态资源(附+详细源码剖析) 1. 基本介绍
在sql语句执行前 DB::enableQueryLog(); sql sql sql sql sql dd(DB::getQueryLog()); ?
本文实例讲述了PHP global全局变量的使用与注意事项。分享给大家供大家参考,具体如下: 使用global在方法里面声明外部变量为全局变量,即可以调用该变量。 示例1. global基本用法
SSO简介 定义: 传统的单站点登录访问授权机制是:登录成功后将用户信息保存在session中,sessionId保存在cookie中,每次访问需要登录访问的资源(url)时判断当前sessio
性能测试,在编写代码后,单元测试及性能测试是重要的验收点,好的性能测试可以让我们提前发现程序中存在的问题。 测试用例 在Rust中,测试通常有两部分,一部分是文档测试,一部分是模块测试。 通常我们
我正在制作一个非常简单的应用程序,它有一个输入框和一个按钮。 Input 用于输入email 使用事件处理器订阅按钮 输入电子邮件并点击按钮将进行 api 调用,(此方法有效) subscribe
我正在制作一个非常简单的应用程序,它有一个输入框和一个按钮。 Input 用于输入email 使用事件处理器订阅按钮 输入电子邮件并点击按钮将进行 api 调用,(此方法有效) subscribe
一个星期以来,我一直在努力寻找如何做到这一点,但一直无法做到。我的 html 导航栏看起来像这样。
我们经常在程序设计中用到的数组,同样在脚本中很常用。本节就详细介绍一下数组,以及哈希表在PowerShell中的使用。 数组 在PowerShell中,声明一个变量为数组时,需要使用符号&quo
方法一:先查询出所有记录,然后在逻辑层转化为拼音首字母后查询,显然傻瓜才会这么做。 方法二:在需要搜索的表中添加一个字段用于存放被检索字段内容对应的拼音,在搜索的时候同时去查询这两个字
intellij idea2021是一款java开发神器,功能丰富好用,本文提供其安装包、破解版、补丁、绿色版、激活码等下载,手把手教大家完美安全永久安装破解,亲测绝对可以永久激活。 此方法支持所有的
我在构建一个网站时遇到了一个问题,即我的 h1 内容与我的导航栏重叠。我在 css 中使用了 margin-top 标签,但它不起作用。
前言 时隔2年.(PS:其实陆陆续续在优化,不过没发博客).. .本组件又迎来了新的更新... 很久没更新博客了.生了娃,换了工作单位,太忙了..实在抱歉 NE
为什么 CLGeocoder reverseGeocodeLocation 在查找地址时返回具有不同纬度/经度的地标? 背景:就用户在 map 上“长按”以放置图钉而言,但我的代码对此进行了反向地理编
我是一名优秀的程序员,十分优秀!