============================================UBUNTU /boot /grub /grub.conf檔=========================================== ===
## 不要編輯此檔案
## 它是由grub-mkconfig 使用/etc/grub.d 中的範本
# 和/etc/ default/ 中的設定自動產生的grub
## 開始 /etc/grub.d/00_header
if [ -s $prefix/grubenv ];然後
設定 have_grubenv=true
load_env
fi
#if [ "${next_entry}" ] ; then
設定預設=“${next_entry}”
設定next_entry=
save_env next_entry
設定boot_once=true
else
fi
fi
fi
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"else
menuentry_id_option=""
fi
導出 menuentry_id_option
if [ "${prev_saved_entry}" ]; then
save_env saving_entry
set prev_saved_entry=
save_env prev_saved_entry##conswoo#3_Fv) #3_Fconcepoo#3_Fconce#con#conce#conce#Fvvv ## if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saving_entry
fi
}
function recordfail {
set recordfail=1
##function recordfail {
set recordfail=1
. ” ];那麼如果 [ -z "${boot_once}" ];然後 save_env recordfail;菲; fi
}
function load_video {
if [ x$feature_all_video_module = xy ];接著
insmod all_video
else
insmod efi_gop
insmod efi_uga
# insmod insmod video_cirrus
fi
}
font=unicode
else
#insmod part_msdos
#insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ];然後
搜尋 --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 87f8333a-b6dc -49f7-89f9-ef6a91eb756b
else
搜尋--no-floppy --fs-uuid --set=root 87f8333a-b6dc-49f7-89f9-ef6a91eb756bboo# /share/grub/unicode.pf2"
fi
if loadfont $font ;然後
set gfxmode=auto
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
#ins gettext #if [ "${recordfail}" = 1 ] ; then
設定超時=30
else
if [ x$feature_timeout_style = xy ] ; then
set timeout_style=hidden
set timeout=0
# 備用隱藏逾時程式碼,以防 timeout_style 功能
# 不可用。 then
set timeout=0
fi
fi
END /etc/grub.d/00_header
# BEGIN /etc/grub.d /05_debian_theme
set menu_color_normal=white/black
# END /etc/grub.d/05_debian_theme
##
開始 /etc/grub.d/10_linux
function gfxmode {
set gfxpayload="${1}"
if [gfxpayload="${1}"
if [gfxpayload="${1}"
” ]; then
set vt_handoff=vt.handoff=7
else
. cordfail}" != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
如果 hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ];接著
set linux_gfx_mode=keep
# else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-87f8333a-b6dc-49f7-89f9-ef6a91eb756b' {
recordfail
load_vidolof –offreool mod gzio
insmod part_msdo s
insmod ext2
設定根目錄='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ];然後
搜尋 --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=0,msdos1 --hint-baremetal=ahci0,msdos1 87f8330,msdos1 --hint-baremetal=ahci0,msdos1 87f8333a-b6hd -49f7-89f9-ef6a91eb756b
else
search --no-floppy --fs-uuid --set=root 87f8333a-b66dc-49-78 ## linux /boot/虛擬機-4.4.0-72-通用root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro find_preseed=/preseed.cfg 自動#noprompt 優先級=關鍵區域設定=en_US rd hi -4.4。 .0- 72-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-72-generic-advanced-87f8333a-b6dc-49f7-generic-advanced-87f8333a-b6dc-49f7-89feb-ef6a91756ab' {
記錄失敗
# load_video
insmod gzio
insmod part_msdos
insmod ext2##便宜 if [ x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-72-generic ...'
linux /boot/vmlinuz-4.4.0-72-generic root=UUID=87f8333a-b6-49f7-89290989000優先等級= Critical locale=en_US Quiet
echo '正在載入初始ramdisk ...'
). }
選單項目'Ubuntu,使用Linux 4.4。 -49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
insmod ext2
set root='hd xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-72-generic ...'
linux /boot/vmlinuz-4.4.0-72-generic root=UUID=87f8333a-b6-49f7-89199009f8333a-b6-49f7-89f9090000 700000000 3fk cfg 自動noprompt優先權= 關鍵區域設定= en_US
echo '正在載入初始ramdisk ...'
}
menuentry 'Ubuntu,使用Linux 4.4 .0-66-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-66-generic-advanced-87f8333a-b6dc-49f7-89f -ef6a91eb756b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x $feature_platform_search_hint = xy];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-66-generic ...'
linux /boot/vmlinuz-4.4.0-66-generic root=UUID=87f8333a-b6-49f7-190root=UUID=87f8333a-b6-49f7-09f]優先等級= Critical locale=en_US Quiet
echo '正在載入初始ramdisk ...'
o.> }
選單項目'Ubuntu,使用Linux 4.4。 -49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
insmod ext2
x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-66-通用...'
linux /boot/vmlinuz-4.4.0-66-generic root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro 恢復nomodeset find_preseed=/preutoseed.cfg 關鍵) echo '載入初始ramdisk ...'
initrd /boot/initrd.img-4.4.0-66-generic
}## 項目 0. ubuntu -- class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-64-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b' # dc load_video
gfx模式$linux_gfx_mode
insmod gzio
insmod ext2
set root='hd0,msdos1'
xy 若 [ x$feature_platform_search_hint = xy .然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-64-generic ...'
linux /boot/vmlinuz-4.4.0-64-generic root=UUID=87f8333a-b6-49f7-89f0985 mpt 優先權= Critical locale=en_US Quiet
echo '正在加載初始ramdisk ...'
}
選單項目'Ubuntu,使用Linux 4.4。 49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
insmod ext2
x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-64-generic ...'
linux /boot/vmlinuz-4.4.0-64-generic root=UUID=87f8333a-b6-49f7-89f50900915 cfg 自動noprompt優先權= 關鍵區域設定= en_US
echo '正在載入初始ramdisk ...'
與初始ramdisk ...'
}
menuentry 'Ubuntu,使用Linux 4.4 .0-59-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-59-generic-advanced-87f8333a-b6dc-49f7-89f -ef6a91eb756b' {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod if [ x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-59-generic ...'
linux /boot/vmlinuz-4.4.0-59-generic root=UUID=87f8333a-b6-49f7-194098960優先等級= Critical locale=en_US Quiet
echo '正在載入初始ramdisk ...'
)-p. }
選單項目'Ubuntu,使用Linux 4.4。 -49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
insmod ext2
x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-59-generic ...'
linux /boot/vmlinuz-4.4.0-59-generic root=UUID=87f8333a-b6-49f7-190098009f8333a-b6-49f7-19f909000000 cfg auto noprompt優先權=關鍵區域= en_US
echo '正在載入初始ramdisk ...'
}
menuentry 'Ubuntu, with Linux 4.4 .0-57-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-57-generic-advanced-87f8333a-b6dc-49f7-89f9- ef6a91eb756b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$ feature_platform_search_hint = xy];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-57-通用...'
linux/boot/vmlinuz-4.4.0-57基因root = uuid = uuid = 87f8333a-b6dc-49f7-89f7-89f9-ef6a91eb756b ro find_preseed =/preseed =/presf. ...'
initrd /boot/initrd.img-4.4.0-57-generic
/initrd.img-4.4.0-57-generic
}
10- ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-57-generic-recovery-87f8333a-b6dc-49f7-89f9-ef6a91eb756b' {#n 載入視頻
insmod gzio
insmod part_msdos
# set root='hd0,msdos1'
if [ x $feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '中使用Linux 4.4 .0-57-generic ...'
linux /boot/vmlinuz-4.4.0-57-generic root=UUID=87f8333a-b6-49f7-19009609000 yw cfg 自動noprompt優先順序=關鍵區域= en_US
echo '正在載入初始ramdisk ...'
}
menuentry 'Ubuntu, with Linux 4.4 .0-53-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-53-generic-advanced-87f8333a-b6dc-49f7-89f9- ef6a91eb756b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$ feature_platform_search_hint = xy];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-53-generic ...'
linux /boot/vmlinuz-4.4.0-53-generic root=UUID=87f8333a-b6-49f7-1940989000優先等級= Critical locale=en_US Quiet
echo '正在載入初始ramdisk ...'
. }
選單項目'Ubuntu,使用Linux 4.4。 -49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
# insmod ext2
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy if [ x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-53-generic ...'
linux /boot/vmlinuz-4.4.0-53-generic root=UUID=87f8333a-b6-49f7-190098009f8333a-b6-49f7-890900 cfg auto noprompt優先權=關鍵區域設定= en_US
echo '正在載入初始ramdisk ...'
}
menuentry 'Ubuntu,使用Linux 4.4 .0-45-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-45-generic-advanced-87f8333a-b6dc-49f7-89f -ef6a91eb756b' {
recordfail
load_video
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x $feature_platform_search_hint = xy];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-45-generic ...'
linux /boot/vmlinuz-4.4.0-45-generic root=UUID=87f8333a-b6-49f7-190root=UUID=87f8333a-b6-49f7-09f]優先等級= Critical locale=en_US Quiet
echo '正在載入初始ramdisk ...'
o.hed }
選單項目'Ubuntu,使用Linux 4.4。 -49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
insmod ext2
x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-45-通用...'
linux /boot/vmlinuz-4.4.0-45-generic root=UUID=87f8333a-b6dc-49f7-89f9-ef6a91eb756b ro 恢復nomodeset find_preseed=/preseed.cfgf noutop echo '載入初始ramdisk ...'
initrd /boot/initrd.img-4.4.0-45-generic
}## 項目 2140,0006 月 40,0006,000 30000 300,000 選單ubuntu -- class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.4.0-42-generic-advanced-87f8333a-b6dc-49f7-89f9-ef6a91eb756b' # dc load_video
gfx模式$linux_gfx_mode
insmod gzio
insmod ext2
set root='hd0,msdos1'
xy 若 [ x$feature_platform_search_hint = xy .然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-42-generic ...'
linux /boot/vmlinuz-4.4.0-42-generic root=UUID=87f8333a-b6-49f7-8920989190830優先等級= Critical locale=en_US Quiet
echo '正在載入初始ramdisk ...'
). }
選單項目'Ubuntu,使用Linux 4.4。 -49f7-89f9 -ef6a91eb756b' {
recordfail
load_video## insmod part_msdos
insmod ext2
x$feature_platform_search_hint = xy ];然後
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos -49f7-89f9-ef6a91eb756b
else
91eb756b
fi
echo '上加.0-42-generic ...'
linux /boot/vmlinuz-4.4.0-42-generic root=UUID=87f8333a-b6-49f7-8919990000700000 ywnofk-49 cfg auto noprompt優先權=關鍵區域設定= en_US
echo '正在載入初始ramdisk ...'
}
}
結束/etc/grub.d/10_linux
開始/etc/grub.d/20_linux_xen
BEGIN /etc/grub.d/20_memtest86+
menuentry '記憶體測試 (memtest86+)' {
insmod part_msdos#> '
如果[ x$feature_platform_search_hint = xy ];然後
搜尋 --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=0,msdos1 --hint-baremetal=ahci0,msdos1 87f8330,msdos1 --hint-baremetal=ahci0,msdos1 87f8333a-b6hd -49f7-89f9-ef6a91eb756b
else
search --no-floppy --fs-uuid --set=root 87f8333a-b66dc-49-78 ## knetbsd /啟動/memtest86+ .elf
}
menuentry '內存測試(memtest86+,串行控制台115200)' {
insmod part_msdos
insmod ext2
set root='hd0,msdos1'
if [ x$ feature_platform_search_hint = xy ];然後
搜尋 --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=0,msdos1 --hint-baremetal=ahci0,msdos1 87f8330,msdos1 --hint-baremetal=ahci0,msdos1 87f8333a-b6hd -49f7-89f9-ef6a91eb756b
else
search --no-floppy --fs-uuid --set=root 87f8333a-b66dc-49-78 ## linux16 /boot/內存測試86+ .bin console=ttyS0,115200n8
}
結束/etc/grub.d/20_memtest86+
開始/etc/grub.d/30_uefi-firmware
# END /etc/grub.d/30_uefi-firmware
BEGIN /etc/grub.d/40_custom
# 此檔案提供了新增自訂選單的簡單方法項目。 只需在此註釋後鍵入您要新增的
# 選單項目即可。 小心不要更改上面的'exec tail' 行。
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; thensource $prefix/custom.cfg;
fi END /etc/grub.d/41_custom ## ==== ==================================================== = ========================================default=數字:預設啟動的網絡,數字0表示第一個標題,1表示第二個,諸如此類以推;timeout=數字:一般選項介面出現的時間,單位秒; root(安裝):指定核心或作業系統所在的磁碟與分割區,格式為(hdx,y),其中x表示第x個磁碟,y表示第y個分割區,如root(hd0,1);initrd 檔案:制定係統載入時所需的記憶體磁碟以映像,同樣的,檔案所在的位置必須在根目錄所定義的磁碟上;========= == ================================================== === ===============================運行等級#Linux的運作系統(運作等級)共7個,0:關機;1:單人模式;2/3/4/5:因不同的發行商數而異;Feroda:2-->缺少部分網路功能的文字介面模式,3-->完整功能的文字介面模式,4-->保留,可自訂;5-->完整功能的圖形介面模式;6:重新啟動系統;=============================== = =================================================== =====================######過程解析######BIOS---”stage1---》stage1.5 -- -》stage2---》vmlinuxz---》initrd---》讀取/etc/event.d/rc-default-----未定義/etc/inittab>啟動runlevel2----- -- -----------|----》啟動畫面###### |_____定義/etc/ inittab(預設)>依據/etc/inittab定義的runlevel進行啟動---|######===================== == = ======================= ========###
以上是ubuntu_linux /boot/grub/grub.conf解析的詳細內容。更多資訊請關注PHP中文網其他相關文章!