我在我的系统上安装了 Ubuntu GNOME Remix 64 位。我将安装程序设置为重用我的/boot
和/home
.由于无处不在(Ubuntu 安装程序)让我很难安装 GRUB,所以我选择了“不使用引导加载程序继续”,并且由于我/boot
在以前的版本中安装/安装,所以/boot
我只需要从update-grub
Debian 32 位开始,问题就解决了...听起来很简单,但事实并非如此。该update-grub
命令在我的另一个硬盘中检测到 Ubuntu:
sudo update-grub2
[sudo] password for braiam:
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.10-2-686-pae
Found initrd image: /boot/initrd.img-3.10-2-686-pae
Found linux image: /boot/vmlinuz-3.8.0-19-generic
Found initrd image: /boot/initrd.img-3.8.0-19-generic
Found memtest86+ image: /memtest86+.bin
Found memtest86+ multiboot image: /memtest86+_multiboot.bin
Found Ubuntu 13.04 (13.04) on /dev/sda1
Found Windows 7 (loader) on /dev/sdb1
done
但是当我选择“Ubuntu 13.04”时,它会启动到 Debian。我检查了 grub.cfg 条目,发现root
和UUID
值的设置与 Debian 的相同。
sudo grub-mkconfig
Generating 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
load_env
fi
set default="0"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
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 load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos7 --hint-efi=hd1,msdos7 --hint-baremetal=ahci1,msdos7 --hint='hd0,msdos7' cead26d6-08f4-4894-ac78-a9a4ce59f773
else
search --no-floppy --fs-uuid --set=root cead26d6-08f4-4894-ac78-a9a4ce59f773
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='hd0,msdos8'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos8 --hint-efi=hd1,msdos8 --hint-baremetal=ahci1,msdos8 --hint='hd0,msdos8' 0cef2d59-21ca-4ba2-a9b2-0b9ef1f42589
else
search --no-floppy --fs-uuid --set=root 0cef2d59-21ca-4ba2-a9b2-0b9ef1f42589
fi
Found background image: /usr/share/images/desktop-base/desktop-grub.png
insmod png
if background_image /braiam/.cache/gnome-control-center/backgrounds/14fb12e1345ca2dfd3807e7f7b1122b0d6015d9453ed5742de72b988a9cffded; then
set color_normal=white/black
set color_highlight=black/white
else
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
Found linux image: /boot/vmlinuz-3.10-2-686-pae
Found initrd image: /boot/initrd.img-3.10-2-686-pae
menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.10-2-686-pae ...'
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.10-2-686-pae
}
submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
menuentry 'Debian GNU/Linux, with Linux 3.10-2-686-pae' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10-2-686-pae-advanced-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.10-2-686-pae ...'
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.10-2-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.10-2-686-pae (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10-2-686-pae-recovery-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.10-2-686-pae ...'
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.10-2-686-pae
}
Found linux image: /boot/vmlinuz-3.8.0-19-generic
Found initrd image: /boot/initrd.img-3.8.0-19-generic
menuentry 'Debian GNU/Linux, with Linux 3.8.0-19-generic' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-19-generic-advanced-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.8.0-19-generic ...'
linux /vmlinuz-3.8.0-19-generic root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.8.0-19-generic
}
menuentry 'Debian GNU/Linux, with Linux 3.8.0-19-generic (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-19-generic-recovery-cead26d6-08f4-4894-ac78-a9a4ce59f773' {
load_video
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
echo 'Loading Linux 3.8.0-19-generic ...'
linux /vmlinuz-3.8.0-19-generic root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.8.0-19-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+ ###
Found memtest86+ image: /memtest86+.bin
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux16 /memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux16 /memtest86+.bin console=ttyS0,115200n8
}
Found memtest86+ multiboot image: /memtest86+_multiboot.bin
menuentry "Memory test (memtest86+, experimental multiboot)" {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
multiboot /memtest86+_multiboot.bin
}
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
multiboot /memtest86+_multiboot.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
Found Ubuntu 13.04 (13.04) on /dev/sda1
menuentry 'Ubuntu 13.04 (13.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
initrd /initrd.img-3.10-2-686-pae
}
submenu 'Advanced options for Ubuntu 13.04 (13.04)' $menuentry_id_option 'osprober-gnulinux-advanced-bf554a2f-a035-4c22-bca8-162def35a03c' {
menuentry 'Debian GNU/Linux (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10-2-686-pae--bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
initrd /initrd.img-3.10-2-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.10-2-686-pae (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10-2-686-pae--bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
initrd /initrd.img-3.10-2-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.10-2-686-pae (recovery mode) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10-2-686-pae-root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz-bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz
initrd /initrd.img-3.10-2-686-pae
}
menuentry 'Debian GNU/Linux, with Linux 3.8.0-19-generic (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.8.0-19-generic--bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.8.0-19-generic root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
initrd /initrd.img-3.8.0-19-generic
}
menuentry 'Debian GNU/Linux, with Linux 3.8.0-19-generic (recovery mode) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.8.0-19-generic-root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz-bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.8.0-19-generic root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro single initrd=/install/initrd.gz
initrd /initrd.img-3.8.0-19-generic
}
menuentry 'Ubuntu 13.04 (13.04) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-3.10-2-686-pae--bf554a2f-a035-4c22-bca8-162def35a03c' {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos5 --hint-efi=hd1,msdos5 --hint-baremetal=ahci1,msdos5 --hint='hd0,msdos5' 279a18da-130b-46dd-8b54-84da48eb445f
else
search --no-floppy --fs-uuid --set=root 279a18da-130b-46dd-8b54-84da48eb445f
fi
linux /vmlinuz-3.10-2-686-pae root=UUID=cead26d6-08f4-4894-ac78-a9a4ce59f773 ro initrd=/install/initrd.gz quiet radeon.hw_i2c=1
initrd /initrd.img-3.10-2-686-pae
}
}
Found Windows 7 (loader) on /dev/sdb1
menuentry 'Windows 7 (loader) (on /dev/sdb1)' --class windows --class os $menuentry_id_option 'osprober-chain-AA64B45A64B42AC9' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 --hint='hd0,msdos1' AA64B45A64B42AC9
else
search --no-floppy --fs-uuid --set=root AA64B45A64B42AC9
fi
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###
### 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 ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
done
我可以编辑手头的条目,但是 grub.cfg 一开始的“不要编辑此文件”的提示让我犹豫不决。我应该手动编辑此条目,创建自定义脚本,还是我就注定失败?
ls /boot
主磁盘的:
ls /boot/
abi-3.8.0-19-generic initrd.img-3.8.0-19-generic System.map-3.8.0-19-generic
config-3.10-2-686-pae iso vmlinuz-3.10-2-686-pae
config-3.8.0-19-generic lost+found vmlinuz-3.8.0-19-generic
extlinux memtest86+.bin vmlinuz-3.8.0-19-generic.efi.signed
grub memtest86+_multiboot.bin
initrd.img-3.10-2-686-pae System.map-3.10-2-686-pae
ls /boot
我安装 Ubuntu 的磁盘:
ls /media/braiam/bf554a2f-a035-4c22-bca8-162def35a03c/boot/
grub initrd.img-3.8.0-19-generic.new
blkid
blkid
/dev/sda1: UUID="bf554a2f-a035-4c22-bca8-162def35a03c" TYPE="ext4" #here Ubuntu
/dev/sda2: UUID="7cb917ba-babb-42cd-897e-2070d540eda4" TYPE="swap"
/dev/sdb1: UUID="AA64B45A64B42AC9" TYPE="ntfs"
/dev/sdb2: UUID="F66E431C6E42D551" TYPE="ntfs"
/dev/sdb3: UUID="75a0854b-8b6b-453f-8aec-2a081a1f19e3" TYPE="swap"
/dev/sdb5: UUID="279a18da-130b-46dd-8b54-84da48eb445f" TYPE="ext4" #Here boot
/dev/sdb6: UUID="393cd35e-b827-4dea-acb5-2a66f2369dce" TYPE="swap"
/dev/sdb7: UUID="cead26d6-08f4-4894-ac78-a9a4ce59f773" TYPE="ext4" #here Debian
/dev/sdb8: UUID="0cef2d59-21ca-4ba2-a9b2-0b9ef1f42589" TYPE="ext4"
fdisk -l
:
sudo fdisk -l
[sudo] password for braiam:
Disk /dev/sda: 13.7 GB, 13701316608 bytes
255 heads, 63 sectors/track, 1665 cylinders, total 26760384 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: 0x8e48c4c5
Device Boot Start End Blocks Id System
/dev/sda1 2104515 26749046 12322266 83 Linux (here is Ubuntu)
/dev/sda2 63 2104514 1052226 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/sdb: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 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: 0x1549f232
Device Boot Start End Blocks Id System
/dev/sdb1 * 63 223629311 111814624+ 7 HPFS/NTFS/exFAT
/dev/sdb2 225724416 336437306 55356445+ 7 HPFS/NTFS/exFAT
/dev/sdb3 223629312 225724415 1047552 82 Linux swap / Solaris
/dev/sdb4 336439294 390721535 27141121 5 Extended
/dev/sdb5 336439296 338391039 975872 83 Linux (here is boot)
/dev/sdb6 338393088 339390463 498688 82 Linux swap / Solaris
/dev/sdb7 339392512 368687103 14647296 83 Linux (here is Debian)
/dev/sdb8 368689152 390721535 11016192 83 Linux
Ubuntu 和 Debian 的 fstab 是一样的,除了/
条目不同。
sudo os-prober
[sudo] password for braiam:
/dev/sda1:Ubuntu 13.04 (13.04):Ubuntu:linux
/dev/sdb1:Windows 7 (loader):Windows:chain
cat /boot/grub/device.map
:
cat /boot/grub/device.map
(hd0) /dev/disk/by-id/ata-Maxtor_6L200M0_L40WL3VH
(hd1) /dev/disk/by-id/usb-Sandisk-Curzer
sudo grub-mkdevicemap
(自从我运行更改条目以来,我就从脑海中获取了这些信息)
答案1
我将安装程序设置为重复使用我的
/boot
我自己还没有使用过双启动设置,但这对我来说似乎是一个错误。update-grub
用于grub-probe
确定当前根文件系统位于哪个设备上,然后将此设备作为参数附加root=
到linux
中的行/boot/grub/grub.cfg
。这可能就是您的 Ubuntu 条目引导 Debian 的原因 - 您可能正在使用 Ubuntu 的内核和 initramfs,但您grub.cfg
指示它挂载您的 Debian 分区,然后继续从该分区引导。
我会尝试将 Ubuntu 重新定位/boot
到它自己的根文件系统(这应该不会太难,然后您就不必重新分区,这可能需要重新安装 Ubuntu)。然后设置 Debian 的 grub 来链式加载 Ubuntu 的 grub;那么它应该可以正常工作。
编辑:关于如何设置 Ubuntu 的小指南/grub
。请注意,我是凭记忆输入的,所以要小心;)
- 是的,
*3.8*
从 Debian迁移/grub
到 Ubuntu/grub
。 - 打开根外壳。
chroot
进入 Ubuntu 的文件系统:cd /media/braiam/bf554a2f-a035-4c22-bca8-162def35a03c for i in proc sys dev; do mount --bind /$i $i; done chroot /mnt /bin/bash
你现在是里面Ubuntu 系统(Ubuntu 的根文件系统现在是
/
,至少在这个 shell 中),几乎就像您已经启动了它一样。如果您已经
debsums
在 Ubuntu 上安装,您现在可以检查丢失的文件(以防您在 Debian 的引导中忘记了某些内容),但这可能需要一段时间:debsums -s
如果您需要在 中访问 Internet
chroot
,例如重新安装损坏的软件包,则/etc/resolv.conf
在 chroot 内进行编辑应该可以解决问题。只需将该nameserver
线路指向 Debian 正在使用的同一个 DNS 服务器即可。vim /etc/resolv.conf
跑步
grub-mkdevicemap
。不确定这是否重要,但可能不会有什么坏处。grub-mkdevicemap
好吧,我不得不承认,我现在真的不确定如何在 Ubuntu 上安装 grub/boot
或者是否有必要。grub-install
需要一个设备,但我们不希望它写入 MBR...:/我得再仔细研究一下。我现在才意识到你的 Ubuntu 实际上位于一个单独的硬盘上。只需将其安装到该硬盘的 MBR 即可:
grub-install /dev/sda
更新 grub 并重建 initramfs:
update-grub update-initramfs -u
留下
chroot
:exit
您仍然需要弄清楚如何告诉 Debian 的 grub 它应该链式加载现在位于 Ubuntu 硬盘上的 grub2 MBR;我不知道它是否会自己解决这个问题。也许在 Debian 文件系统上添加一个chainloader
部分?/etc/grub.d/40_custom