六月丁香五月婷婷,丁香五月婷婷网,欧美激情网站,日本护士xxxx,禁止18岁天天操夜夜操,18岁禁止1000免费,国产福利无码一区色费

學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > Ubuntu怎么刪除grub

Ubuntu怎么刪除grub

時(shí)間: 春健736 分享

Ubuntu怎么刪除grub

  在安裝windows后安裝的ubuntu雙系統(tǒng),在啟動(dòng)時(shí)候都會(huì)固定先顯示grub選擇菜單,可以選擇不同版本的ubuntu的kernel來(lái)啟動(dòng),可是Ubuntu怎么刪除grub呢?下面跟著學(xué)習(xí)啦小編一起來(lái)了解一下吧。

  Ubuntu怎么刪除grub

  1、用Windows7光盤啟動(dòng)系統(tǒng)后會(huì)讓你選擇語(yǔ)言,默認(rèn)的或者自己隨便選一下后按下一步;

  2、在下一個(gè)界面會(huì)提示安裝Windows,此時(shí)選擇左下角的修復(fù)計(jì)算機(jī);

  3、等待系統(tǒng)找到Windows7系統(tǒng)后按下一步;

  4、選擇最后一個(gè)“Command Prompt”;

  注:以上圖片上傳到紅聯(lián)Linux系統(tǒng)教程頻道中。

  5、在彈出的命令行對(duì)話框中輸入“bootrec.exe[空格]/fixmbr",按下回車后就已經(jīng)刪除了grub,很快。

  退出光盤重啟計(jì)算機(jī)后系統(tǒng)就已經(jīng)自動(dòng)進(jìn)入Windows7了。

  bootrec.exe 的其他參數(shù):

  * /FixMbr. Re-writes the master boot record (MBR) of the system partition to start Windows Vista. This won’t overwrite the existing partition table.

  * /FixBoot. Writes a boot sector onto the system partition to start Windows Vista.

  * /ScanOs. Scans all disks for Windows Vista installations and displays them to you. Oddly, this didn’t work for me, even on a test system that was starting just fine.

  * /RebuildBcd. Scans all disks for Windows Vista installations and prompts you to pick the ones you want to add to the BCD.

  ubuntu 顯示或者隱藏 grub選擇菜單

  1. 啟動(dòng)時(shí)候一直按住shift鍵

  以前的Ubuntu版本,啟動(dòng)grub的時(shí)候,有一個(gè)grub loading,press ESC to get the menu的提示,所以按ESC就可以看到grub界面

  現(xiàn)在的Ubuntu沒(méi)有了,現(xiàn)在的做法是,啟動(dòng)的時(shí)候按住shift鍵,就可以看到grub界面了。

  (接下來(lái)就修改啟動(dòng)參數(shù),加入single,然后按ctrl+x啟動(dòng),就能看到一個(gè)ncurse的界面,選擇drop to root prompt,就可以得到一個(gè)root的terminal然后就可以重新設(shè)置root口令了)

  2. 修改grub文件來(lái)完成

  點(diǎn)擊(此處)折疊或打開(kāi)1.sudo gedit /etc/default/grub

  修改如下:

  GRUB_HIDDEN_TIMEOUT=0

  #GRUB_HIDDEN_TIMEOUT_QUIET=true

  GRUB_TIMEOUT=0

  2.sudo update-grub

  下面展開(kāi)說(shuō)明:

  首先修改 /etc/default/grub.cfg文件,參考以下config文件注釋掉GRUB_HIDDEN_TIMEOUT=0

  點(diǎn)擊(此處)折疊或打開(kāi)# If you change this file, run 'update-grub' afterwards to update

  # /boot/grub/grub.cfg.

  # For full documentation of the options in this file, see:

  # info -f grub -n 'Simple configuration'

  GRUB_DEFAULT=0

  #GRUB_HIDDEN_TIMEOUT=0

  GRUB_HIDDEN_TIMEOUT_QUIET=true

  GRUB_TIMEOUT=10

  GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

  GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

  GRUB_CMDLINE_LINUX=""

  # Uncomment to enable BadRAM filtering, modify to suit your needs

  # This works with Linux (no patch required) and with any kernel that obtains

  # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

  #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

  # Uncomment to disable graphical terminal (grub-pc only)

  #GRUB_TERMINAL=console

  # The resolution used on graphical terminal

  # note that you can use only modes which your graphic card supports via VBE

  # you can see them in real GRUB with the command `vbeinfo'

  #GRUB_GFXMODE=640x480

  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

  #GRUB_DISABLE_LINUX_UUID=true

  # Uncomment to disable generation of recovery mode menu entries

  #GRUB_DISABLE_RECOVERY="true"

  # Uncomment to get a beep at grub start

  #GRUB_INIT_TUNE="480 440 1"

  然后執(zhí)行"sudo update-grub"。這樣以后在grub.cfg中會(huì)多出以下代碼

  點(diǎn)擊(此處)折疊或打開(kāi)### BEGIN /etc/grub.d/30_os-prober ###

  if [ "x${timeout}" != "x-1" ]; then

  if keystatus; then

  if keystatus --shift; then

  set timeout=-1

  else

  set timeout=0

  fi

  else

  if sleep --interruptible 3 ; then

  set timeout=0

  fi

  fi

  fi

  ### END /etc/grub.d/30_os-prober ###

  最后簡(jiǎn)單介紹下其中的幾個(gè)參數(shù)

  點(diǎn)擊(此處)折疊或打開(kāi)1.GRUB_HIDDEN_TIMEOUT=0

  此配置將影響菜單顯示。若設(shè)置此選項(xiàng),將在此時(shí)間內(nèi)隱藏菜單而顯示引導(dǎo)畫面。

  菜單將會(huì)被隱藏,除非在此行開(kāi)頭加上一個(gè) # 符號(hào)。(# GRUB_HIDDEN_TIMEOUT=0)。

  GRUB 2 第一次執(zhí)行時(shí)將會(huì)尋找其他操作系統(tǒng)。若沒(méi)有其他操作系統(tǒng)被檢測(cè)到,菜單將會(huì)配置為隱藏。若辨認(rèn)出其他操作系統(tǒng),菜單將會(huì)顯示。

  若是大于 0 的整數(shù),系統(tǒng)將會(huì)依此配置的秒數(shù)暫停,但不會(huì)顯示菜單。

  0 則菜單不會(huì)顯示,也不會(huì)有延遲。

  使用者可以在啟動(dòng)時(shí)按住 SHIFT 鍵不放以強(qiáng)制顯示菜單。

  啟動(dòng)過(guò)程中,系統(tǒng)將會(huì)檢查 SHIFT 鍵狀態(tài)。若無(wú)法辨識(shí)按鍵狀態(tài),會(huì)有一個(gè)短時(shí)間的延遲讓使用者可通過(guò)按下 ESC 鍵來(lái)顯示菜單。

  2.GRUB_HIDDEN_TIMEOUT_QUIET=true

  true 不顯示倒計(jì)時(shí)。屏幕將會(huì)是空白的。

  false 在 GRUB_HIDDEN_TIMEOUT 中配置的時(shí)間,空白屏幕上會(huì)有一個(gè)倒數(shù)計(jì)時(shí)器。

  3.GRUB_TIMEOUT=10

  此命令將順從 GRUB_HIDDEN_TIMEOUT 配置,除非 GRUB_HIDDEN_TIMEOUT 被注釋掉(#)。若 GRUB_HIDDEN_TIMEOUT 啟用,則當(dāng)菜單顯示時(shí),GRUB_TIMEOUT 將會(huì)只執(zhí)行一次。

  配置此值為 -1 將會(huì)導(dǎo)致菜單一直顯示,直到用戶選擇。

  GRUB 2 菜單默認(rèn)為隱藏,除非其他操作系統(tǒng)被系統(tǒng)檢測(cè)到。若沒(méi)有其他操作系統(tǒng),此行將會(huì)被注釋掉,除非使用者修改它。為了在每次啟動(dòng)時(shí)顯示菜單,去掉此行的注釋并使用 1 或更大的值。

647533