Linux開機選單修改

之前發生在更新Kali Linux後,同台電腦多重開機的Windows選項居然不見了的事!只好上網找資料解決。其實解法也不難,只是還要找很討厭。為什麼Kali Linux系統更新後,不能自己執行更新GRUB的指令呢?

(一)修改開機OS選項:
1.執行sudo leafpad(Ubuntu下改成nano)  /etc/default/grub。

2.接著修改GRUB_DEFAULT=0的參數值,看看欲開機的OS在選單順序為何?(如果沒出現,可先執行一次sudo update-grub指令)即設該值(注意是0 base)。

3.存檔後記得執行sudo update-grub。

(二)系統更新後原多重開機選單不見:
1.執行sudo update-grub即可。

1 則留言:


  1. 請問前輩:
    我在我的surface pro 電腦上安裝kali系統
    從網路上找的grub
    做更改
    但是還是無法成功的安裝
    可以請前輩幫忙看一下
    是否在那邊出錯了
    以下是grub 更改細節


    set default=0

    loadfont $prefix/dejavu-bold-16.pf2
    loadfont $prefix/dejavu-bold-14.pf2
    loadfont $prefix/unicode.pf2
    set gfxmode=auto
    insmod all_video
    insmod gfxterm
    insmod png

    set color_normal=light-gray/black
    set color_highlight=white/black

    if [ -e /isolinux/splash.png ]; then
    # binary_syslinux modifies the theme file to point to the correct
    # background picture
    set theme=/boot/grub/live-theme/theme.txt
    elif [ -e /boot/grub/splash.png ]; then
    set theme=/boot/grub/live-theme/theme.txt
    else
    set menu_color_normal=cyan/blue
    set menu_color_highlight=white/blue
    fi

    terminal_output gfxterm

    insmod play
    play 960 440 1 0 4 440 1

    # Live boot
    menuentry "Live system" {
    linux /live/vmlinuz-4.15.0-kali2-amd64 boot=live components splash username=root hostname=kali
    initrd /live/initrd.img-4.15.0-kali2-amd64
    }
    menuentry "Live system (fail-safe mode)" {
    linux /live/vmlinuz-4.15.0-kali2-amd64 boot=live components username=root hostname=kali memtest noapic noapm nodma nomce nolapic nomodeset nosmp nosplash vga=normal
    initrd /live/initrd.img-4.15.0-kali2-amd64
    }


    menuentry "Live system (forensic mode)" {
    linux /live/vmlinuz-4.15.0-kali2-amd64 boot=live components splash username=root hostname=kali noswap noautomount
    initrd /live/initrd.img-4.15.0-kali2-amd64
    }
    menuentry "Live system (persistence, check kali.org/prst)" {
    linux /live/vmlinuz-4.15.0-kali2-amd64 boot=live components splash username=root hostname=kali persistence
    initrd /live/initrd.img-4.15.0-kali2-amd64
    }
    menuentry "Live system (encrypted persistence, check kali.org/prst)" {
    linux /live/vmlinuz-4.15.0-kali2-amd64 boot=live components splash username=root hostname=kali persistent=cryptsetup persistence-encryption=luks persistence
    initrd /live/initrd.img-4.15.0-kali2-amd64
    }

    # Installer (if any)
    menuentry "Start installer" {
    linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 quiet net.ifnames=0
    initrd /install/gtk/initrd.gz
    }


    menuentry "Start installer with speech synthesis" {
    linux /install/gtk/vmlinuz speakup.synth=soft video=vesa:ywrap,mtrr vga=788 quiet net.ifnames=0
    initrd /install/gtk/initrd.gz
    }

    submenu 'Advanced options...' {

    # More installer entries (if any)
    menuentry "Install in graphical mode" {
    linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 quiet net.ifnames=0
    initrd /install/gtk/initrd.gz
    }
    menuentry "Install in text mode" {
    linux /install/vmlinuz vga=normal quiet net.ifnames=0
    initrd /install/initrd.gz
    }
    menuentry "Expert install in graphical mode" {
    linux /install/gtk/vmlinuz priority=low video=vesa:ywrap,mtrr vga=788 quiet net.ifnames=0
    initrd /install/gtk/initrd.gz
    }
    menuentry "Expert install in text mode" {
    linux /install/vmlinuz priority=low vga=normal quiet net.ifnames=0
    initrd /install/initrd.gz
    }
    menuentry "Automatic install in graphical mode" {
    linux /install/gtk/vmlinuz auto=true priority=critical video=vesa:ywrap,mtrr vga=788 quiet net.ifnames=0
    initrd /install/gtk/initrd.gz
    }
    menuentry "Automatic install in text mode" {
    linux /install/vmlinuz auto=true priority=critical vga=normal quiet net.ifnames=0
    initrd /install/initrd.gz
    }
    menuentry "Rescue system in graphical mode" {
    linux /install/gtk/vmlinuz rescue/enable=true video=vesa:ywrap,mtrr vga=788 net.ifnames=0
    initrd /install/gtk/initrd.gz
    }
    menuentry "Rescue system in text mode" {
    linux /install/vmlinuz rescue/enable=true vga=normal net.ifnames=0
    initrd /install/initrd.gz
    }


    # Memtest (if any)
    menuentry "memtest86" {
    linux16 /live/memtest
    }


    }

    回覆刪除