(20180210更新) 更換/新Linux ISO/光碟內建Kernel - Linux

Table of Contents

Wordpress短網址:https://goo.gl/iQmd2h

之前就有想過要這樣做

但是一直懶懶的

只是這次老闆剛好交代下來想要做一片這樣的東西

經歷一個周末的燒腦外加不斷打擾有RHCE的同學下

一直撞牆下的產物就這樣產生了

資料除了參考同學還有參考國外CentOS Forum

無圖無音樂無廣告網誌網址:

http://mabospace.myds.me/?p=335

CMD如下

此處以rhel7.2做範例


# mount –o loop rhel.iso /mnt/iso

# cp -ri /mnt/iso/* /mnt/new-media/

# cp -ri /mnt/iso/.discinfo /mnt/new-media/

# cp -ri /mnt/iso/.treeinfo /mnt/new-media/

# rm –rf /mnt/new-media/Packages/kernel-3.10.0-327.el7.x86_64.rpm

( Need to remove all rpm that starts with “kernel”, this step needs to
compare with the latest kernel packages files that you downloaded. In this
case, my downloaded packages are as attached screenshot )

# cp kernel-lt-4.4.102-1.el7.elrepo.x86_64.rpm /mnt/new-media/Packages/

( Need to cp all downloaded kernel related file )

# rm -rf /mnt/new-media/Packages/TRANS.TBL

# cp /mnt/new-media/repodata/*-comps-Server.x86_64.xml
/tmp/comps-Server.x86_64.xml

# cd /mnt/new-media/

# createrepo -v –update -d –unique-md-filenames -g
/tmp/comps-Server.x86_64.xml .

# mkisofs -r -T -J -V “RHEL-7.2 Server.x86_64” -b isolinux/isolinux.bin -c
isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o
../rhel-server7.2-x86_64-dvd.iso .



Note:parameter comes after “-V” must match with inst.stage2= parameter in
isolinux.cfg

---------------------------------------------

目前裝在公司測試機上面跑是暫時沒問題

不曉得站上有沒有前輩有其他更好的做法之類的還請指教

--

All Comments

Gilbert avatarGilbert2017-12-02
Belly avatarBelly2017-12-06
檔案方面可用unionfs或overlayfs,取代cp
Caroline avatarCaroline2017-12-08
不過單純替換核心不會有相依性問題嗎?
Olivia avatarOlivia2017-12-12
kernel的有些預設值不同 可能會有問題
Jake avatarJake2017-12-14
最近遇到的是cifs的vers 4.12和4.13不一樣 會有mount問題
Andy avatarAndy2017-12-16
想問下這樣用的時機點是? 虛擬機?
George avatarGeorge2017-12-16
可能舊kernel不認識新硬體吧xd
Zora avatarZora2017-12-20
後來發覺只單換Kernel有問題,更新步驟