Introduction: This is a detailed page from the unattended installation of Linux operating system on a USB flash drive. It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.php? Id = 329775 'rolling = 'no'>
According to their own operating system ISO size, the operating system tested in this paper is rhel4.8-x86_64-AS-DVD.iso,
This IOS may be the smallest, so I chose this (2.6 GB) because my USB flash drive is too small. As long as the USB flash drive can be modified, the operating system will choose the preferred one, and two additional servers will be required, one Server
To create partitions and copy files. One test machine is used to test the installation of a USB flash drive, and one Windows operating system is used to guide the operation on the MBR Server:
1.
Create
ISO
Mount point[Root @ tomcat1 SRV] # mkdir-P/mnt/ISO/
2
.
Mount
ISO[Root @ uninstall AT1 SRV] # Mount-o loop rhel4.8-x86_64-AS-DVD.iso/mnt/ISO/
3
To
U
Disk Partition (this environment is recognized
/Dev/SDB
)[Root @ tomcat1 SRV] # fdisk/dev/SDB first create a partition (formatted as a DOS partition) it is used to store the Startup file, which is divided into more than 400 mb, and all the remaining space is allocated to/dev/sdb2. It stores the ISO file and views the partition result. Save and exit.
4
.
Create two mounts
U
Disk mount point[Root @ tomcat1 SRV] # mkdir-p mnt/usb1 [root @ tomcat1 SRV] # mkdir-p mnt/usb2
5
.
Format the first partition
DoS
Partition[Root @ cmdat1 SRV] # mkfs. msdos/dev/sdb1
6
.
Format the second partition
Ext2
Partition (because
Syslinux
Currently not supported
Ext3
File System)[Root @ mongoat1 SRV] # mkfs. ext2/dev/sdb2
7
.
Separate mounting[Root @ tomcat1 SRV] # Mount/dev/sdb1/mnt/usb1 [root @ tomcat1 SRV] # Mount/dev/sdb2/mnt/usb2
8
.
View local partition information[Root @ tomcat1 SRV] # DF-lH
9
.
Mobile
Isolinux
Directory
DoS
Partition and rename[Root @ tomcat1 SRV] # cp-A/mnt/ISO/isolinux // MNT/usb1/syslinux
10
. Copy the files automatically installed and read
DoS
Partition[Root @ cmdat1 SRV] # cp-A/root/anaconda-ks.cfg/mnt/usb1
11
.
Replication System
ISO
File[Root @ cmdat1 SRV] # cp-A rhel4.8-x86_64-AS-DVD.iso/mnt/usb2
12
.
Go in
DoS
Rename a partition file and edit it[Root @ tomcat1 SRV] # cd/mnt/usb1/syslinux/[root @ tomcat1 syslinux] # mv isolinux. CFG syslinux. CFG [root @ tomcat1 syslinux] # chmod + W syslinux. CFG (originally a read-only file) [root @ tomcat1 syslinux] # vi syslinux. CFG:
13
.
Then modify the Automatic startup configuration file.[Root @ cmdat1 syslinux] # cd/mnt/usb1 [root @ cmdat1 usb1] # vi anaconda-ks.cfg # Kickstart file automatically generated by Anaconda. installharddrive -- partition = sdb2 -- dir = Lang en_US.UTF-8keyboard ustextrootpw 123456 firewall -- enabled -- Port = 22: tcpauthconfig -- enableshadow -- partition -- disabledtimezone -- UTC America/snapshot -- location = partition -- driveorder = SDA # The following is the partition information you requested # note that any partitions you deleted are not expressed # here So unless you clear all partitions first, this is # not guaranteed to workclearpart -- linuxpart/-- fstype ext3 -- size = 20000 part/var -- fstype ext3 -- size = 20000 part/usr -- fstype ext3 -- size = 20000 part/Data -- fstype ext3 -- size = 1 -- growpart swap -- size = 4096% packages @ development-libs @ system-tools @ core @ base @ network-server @ admin-tools @ development-toolsauditkexec- toolsdevice-mapper-multipathimake in Windows
1.
Slave
Linux
Put
U
Disk plugging
Windows
The configuration in this article is identified
I
Disk
2.
Copy
Syslinux.exe
To the system directory, the last path is
3.
In
DoS
Command to start writing
MBROn the test machine, test and set the boot sequence of the test machine to start from the USB flash disk. If you are correct after the startup, the Red Hat installation interface will pop up, and then enter "Ks" after boot, and press enter to complete the system installation.
More articles on "unattended Linux operating system installation from USB flash drives"
Love J2EE follow Java Michael Jackson video station JSON online tools
Http://biancheng.dnbcw.info/php/329775.html pageno: 12.