通过 Grub 安装多个 Windows 7

通过 Grub 安装多个 Windows 7

我有以下磁盘配置:

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x28ec8922

Device Boot      Start         End      Blocks   Id  System

Disk /dev/sdb: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x72654d40

Device     Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sdb2          206848    62914559    31353856    7  HPFS/NTFS/exFAT
/dev/sdb3        62914560   167772159    52428800    7  HPFS/NTFS/exFAT
/dev/sdb4       167774206   284358655    58292225    5  Extended
/dev/sdb5       167774208   168357887      291840   83  Linux
/dev/sdb6       168359936   218357759    24998912   83  Linux
/dev/sdb7       218359808   268357631    24998912   83  Linux
/dev/sdb8       268359680   284358655     7999488   82  Linux swap / Solaris

Disk /dev/sdc: 24.0 GB, 24015495168 bytes
255 heads, 63 sectors/track, 2919 cylinders, total 46905264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x28ec8923

Device Boot      Start         End      Blocks   Id  System

/dev/sdb,我有两个Windows 7安装,/dev/sdb1是Windows系统分区,/dev/sdb2是第一个Windows 7安装,/dev/sdb3是第二个Windows 7安装。其余分区是Ubuntu 14.04,我使用的是Grub。 grub 菜单仅列出了 Windows 加载程序,我必须进入 Windows 加载程序才能选择要从中启动的 Windows 安装之一。是否可以在 grub 菜单中列出 Windows 安装?

我尝试使用以下 Grub 自定义菜单,但是当我运行 grub-update 时,它​​没有检测到任何操作系统:

#!/bin/sh
exec tail -n +3 $0

menuentry "Ubuntu" {
recordfail
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos5'
search --no-floppy --fs-uuid --set=root /dev/sdb5
linux /vmlinuz-3.13.0-24-generic root=UUID=/dev/sdb5 ro recovery nomodeset
initrd  /initrd.img-3.13.0-24-generic
}

menuentry "Windows Lab" {
insmod ntfs
set root='hd1,1'
search --no-floppy --fs-uuid --set=root /dev/sdb2
chainloader+1
}

menuentry "Windows Personal" {
insmod ntfs
set root='hd1,1'
search --no-floppy --fs-uuid --set-root /dev/sdb3
chainloader+1
}

如何获取grub列出 Windows 7 安装的菜单?

相关内容