2013年7月12日 星期五

some file path change on RHEL 6 (1)

部份檔案的位置在 RHEL 6 的時候有了一些轉變,先列出目前遇到的幾個檔案。

/etc/modprobe.conf  
在之前的版本中,寫入 modprobe 參數的位置為 /etc/modprobe.conf
近幾個版本建議把參數改寫在 /etc/modprobe.d/XXXX 底下分類好的檔案中。

[root@local ~]# ll /etc/modprobe.conf
-rw-r--r-- 1 root root 198 Mar  8  2012 /etc/modprobe.conf
[root@local ~]# ll /etc/modprobe.d/
total 32
-rw-r--r-- 1 root root    0 Mar  8  2012 anaconda.conf
-rw-r--r-- 1 root root  833 Oct 12  2010 blacklist-compat
-rw-r--r-- 1 root root  810 Feb 23  2012 blacklist.conf
-rw-r--r-- 1 root root   83 Mar  7  2012 blacklist-firewire

-rw-r--r-- 1 root root 6111 Oct 12  2010 modprobe.conf.dist


在更動 modprobe.d 的資料後,可以執 mkinitrd 把新的設定編譯到之後的 boot image 裡。

mkinitrd -f /boot/initramfs-2.6.32-358.el6.x86_64.XXX.img `uname -r`
## XXX 是跟舊的版本做區隔,把舊的 boot image 留下來之後

在 grub.conf 進行修改,加入新的 boot image 的選項


#boot=/dev/sdb
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Scientific Linux (2.6.32-358.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=e7351324-1408-496b-915a-3de50c8f4a84 nomodeset rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-358.el6.x86_64.XXX.img
title Scientific Linux (2.6.32-358.el6.x86_64)
        root (hd0,0)
        kernel /vmlinuz-2.6.32-358.el6.x86_64 ro root=UUID=e7351324-1408-496b-915a-3de50c8f4a84 nomodeset rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_NO_LVM rd_NO_DM rhgb quiet
        initrd /initramfs-2.6.32-358.el6.x86_64.img



--
rc.local
記載在 rc.local 的指令,會在開機執行一次~~
rhel 6 被 slink 到 /etc/rc.d/rc.local 


[root@local ~]# ll /etc/rc.local 
lrwxrwxrwx. 1 root root 13 May 15 05:18 /etc/rc.local -> rc.d/rc.local

沒有留言:

張貼留言