从 Windows 7 菜单中移除启动选项(使用 grub)

从 Windows 7 菜单中移除启动选项(使用 grub)

我有一台安装了 Windows 7 启动器的旧 eeepc,大约一年前(或更早),我使用适用于 Windows 的 Debian 安装程序安装了 Debian/Linux,一切都很顺利,或者我相信如此(当时我并不太在意)并且我仍然在使用安装的 Debian,但现在有时我也会启动 Windows。

恼人的事Debian 安装程序在 Windows 启动菜单中留下了一个菜单选项,类似于continue the installation process,现在的启动顺序是grub menu-> windows menu-> windows

我尝试使用bcdeditmsconfig像其他答案中建议的那样编辑启动菜单,但第一次失败,类似于can't find the archive boot data configuration其他选项boot卡中不显示菜单选项,只是空的。

我猜想grub将启动项移到了 Windows 不喜欢的地方(也许我错了)。

那么,还有其他方法可以从 Windows 启动菜单中删除此选项吗?

更新

安装程序留下了一个c:\win32-loader目录(包含 Linux 和 initrd 映像)和两个文件g2ldr g2ldr.mbrc:\据我理解,grub它们是mbr在安装过程中使用的,并且在我选择菜单选项时仍然使用continue the installation process

更新 12/9

Diskpart 的输出

Microsoft DiskPart versione 6.1.7601
Copyright (C) 1999-2008 Microsoft Corporation.
Nel computer MATRIX

DISKPART> select disk 0

Il disco attualmente selezionato è il disco 0.

DISKPART> list partition

  Partizione ###   Tipo              Dim.     Offset
  ---------------  ----------------  -------  -------
  Partizione 1    Primario           100 Mb  1024 Kb
  Partizione 2    Primario            97 Gb   101 Mb
  Partizione 0    Esteso             135 Gb    97 Gb
  Partizione 3    Logico             133 Gb    97 Gb
  Partizione 4    Logico            1912 Mb   230 Gb
  Partizione 5    Logico             136 Mb   232 Gb

DISKPART> select partition 1

La partizione attualmente selezionata è la partizione 1.

DISKPART> detail partition

Partizione 1
Tipo  : 07
Nascosta: No
Attiva: No
Offset in byte: 1048576

  Volume ###  Let. Etichetta    Fs     Tipo        Dim.     Stato      Info
  ---------   ---  -----------  -----  ----------  -------  ---------  --------
* Volume 0     D   Riservato p  NTFS   Partizione   100 Mb  Integro    Sistema

DISKPART> select partition 2

La partizione attualmente selezionata è la partizione 2.

DISKPART> detail partition

Partizione 2
Tipo  : 07
Nascosta: No
Attiva: No
Offset in byte: 105906176

  Volume ###  Let. Etichetta    Fs     Tipo        Dim.     Stato      Info
  ---------   ---  -----------  -----  ----------  -------  ---------  --------
* Volume 1     C                NTFS   Partizione    97 Gb  Integro    Avvio

DISKPART> select partition 0

La partizione attualmente selezionata è la partizione 0.

DISKPART> detail partition

Partizione 0
Tipo  : 0F
Nascosta: No
Attiva: No
Offset in byte: 104987505152

Nessun volume associato alla partizione.

DISKPART> select partition 3

La partizione attualmente selezionata è la partizione 3.

DISKPART> detail partition

Partizione 3
Tipo  : 83
Nascosta: Sì
Attiva: Sì
Offset in byte: 104987506176

Nessun volume associato alla partizione.

DISKPART> select partition 4

La partizione attualmente selezionata è la partizione 4.

DISKPART> detail partition

Partizione 4
Tipo  : 82
Nascosta: Sì
Attiva: No
Offset in byte: 247910629376

Nessun volume associato alla partizione.

磁盘管理

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   205053659   102423406    7  HPFS/NTFS/exFAT
/dev/sda3       205053721   488396799   141671539+   f  W95 Ext'd (LBA)
/dev/sda5   *   205053723   484199099   139572688+  83  Linux
/dev/sda6       484200448   488116223     1957888   82  Linux swap / Solaris
/dev/sda7       488118272   488396799      139264   82  Linux swap / Solaris

答案1

使用bcdedit并向其传递/store诸如bcdedit /store c:\Boot\BCD列出条目之类的参数。

重要的是,BCD 文件可能不在 C 盘上。

您可以使用以下位置描述的步骤启动 Windows 7 时出现错误消息:“Windows 启动配置数据文件缺少所需信息”尝试确定正确的分区。

复现步骤:

Partition C: might not be the correct volume letter.  Here is what we have to do to obtain the correct active partition:

If the Bootrec.exe tool cannot locate any missing Windows installations, you must remove the BCD store, and then you must re-create it.  Use the diskpart command to locate the volume letter for the system partition where the BCD store is located. To do this, follow these steps:

    At the command prompt type the following commands in the order which they are presented:
            c:\windows\system32> Diskpart
            DISKPART> select disk 0
            DISKPART> list partition
            DISKPART> select partition 1
            DISKPART> detail partition





Sample output for example:

Partition 1

Type  : 07

Hidden: No

Active: Yes

Offset in Bytes: 1048576



  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info

  ----------  ---  -----------  -----  ----------  -------  ---------  --------

* Volume 1     D    System Rese  NTFS   Partition    100 MB  Healthy    System



The BCD store is located on the partition where the detail shows “Active : Yes”, and Info is “System”.  The partition may have a label “System Reserved”.   In this example, Volume 1 is the system partition and Windows has temporarily assigned the volume letter D.  If partition 1 is not marked Active, then select partition 2, and view the detail to see whether the next partition is Active and the Info is System.   A partition with Info as “Boot”, is the partition where the \Windows directory is located.

Partition 2

Type  : 07

Hidden: No

Active: No

Offset in Bytes: 105906176



  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info

  ----------  ---  -----------  -----  ----------  -------  ---------  --------

* Volume 2     C                NTFS   Partition    100 GB  Healthy    Boot

On Windows Vista, one partition is typically used as both the System and Boot partitions and the \boot\BCD store is located on the same volume where the \Windows directory is located.  On Windows 7, separate partitions are used for the System and Boot partitions to make it easier to enable BitLocker Drive Encryption and to support computers that have UEFI firmware.

相关内容