add install.txt

this text based install_0.3.txt
This commit is contained in:
qinbo
2010-09-14 09:09:51 +08:00
parent 220e6bfe40
commit c444c16375

210
operation/install.txt Normal file
View File

@@ -0,0 +1,210 @@
1.格式化分区:
swap,linux(ext3、ext2、jfs、xfs、reiserfs),fat
format_partition.sh
输入:
stdin
1)partition:分区
2)filesystem:文件系统类型
输出:
$?
1 argument error
2 lack input (保留不用)
3 deivce node doesn't exist
4 filesystem no implement
127 format partition utils not found
Usage:
单个处理: echo "/dev/sda1 ext2" | ./format_partition.sh
批量处理:文件格式和单个处理一致
说明:需要处理swap分区。
2.挂载分区
mount_partition.sh
输入:
stdin
1)partition:块设备
2)mountpoint:挂载点
3)filesystem:文件系统类型
4)filsystem options:文件系统选项
(这个为可选参数,不传这个参数会有默认的选项:文件系统是ext2|ext3|reiserfs,会以acl的选项挂载,其他则为defaults)
输出:
$?
1 argument error
2 lack input (保留不用)
3 device node doesn't exist
32 mount failure
Usage:
单个处理:echo "/dev/sda1 / ext3" |./mount_partition.sh
批量处理:文件格式和单个处理一致
说明:不处理swap分区。
3.安装软件包:install_pkg.sh
输入:
stdin
1. pkgname
argument:
[--help] show usage
[-s|--source] Package source directory
输出:
$?
1 argument error
2 package in source doesn't exist
Usage:
单个处理:echo "acl" |./install_pkg.sh -s /Rocky/packages
批量处理:文件格式和单个处理一致
说明:
由安装程序生成/var/lib/pkg/db的空文件。
4.配置、生成系统文件:
配置fstab,configure_fstab.sh
输入:
stdin
1)block devices:块设备
2)mount point:挂载点
3)filesystem type:文件系统类型
以下参数为可选参数,如果不指定,会有默认的配置
4)fs_mntops: ext2|ext3|reiserfs的默认配置是acl,其他都是defaults。
5)fs_freq:默认配置:swap是0,其他都是1
6)fs_passno:默认配置:swap是0,其他都是1
输出:
1 fstab doesn't exist
2 lack input (保留不用)
3 device node doesn't exist
Usage:
单个处理:echo "/dev/hda2 /home ext3"|./configure_fstab.sh
批量处理:文件格式和单个处理一致
说明:
需要处理swap
生成issue文件
generate_issue.sh
输入:
argument:
[--help] show usage
[-v|--version] version of OS
[-a|--arch] architecture of OS
[-r|--release] release of OS(base or security)
[-d|--date] date of generate OS
输出:
$?
1 argument error
说明:
1.生成$TARGET/etc/issue文件,一般TARGET=/mnt;
2.不给参数也不给warning,如果只给定了一个参数,那么必须把所有参数补全。
配置网络:
configure_network.sh
输入:
argument:
[-t|--type] \"manual\" or \"dynamic\"
manual argument:
[-h|--hostname] hostname
[-i|--ip] ip address
[-n|--netmask] netmask
[-g|--gateway] gateway
<-d|--domainname> domainname
<-p|--pdns> priamaryDNS
<-s|--sdns> secondaryDNS
<-e|--device> network device. if no configure, default is eth0.
dynamic argument:
[-h|--hostname] hostname
<-e|--device> network device. if no configure, default is eth0.
输出:
$?
1 argument error
2 ip/netmask/gateway address incorrect
3 hosts doesn't exist
4 resolv.conf doesn't exist
5 ifcfg-eth0 doesn't exist
6 network doesn't exist
Usage:
./configure_network.sh -t manual -h QinBo -d in.linx -i 192.168.1.110 -n 255.255.255.0 -g 192.168.1.254 -p 172.16.0.254
说明:
1.type必须为manual或者dynamic;
2.不管哪种type,hostname是必须的;
3.type=manual的时候IP、子网掩码、网关是必须的;
4.device:多网卡的时候,可以指定用哪个网卡,默认用的是eth0。
做自启服务:
mk_serv_autoboot.sh
输入:
stdin
1)package name:软件包名字(自启动服务所在软件包)
2)boot script:启动脚本
3)boot service:需要启动的服务
4)boot number:启动号
输出:
$?
1:argument error
2:boot script doesn't exist
Usage:
单个处理:echo "netkit-base inetd rsh S310"|./mk_serv_autoboot.sh
批量处理:文件格式和单个处理一致
说明:
默认在/etc/rc.d/{rc3.d,rc5.d}建立链接。
5.拷贝kernel、modules和生成initrd
copy_kernels.sh
输入:
无
输出:
无
说明:
1.此脚本从 /Rocky/kernels和/Rocky/modules目录下拷贝kernel和modules,
2.把/Rocky/initrd/initrd.gz,拷贝到硬盘上的/boot/initrd.gz.old,
3.生成initrd调用原来的makeinitrd脚本生成
6.安装完成执行的脚本
exec_finish_install.sh
输入:
stdin
1)脚本的名字
输出:
无
说明:
此脚本把99finish_install.sh拷贝到/var/finish_install目录下,
然后把/var/finish_install目录下面的脚本,按照脚本名字前面
的数字顺序从小到大依次拷贝到硬盘系统里面执行。
99finish_install.sh
原来的firstboot.sh
7.安装bootloader,生成bootloader对应的配置文件
install_bootloader.sh
安装bootloader
输入:
arguments:
[--help] show this message
[-t|--type] boot loader type:grub,etc.
输出:
$?
1 argument error
2 bootloader type doesn't specify
3 bootloader no implement
127 bootloader utils not found
configure_bootloader_cnf.sh
配置bootloader配置文件
输入:
arguments:
[--help] show this message
[-t|--type ] boot loader type:grub,etc.
[-r|--root] partition mount by root
<-b|--boot> partition mount by boot (optional,if the boot is not mount by stand alone)
[-k|--kparameter] kernel parameter
[-o|--osversion] OS version
输出:
$?
1 argument error
2 bootloader type doesn't specify
3 bootloader no implement
4 bootloader configuration file doesn't exist
说明:
1.grub:对grub软件包里面的grub.conf.sample($TARGET/boot/grub/)进行相应的修改,
产生新的文件:$TARGET/boot/grub/menu.lst
2.如果找不到相应设备的UUID则menu.lst使用设备名