昨夜、思い切って、Ubuntuを(Windows 7の)デュアルブートシステムに無料でインストールすることにしました。残念ながら、ブートローダーを適切に設定するというプロセス全体が苦労しています。
状況の完全なコンテキストのための短い歴史的概要:
Windows 7マシンでUSBドライブセットアップからUbuntu 11.04 x64を生成およびインストールしました。 USB3.0ポートを使用できないことがわかるまで、インストーラーを起動することさえできませんでした。 USB2.0ポートに切り替え、インストールを続行しました。
デュアルブート用に半分に分割した1 TBのHDDがあります。Windows7の場合は500 GBのパーティション、Ubuntuの場合は500 GB(ブート/スワップファイルパーティションを除く)です。 Ubuntuパーティションはext4ファイルシステムとともにインストールされ、明らかな問題なくインストールが完了し、再起動するように求められました。
再起動すると、古いWindowsブートローダーにダンプされ、すぐにWindowsが起動しました。 EasyBCDというユーティリティをいじって、新しくインストールしたパーティションにLinuxエントリを追加しようとしましたが、まったく役に立ちませんでした。
次に、USBドライブからUbuntuを直接起動し、 here の手順に従ってブートパーティションにGRUB2をインストールしました。また、ステップ(「update-grub」)を実行して、新しい「grub.cfg」ファイルを生成しました。このファイルは、古い「Windows 7」ブートローダーにエントリを追加しましたが、新しいUbuntuパーティションには追加しませんでした!リブートすると、GRUB2ブートローダーは正常に起動しましたが、利用可能なオペレーティングシステムのリストの下で、Ubuntuをまだ見つけることができませんでした。
Ubuntuの新しいインストールを適切に指すように、この構成をどのように変更/更新する必要があるか考えている人はいますか?
いくつかの有用な情報...
"fdisk -l":
ディスク/ dev/sdd:1000.2 GB、1000204886016バイト
255ヘッド、63セクター/トラック、121601シリンダー
単位= 16065 * 512 = 8225280バイトのシリンダー
セクターサイズ(論理/物理):512バイト/ 512バイト
I/Oサイズ(最小/最適):512バイト/ 512バイト
ディスク識別子:0xb209a592
Device Boot Start End Blocks Id System
/dev/sdd1 * 1 13 102400 7 HPFS/NTFS
Partition 1 does not end on cylinder boundary.
/dev/sdd2 13 60555 486297600 7 HPFS/NTFS
/dev/sdd3 60555 120143 478642176 83 Linux
/dev/sdd4 120143 121602 11717633 5 Extended
/dev/sdd5 120143 121602 11717632 82 Linux swap / Solaris
"grub.cfg"エントリ:
### BEGIN /etc/grub.d/30_os-prober ### menuentry "Windows 7 (loader) (on /dev/sdd1)" --class windows --class os { insmod part_msdos insmod ntfs set root='(/dev/sdd,msdos1)' search --no-floppy
--fs-uuid --set=root 08BAB5B0BAB59B20 chainloader +1 }
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
"boot_info_scriptの出力:
Boot Info Script 0.60 from 17 May 2011
============================= Boot Info Summary: ===============================
=> Windows is installed in the MBR of /dev/sda.
=> Windows is installed in the MBR of /dev/sdb.
=> Windows is installed in the MBR of /dev/sdc.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdd and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos1)/grub on this drive.
=> Syslinux MBR (4.04 and higher) is installed in the MBR of /dev/sde.
sda1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sdb1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /bootmgr /Boot/BCD
sdb2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
sdc1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files:
sdd1: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files: /grub/grub.cfg /bootmgr /Boot/BCD /grub/core.img
sdd2: __________________________________________________________________________
File system: ntfs
Boot sector type: Windows Vista/7
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows 7
Boot files: /Windows/System32/winload.exe
sdd3: __________________________________________________________________________
File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 11.04
Boot files: /boot/grub/grub.cfg /etc/fstab
sdd4: __________________________________________________________________________
File system: Extended Partition
Boot sector type: -
Boot sector info:
sdd5: __________________________________________________________________________
File system: swap
Boot sector type: -
Boot sector info:
sde1: __________________________________________________________________________
File system: vfat
Boot sector type: SYSLINUX 4.04 2011-04-18
Boot sector info: Syslinux looks at sector 8448 of /dev/sde1 for its
second stage. SYSLINUX is installed in the directory.
The integrity check of the ADV area failed. No errors
found in the Boot Parameter Block.
Operating System:
Boot files: /boot/grub/grub.cfg /syslinux/syslinux.cfg /ldlinux.sys
============================ Drive/Partition Info: =============================
Drive: sda _____________________________________________________________________
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sda1 63 1,953,520,064 1,953,520,002 7 NTFS / exFAT / HPFS
Drive: sdb _____________________________________________________________________
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdb1 2,048 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sdb2 * 206,848 488,394,751 488,187,904 7 NTFS / exFAT / HPFS
Drive: sdc _____________________________________________________________________
Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdc1 63 1,953,520,064 1,953,520,002 7 NTFS / exFAT / HPFS
Drive: sdd _____________________________________________________________________
Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sdd1 * 2,048 206,847 204,800 7 NTFS / exFAT / HPFS
/dev/sdd2 206,848 972,802,047 972,595,200 7 NTFS / exFAT / HPFS
/dev/sdd3 972,802,048 1,930,086,399 957,284,352 83 Linux
/dev/sdd4 1,930,088,446 1,953,523,711 23,435,266 5 Extended
/dev/sdd5 1,930,088,448 1,953,523,711 23,435,264 82 Linux swap / Solaris
Drive: sde _____________________________________________________________________
Disk /dev/sde: 3926 MB, 3926949888 bytes
16 heads, 16 sectors/track, 29960 cylinders, total 7669824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
Partition Boot Start Sector End Sector # of Sectors Id System
/dev/sde1 * 8,064 7,669,823 7,661,760 c W95 FAT32 (LBA)
"blkid" output: ________________________________________________________________
Device UUID TYPE LABEL
/dev/loop0 squashfs
/dev/sda1 36BA3C8CBA3C4A9F ntfs Data Storage (Backup)
/dev/sdb1 90A09285A0927188 ntfs System Reserved
/dev/sdb2 88E09C67E09C5D6E ntfs Old OS HDD
/dev/sdc1 1CEE7227EE71F8FA ntfs Data Storage
/dev/sdd1 08BAB5B0BAB59B20 ntfs System Reserved
/dev/sdd2 30EEC43AEEC3F65E ntfs Operating System
/dev/sdd3 fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa ext4
/dev/sdd5 086c0085-650b-495f-b9e8-e7e637fac705 swap
/dev/sde1 FC8F-97FE vfat PENDRIVE
================================ Mount points: =================================
Device Mount_Point Type Options
/dev/loop0 /rofs squashfs (ro,noatime)
/dev/sde1 /cdrom vfat (ro,noatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
============================= sdd1/grub/grub.cfg: ==============================
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos5)'
search --no-floppy --fs-uuid --set=root 43000377-e88b-4373-975e-66146de829ce
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ntfs
set root='(/dev/sdd,msdos1)'
search --no-floppy --fs-uuid --set=root 08BAB5B0BAB59B20
set locale_dir=($root)/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
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
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
# menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os {
# insmod part_msdos
# insmod ntfs
# set root='(/dev/sdb,msdos1)'
# search --no-floppy --fs-uuid --set=root 90A09285A0927188
# chainloader +1
# }
menuentry "Windows 7 (loader) (on /dev/sdd1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sdd,msdos1)'
search --no-floppy --fs-uuid --set=root 08BAB5B0BAB59B20
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
=================== sdd1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
?? = ?? grub/core.img 1
?? = ?? grub/grub.cfg 1
=========================== sdd3/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}
function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
}
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos3)'
search --no-floppy --fs-uuid --set=root fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos3)'
search --no-floppy --fs-uuid --set=root fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
if background_color 44,0,30; then
clear
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
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
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos3)'
search --no-floppy --fs-uuid --set=root fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.38-8-generic
}
menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos3)'
search --no-floppy --fs-uuid --set=root fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos3)'
search --no-floppy --fs-uuid --set=root fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sdd,msdos3)'
search --no-floppy --fs-uuid --set=root fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows 7 (loader) (on /dev/sdb1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sdb,msdos1)'
search --no-floppy --fs-uuid --set=root 90A09285A0927188
chainloader +1
}
menuentry "Windows 7 (loader) (on /dev/sdd1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(/dev/sdd,msdos1)'
search --no-floppy --fs-uuid --set=root 08BAB5B0BAB59B20
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
--------------------------------------------------------------------------------
=============================== sdd3/etc/fstab: ================================
--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sdd3 during installation
UUID=fb62baf1-e6a7-4e0d-ada2-2efb52ab12fa / ext4 errors=remount-ro 0 1
# swap was on /dev/sdd5 during installation
UUID=086c0085-650b-495f-b9e8-e7e637fac705 none swap sw 0 0
--------------------------------------------------------------------------------
=================== sdd3: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
476.025924683 = 511.128944640 boot/grub/grub.cfg 1
465.547851562 = 499.878199296 boot/initrd.img-2.6.38-8-generic 2
686.000980377 = 736.587943936 boot/vmlinuz-2.6.38-8-generic 1
465.547851562 = 499.878199296 initrd.img 2
686.000980377 = 736.587943936 vmlinuz 1
=========================== sde1/boot/grub/grub.cfg: ===========================
--------------------------------------------------------------------------------
if loadfont /boot/grub/font.pf2 ; then
set gfxmode=auto
insmod efi_gop
insmod efi_uga
insmod gfxterm
terminal_output gfxterm
fi
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
menuentry "Try Ubuntu without installing" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper quiet splash --
initrd /casper/initrd.lz
}
menuentry "Install Ubuntu" {
set gfxpayload=keep
linux /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper only-ubiquity quiet splash --
initrd /casper/initrd.lz
}
menuentry "Check disc for defects" {
set gfxpayload=keep
linux /casper/vmlinuz boot=casper integrity-check quiet splash --
initrd /casper/initrd.lz
}
--------------------------------------------------------------------------------
========================= sde1/syslinux/syslinux.cfg: ==========================
--------------------------------------------------------------------------------
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
Prompt 0
timeout 50
# If you would like to use the new menu and be presented with the option to install or run from USB at startup, remove # from the following line. This line was commented out (by request of many) to allow the old menu to be presented and to enable booting straight into the Live Environment!
# ui gfxboot bootlogo
--------------------------------------------------------------------------------
=================== sde1: Location of files loaded by Grub: ====================
GiB - GB File Fragment(s)
?? = ?? boot/grub/grub.cfg 1
================= sde1: Location of files loaded by Syslinux: ==================
GiB - GB File Fragment(s)
?? = ?? ldlinux.sys 1
?? = ?? syslinux/gfxboot.c32 1
?? = ?? syslinux/syslinux.cfg 1
?? = ?? syslinux/vesamenu.c32 1
============== sde1: Version of COM32(R) files used by Syslinux: ===============
syslinux/gfxboot.c32 : COM32R module (v4.xx)
syslinux/vesamenu.c32 : COM32R module (v4.xx)
=============================== StdErr Messages: ===============================
unlzma: Decoder error
/home/ubuntu/Desktop/boot_info_script.sh: line 1579: [: 2.73495e+09: integer expression expected
投稿済みチュートリアル 、手順番号2を使用します。コマンドを発行する前に、/dev/sdd
が目的の1TBドライブであることを確認してください。
Sudo mount /dev/sdd3 /mnt
Sudo grub-install --root-directory=/mnt/ /dev/sdd
これにより、Grubローダーがドライブの先頭と/boot
上のsdd3
ディレクトリにインストールされます。
そこでupdate-grub
セクションを実行する必要はありません。次にBIOSに移動し、sdd
ドライブをプライマリブートデバイスとしてマークします。