自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

闡述備份Linux內(nèi)核步驟

運(yùn)維 系統(tǒng)運(yùn)維
隨著學(xué)習(xí)Suse的深入,面臨的問(wèn)題也是越來(lái)越多,Suse編譯內(nèi)核是非常頭疼的,今天編譯Suse 10.2內(nèi)核直接導(dǎo)致Suse面臨重裝,要是備份Linux內(nèi)核就好了,本文就是介紹備份Linux內(nèi)核的簡(jiǎn)單步驟。

隨著學(xué)習(xí)Suse的深入,面臨的問(wèn)題也是越來(lái)越多,Suse編譯內(nèi)核是非常頭疼的,今天編譯Suse 10.2內(nèi)核直接導(dǎo)致Suse面臨重裝,要是備份Linux內(nèi)核就好了,備份Linux內(nèi)核相當(dāng)?shù)暮?jiǎn)單,下面就是步驟,英文也很簡(jiǎn)單,相信準(zhǔn)備對(duì)內(nèi)核有所動(dòng)作的人都能輕易看懂。雖然是針對(duì)Suse寫的,其它Linux發(fā)行版本也大同小異,下面就是備份Linux內(nèi)核的簡(jiǎn)單步驟:

 

  1. 1) open terminal  
  2.  
  3. 2) su to root  
  4.  
  5. 3) change directory to /boot  
  6. #cd /boot  
  7.  
  8. 4) see what are the names of running kernels  
  9. #ls  
  10.  
  11. 5) make backup copy of your kernel and System.map  
  12. #cp vmlinuz-2.6.18.8-0.1-default vmlinuz-2.6.18.8-0.1-bak  
  13. #cp System.map-2.6.18.8-0.1-default System.map-2.6.18.8-0.1-bak  
  14. #cp -R /lib/modules/2.6.18.8-0.1-default /lib/modules/2.6.18.8-0.1-bak  
  15.  
  16. 6) create initrd  
  17. #mkinitrd -s 1024×768  
  18.  
  19. 7) check if new initrd was created:  
  20. #ls  
  21. and look for initrd-2.6.18.8-0.1-bak  
  22.  
  23. 8) make backup of your current GRUB menu (in the case that you may screw up editing)  
  24. #cp /boot/grub/menu.lst /boot/grub/menu.lst_bak  
  25.  
  26. 9) edit grub menu whatever editor (I use vi, but you may use kedit.gedit, joe, pico and so on as long as you run editor with root privileges)  
  27. boot/grub/menu.lst  
  28.  
  29. 10) add new entry at the end of the file (copy original entry for Suse Linux 10.2):  
  30. title Suse Linux 10.2 kernel backup  
  31. root (hd0,0)  
  32. kernel /vmlinuz-2.6.18.8-0.1-bak root=/dev/sda2 vga=0×317 vga=normal video=vesa:1024×768@60 resume=/dev/sda3 elevator=deadline splash=silent showopts  
  33. initrd /initrd-2.6.18.8-0.1-bak  
  34. important changes are marked bold. You may not have the other stuff or it may be different. Simply keep the rest of the file exactly the same as in the original entry for Suse Linux 10.2  
  35.  
  36. 11) save the file  
  37.  
  38. 12) restart computer and select from GRUB menu “Suse Linux 10.2 kernel backup”  
  39. if system boots successfully you have working kernel backup, now if Suse updates kernel next time and new kernel will not boot properly, you can always boot to Suse Linux 10.2 kernel backup which will never be modified (and safe from screwed updates)  
  40.  
  41. 舉一反三的令一種方法:  
  42. ideally would be do something different:  
  43. 1) install kernel sources  
  44.  
  45. 2) su to root  
  46.  
  47. 3) copy kernel sources to the new direcory:  
  48. #cp -R /usr/src/Linux-2.6.18.8-0.1 /usr/src/Linux-2.6.18.8-0.1-bak  
  49.  
  50. 4) change directory to /usr/src/Linux-2.6.18.8-0.1-bak  
  51. #cd /usr/src/Linux-2.6.18.8-0.1-bak  
  52.  
  53. 5) create config file  
  54. #make oldconfig  
  55.  
  56. 6) change kernel name (super important!!!)  
  57. by editing .config file (in /usr/src/Linux-2.6.18.8-0.1-bak) Tehre is a dot before “config”  
  58. scroll down to the line:  
  59. #  
  60. # General setup  
  61. #  
  62. CONFIG_LOCALVERSION=”"  
  63. and change local kernel name version by adding:  
  64. CONFIG_LOCALVERSION=”-bak”  
  65. if there is anything already written in the line  
  66. CONFIG_LOCALVERSION=”"  
  67. delete old name remember that new name must have quotation marks.  
  68.  
  69. 7) save file  
  70.  
  71. 8) compile kernel  
  72. #make bzImage && make modules && make modules_install && make install  
  73. You just created a new kernel! Exactly the same as the running one but the name will have “-bak” at the end  
  74. there is nothing more required. in your GRUB menu will appear a new entry pointing to the new kernel. Old kernel will not be affected (if you did exactly as I suggested)  
  75. new kernel is invisible to Yast and will never be changed.  
  76. Because the latest kernel upgrade is a real disaster I would make backup copy of grub menu (as root):  
  77. #cp /boot/grub/menu.lst /boot/grub/menu.lst_bak  
  78. now you can boot to the new kernel  
  79. you will get to command line (when booting to the new kernel) if you installed nvidia/ati drivers,  
  80. That is easy to fix of course. what is important, you have working Suse setup in spite of all Suse devs efforts to screw you up  

通過(guò)我的介紹,這篇簡(jiǎn)單的備份Linux內(nèi)核的文章會(huì)對(duì)你有幫助。其實(shí)我的主要目的就是提醒各位應(yīng)用Linux的朋友,記得要備份Linux內(nèi)核。

【編輯推薦】

  1. SUSE Linux 10的虛擬化:Xen
  2. 實(shí)操Suse防火墻配置
  3. Suse Linux整理大全:快捷鍵
  4. 學(xué)習(xí)手札:加強(qiáng)Suse Linux操作系統(tǒng)安全
  5. 詳解Suse Postfix配置解法
責(zé)任編輯:小霞 來(lái)源: eNet硅谷動(dòng)力
相關(guān)推薦

2009-12-17 14:24:39

Linux內(nèi)核

2009-01-30 21:56:00

2009-12-09 14:15:39

2010-03-10 14:48:24

2009-12-14 10:47:34

Linux makef

2009-12-02 14:09:52

2009-11-30 10:54:59

solaris命令

2009-12-21 14:33:11

2009-12-10 10:25:12

Linux觸摸屏驅(qū)動(dòng)

2009-12-14 13:14:57

2009-12-25 17:15:03

Linux內(nèi)存

2009-12-23 10:50:57

Linux chmod

2009-12-01 18:41:08

SUSE Linux

2009-12-22 15:12:33

Linux擴(kuò)展文件系統(tǒng)

2010-01-07 14:39:37

Linux配置遠(yuǎn)程桌面

2009-12-17 09:56:26

Linux添加驅(qū)動(dòng)模塊

2021-02-20 06:08:07

LinuxWindows內(nèi)核

2009-12-16 15:59:13

Linux設(shè)備文件管理

2010-01-07 13:27:22

Linux驅(qū)動(dòng)程序

2009-12-11 10:02:46

Linux內(nèi)存管理
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)