已閱讀5頁,還剩2頁未讀, 繼續免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
windows和linux雙系統,設置默認啟動項在終端里輸入:sudo gedit /boot/grub/grub.cfg先裝windows而后裝linux系統,默認啟動項會非常多,執行上面的命令后,會打開一個文檔,里面代碼如下:-( 這些小橫線是我自己加的)# DO NOT EDIT THIS FILE# It is automatically generated by /usr/sbin/grub-mkconfig using templates# from /etc/grub.d and settings from /etc/default/grub# BEGIN /etc/grub.d/00_header #if -s $prefix/grubenv ; then load_envfiset default=8if $prev_saved_entry ; then set saved_entry=$prev_saved_entry save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=truefifunction savedefault if -z $boot_once ; then saved_entry=$chosen save_env saved_entry fifunction recordfail set recordfail=1 if -n $have_grubenv ; then if -z $boot_once ; then save_env recordfail; fi; fiinsmod ext2set root=(hd0,9)search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0fif loadfont /usr/share/grub/unicode.pf2 ; then set gfxmode=640x480 insmod gfxterm insmod vbe if terminal_output gfxterm ; then true ; else # For backward compatibility with versions of terminal.mod that dont # understand terminal_output terminal gfxterm fifiinsmod ext2set root=(hd0,9)search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0fset locale_dir=($root)/boot/grub/localeset lang=zhinsmod gettextif $recordfail = 1 ; then set timeout=-1elseset timeout=10fi# END /etc/grub.d/00_header # BEGIN /etc/grub.d/05_debian_theme #set menu_color_normal=white/blackset menu_color_highlight=black/light-gray# END /etc/grub.d/05_debian_theme # BEGIN /etc/grub.d/10_linux #menuentry Ubuntu, with Linux 2.6.32-31-generic -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-31-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-31-genericmenuentry Ubuntu, with Linux 2.6.32-31-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-31-generic . linux /boot/vmlinuz-2.6.32-31-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-31-genericmenuentry Ubuntu, with Linux 2.6.32-30-generic -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-30-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-30-genericmenuentry Ubuntu, with Linux 2.6.32-30-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-30-generic . linux /boot/vmlinuz-2.6.32-30-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-30-generic insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-24-genericmenuentry Ubuntu, with Linux 2.6.32-24-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-24-generic . linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-24-generic# END /etc/grub.d/10_linux # BEGIN /etc/grub.d/20_memtest86+ #menuentry Memory test (memtest86+) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.binmenuentry Memory test (memtest86+, serial console 115200) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.bin console=ttyS0,115200n8# END /etc/grub.d/20_memtest86+ # BEGIN /etc/grub.d/30_os-prober #menuentry Windows 7 (loader) (on /dev/sda1) insmod ntfs set root=(hd0,1) search -no-floppy -fs-uuid -set de1ca47d1ca45277 chainloader +1# END /etc/grub.d/30_os-prober # BEGIN /etc/grub.d/40_custom # This file provides an easy way to add custom menu entries. Simply type the# menu entries you want to add after this comment. Be careful not to change# the exec tail line above.# END /etc/grub.d/40_custom #menuentry Ubuntu, with Linux 2.6.32-24-generic -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro quiet splash initrd /boot/initrd.img-2.6.32-24-genericmenuentry Ubuntu, with Linux 2.6.32-24-generic (recovery mode) -class ubuntu -class gnu-linux -class gnu -class os recordfail insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f echo Loading Linux 2.6.32-24-generic . linux /boot/vmlinuz-2.6.32-24-generic root=UUID=fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f ro single echo Loading initial ramdisk . initrd /boot/initrd.img-2.6.32-24-generic# END /etc/grub.d/10_linux # BEGIN /etc/grub.d/20_memtest86+ #menuentry Memory test (memtest86+) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.binmenuentry Memory test (memtest86+, serial console 115200) insmod ext2 set root=(hd0,9) search -no-floppy -fs-uuid -set fd9c0f6c-5c20-4d95-b3f4-eebca82bea0f linux16 /boot/memtest86+.bin console=ttyS0,115200n8# END /etc/grub.d/20_memtest86+ # BEGIN /etc/grub.d/30_os-prober #menuentry Windows 7 (loader) (on /dev/sda1) insmod ntfs set root=(hd0,1) search -no-floppy -fs-uuid -set de1ca47d1ca45277 chainloader +1# END /etc/grub.d/30_os-prober # BEGIN /etc/grub.d/40_custom # This file provides an easy way to add custom menu entries. Simply type the# menu entries you want to add after this comment. Be careful not to change# the exec tail line above.# END /etc/grub.d/40_custom #-如上所示,每一個menuentry表示一個啟動項,如:menuentry Windows 7 (loader) (on /dev/sda1) insmod ntfs set root=(hd0,1) search -no-floppy -fs-uuid -set de1ca47d1ca45277 chainloader +1表示win7的啟動項,處于最后一個(本人計算機共有9個啟動項,一般的也可能是7個等等)。若想修改啟動項,只需將紅色標記的部分中的數字做個修改,如set default=8 表示默認啟動項是列表中的第九個,即本人計算機中的win7系統,“0”表示啟動項列表中的第一個。藍色標記的部分set timeout=10表示留10秒的時間供用戶選擇。當然了,如果嫌啟動項太多太麻煩,只需將menuentry及其后面大括號所包含的部分刪除,則相應的啟動項就不會在啟動時出現。還可以采取另外一種辦法:將包含win7啟動項的部分# BEGIN /etc/grub.d/30_os-prober #menuentry
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 南亞跨境互聯網佛教數字鐘聲文化中跨國音源版權爭議-基于斯里蘭卡及泰國佛教數字音頻檔案實證
- 2024年山東康養職業學院高職單招職業適應性測試考試題庫附完整答案詳解(典優)
- 2025年河南省信陽市高職單招職業技能考試模擬試卷(研優卷)附答案詳解
- 2024年馬鞍山職院單招綜合素質考試題庫及完整答案詳解【必刷】
- 2027年河南鄧州職業學院單招職業技能考試模擬試卷完美版附答案詳解
- 2024年潁水職業學院高職單招職業技能考試模擬試卷附參考答案詳解【B卷】
- 2026年陜西扶風職業學院高職單招職業適應性測試考試題庫【網校專用】附答案詳解
- 2025年冀盛職業學院單招綜合素質考試模擬試卷含答案詳解【黃金題型】
- 2026年河南固始職業學院單招職業技能考試題庫及一套答案詳解
- 2026年健康教育知識、行為、基本技能考核試題及答案
- 2024版人教版初中語文九上名著《唐詩三百首》復習題
- GB/T 17623-2026絕緣油中溶解氣體組分含量的氣相色譜測定法
- 2026廣東珠海市斗門區招聘公辦中小學教師134人(編制)考試參考試題及答案解析
- 2026年中國時尚耳夾數據監測研究報告
- 廣西壯族自治區梧州市2026年高三第一次模擬考試物理試卷(含答案解析)
- 2026廣州醫藥集團有限公司春季校園招聘筆試歷年典型考點題庫附帶答案詳解
- 上海市二級注冊建造師繼續教育(建筑工程)考試題庫
- (2025年)市場監管法律知識復習試題考前模擬測試題附答案
- 新疆建設工程消防設計審查、驗收常見問題技術解析(2024年)
- pe管道頂管施工方案
- 《DLT 1231-2018電力系統穩定器整定試驗導則》專題研究報告深度
評論
0/150
提交評論