Ubuntu桌面版复制到专有分区的方法(2)

#
# 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 {
}

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
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
menuentry "Ubuntu,grub.cfg Linux 2.6.35-22-generic on /dev/sda3" {
insmod part_msdos
insmod ext3
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 15fbe968-a73a-4b14-8315-ae841cf0d048
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.35-22-generic root=/dev/sda3 loop=/ubuntu/disks/root.disk ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry "Ubuntu,grub.cfg Linux 2.6.35-22-generic on /dev/sda3 (recovery mode)" {
insmod part_msdos
insmod ext3
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 15fbe968-a73a-4b14-8315-ae841cf0d048
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.35-22-generic root=/dev/sda3  loop=/ubuntu/disks/root.disk ro single 
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_lupin ###

### 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 "Microsoft Windows XP Professional (on /dev/sda1)" {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set de305be6305bc3e5
drivemap -s (hd0) ${root}
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 ###
 在这一步,应该注意,将分区的uuid和路径改成目标分区(即红色标注部分)。因为LVPM在复制grub的时候,没有将分区和路径改过来。

同时也要修改\boot\grub 下的menu.lst

default=0
timeout=5
title Ubuntu-on-menu.lst/dev/sda3
insmod part_msdos
insmod ext3
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 15fbe968-a73a-4b14-8315-ae841cf0d048
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /boot/vmlinuz-2.6.35-22-generic root=/dev/sda3 loop=/ubuntu/disks/root.disk ro quiet splash
kernel /boot/vmlinuz-2.6.35-22-generic ro root=/dev/sda3
initrd /boot/initrd.img-2.6.35-22-generic



# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root


title UnknownOS
root (hd0,4)
makeactive
chainloader +1
boot


title Microsoft Windows XP Professional
root (hd0,0)
makeactive
chainloader +1
boot

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/24137.html