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

Tristan Cohan avatar
By Tristan Cohan
at 2017-12-01T08:15

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

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

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

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

--
Tags: Linux

All Comments

Gilbert avatar
By Gilbert
at 2017-12-02T17:20
Belly avatar
By Belly
at 2017-12-06T08:59
檔案方面可用unionfs或overlayfs,取代cp
Caroline avatar
By Caroline
at 2017-12-08T00:31
不過單純替換核心不會有相依性問題嗎?
Olivia avatar
By Olivia
at 2017-12-12T21:29
kernel的有些預設值不同 可能會有問題
Jake avatar
By Jake
at 2017-12-14T09:20
最近遇到的是cifs的vers 4.12和4.13不一樣 會有mount問題
Andy avatar
By Andy
at 2017-12-16T04:27
想問下這樣用的時機點是? 虛擬機?
George avatar
By George
at 2017-12-16T11:44
可能舊kernel不認識新硬體吧xd
Zora avatar
By Zora
at 2017-12-20T06:55
後來發覺只單換Kernel有問題,更新步驟

使用mount, 並修改檔案擁有者權限

Caitlin avatar
By Caitlin
at 2017-11-29T00:23
請問一下各位 我有兩個機器 A機器(192.168.1.1) 會掛載 B機器(192.168.1.2)的share目錄 mount -t nfs 192.168.116.2:/share /temp chmod -R o+w /temp (A機器) chmod -R o+w /share (B機器) c ...

複製個PTT站應該很簡單?

Jack avatar
By Jack
at 2017-11-28T16:13
※ 引述《zi98btcc (幼斤)》之銘言: : 就像我們自組電腦一樣,先買: : a.作業系統光碟 : b.硬體(cpu ram HD 組起來) : 然後再把a灌進b安奘好就是一台可用電腦, : 架個PTT站也是一樣,只不過換成: : a.bbs系統程式碼 : b.租用vps : 一樣把a安裝到b就架好P ...

Centos 7 (1611)看不到圖形介面

Yuri avatar
By Yuri
at 2017-11-28T15:18
大家好: 想請問我的電腦是ASUS MD590 i5 7thGen 原本要裝centos7 1708 結果不能安裝,Centos6.7也不能裝, 廠商跟我說因為處理器的關係,所以我又搜尋跑去找Cenos7 1611 原本安裝完成後一切美好..但是過了2、3個月,用桌機登入root後桌面 卻出現黑畫面 ...

c shell script不會return

Eden avatar
By Eden
at 2017-11-28T14:51
最近剛學寫shelll script本身學過 c和java 是有程式的背景的 #! /bin/csh echo and#34;Hello World! \a \nand#34; exit 0 寫了一個hello world Script確實會show “hello world,” 也會停止 但在我朋友的 ...

konsole中無法使用gcin

Belly avatar
By Belly
at 2017-11-28T14:15
os是kubuntu 17.10,安裝語言是英文 想在konsole使用gcin詞音,但沒辦法切換,先換好再輸入也沒有中文。 安裝了gcin-qt5-module 並在 bashrc 中 export QT5_IM_MODULE=gcin 但還是不行,請問該怎麼辦呢? ----- Sent from ...