從隨身碟無人值守安裝linux作業系統

來源:互聯網
上載者:User

簡介:這是從隨身碟無人值守安裝linux作業系統的詳細頁面,介紹了和php,有關的知識、技巧、經驗,和一些php源碼等。

class='pingjiaF' frameborder='0' src='http://biancheng.dnbcw.info/pingjia.php?id=329775' scrolling='no'>

http://qubaoquan.blog.51cto.com/1246748/305623本文的目的是:實現從隨身碟無人值守安裝Linux作業系統環境說明:1個4G的隨身碟(根據自己的作業系統ISO大小來定),本文實驗的作業系統是RHEL4.8-x86_64-AS-DVD.iso,
這個ios可能是最小的了所以選擇了這個(2.6個G)就是因為我的隨身碟太小了,只要隨身碟能改裝下,作業系統自選,另外需要兩台伺服器,一台做伺服器端用
來建立分區,拷貝檔案,一台做測試機用來測試隨身碟安裝,還有有一台windows作業系統用來引導寫mbr伺服器上操作: 1.
首先建立
ISO
掛載點[root@tomcat1 srv]# mkdir -p /mnt/iso/ 2


掛載作業系統的
ISO[root@tomcat1 srv]# mount -o loop RHEL4.8-x86_64-AS-DVD.iso /mnt/iso/ 3

U
盤分區(本環境被識別為
/dev/sdb
[root@tomcat1 srv]# fdisk /dev/sdb首先建立一個分區(格式化成dos分區)用來存放開機檔案分了400多M然後剩下的空間全部分給/dev/sdb2,存放iso檔案查看分區結果儲存退出 4


建立兩個掛載
U
盤的掛載點[root@tomcat1 srv]# mkdir -p mnt/usb1[root@tomcat1 srv]# mkdir -p mnt/usb2 5


格式化第一個分區成
dos
分區[root@tomcat1 srv]# mkfs.msdos /dev/sdb1 6


格式化第二個分區為
ext2
分區(因為
syslinux
暫不支援
ext3
檔案系統)[root@tomcat1 srv]# mkfs.ext2 /dev/sdb2 7


分別掛載[root@tomcat1 srv]# mount /dev/sdb1 /mnt/usb1[root@tomcat1 srv]# mount /dev/sdb2 /mnt/usb2 8


查看本地分區情況[root@tomcat1 srv]# df �lh 9


移動
isolinux
目錄到
dos
分區並且重新命名[root@tomcat1 srv]# cp -a /mnt/iso/isolinux/ /mnt/usb1/syslinux 10
.拷貝自動安裝讀取的檔案到
dos
分區[root@tomcat1 srv]# cp -a /root/anaconda-ks.cfg /mnt/usb1 11


複製系統
ISO
檔案[root@tomcat1 srv]# cp -a RHEL4.8-x86_64-AS-DVD.iso /mnt/usb2 12


進去
dos
分區重新命名檔案並且編輯[root@tomcat1 srv]# cd /mnt/usb1/syslinux/[root@tomcat1 syslinux]# mv isolinux.cfg syslinux.cfg[root@tomcat1 syslinux]# chmod +w syslinux.cfg(原本為唯讀檔案)[root@tomcat1 syslinux]# vi syslinux.cfg把修改為 13


然後修改自動啟動的設定檔[root@tomcat1 syslinux]# cd /mnt/usb1[root@tomcat1 usb1]# vi anaconda-ks.cfg# Kickstart file automatically generated by anaconda.installharddrive --partition=sdb2 --dir=lang en_US.UTF-8keyboard ustextrootpw 123456firewall --enabled --port=22:tcpauthconfig --enableshadow --enablemd5selinux --disabledtimezone --utc America/New_Yorkbootloader --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=20000part /var --fstype ext3 --size=20000part /usr --fstype ext3 --size=20000part /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在windows作業系統操作 1.

linux
伺服器上把
U
盤拔出插在
windows
上,本文配識別為
I
2.
拷貝
syslinux.exe
到系統目錄,最後路徑為 3.

dos
命令裡執行命令開始寫
mbr在測試機上測試設定測試機的啟動順序是從隨身碟啟動,啟動後如果沒錯誤會彈出紅帽子的安裝介面然後再boot後輸入:ks並且斷行符號即可完成安裝系統

“從隨身碟無人值守安裝linux作業系統”的更多相關文章 》

愛J2EE關注Java邁克爾傑克遜視頻站JSON線上工具

http://biancheng.dnbcw.info/php/329775.html pageNo:12

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.