ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#1

帖子 aannvvc » 2011-05-10 13:40

我现在手上有CD...找人大概也能重做引导
不过听说用easyBCD更方便?只是全英文不知道怎么用...求一篇详细教程
谢了各位 :em11
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#2

帖子 月下叹逍遥 » 2011-05-10 13:44

win7把grub覆盖了,利用CD修复grub就是。
浮生七十今三十,从此凄惶未可知
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#3

帖子 aannvvc » 2011-05-10 13:49

月下叹逍遥 写了:win7把grub覆盖了,利用CD修复grub就是。
问题就是我不会修复啊- -
现在我用CD进了ubuntu,但是感觉什么都做不了- -
具体用CD修复grub该怎么做呢?
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#4

帖子 月下叹逍遥 » 2011-05-10 13:57

打开终端,执行:sudo -i,切换到root权限;
挂载ubuntu所在分区;
运行 grub-install --boot-directory=/media/ /dev/sdaX(你ubuntu所在分区)
浮生七十今三十,从此凄惶未可知
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#5

帖子 aannvvc » 2011-05-10 13:59

月下叹逍遥 写了:打开终端,执行:sudo -i,切换到root权限;
挂载ubuntu所在分区;
运行 grub-install --boot-directory=/media/ /dev/sdaX(你ubuntu所在分区)
了解了,3Q :em04
头像
月下叹逍遥
论坛版主
帖子: 33994
注册时间: 2010-10-07 14:23
系统: Archdows10
来自: 某系某星某洲某国某省某市
联系:

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#6

帖子 月下叹逍遥 » 2011-05-10 14:02

对了,进入ubuntu之后,在升级一遍grub才行了
浮生七十今三十,从此凄惶未可知
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#7

帖子 aannvvc » 2011-05-10 14:14

月下叹逍遥 写了:对了,进入ubuntu之后,在升级一遍grub才行了
呃.现在还有一个问题,我现在忘了ubuntu装的哪个盘了,而且现在Disk Utility启动不了,有什么命令能判断ubuntu装在哪个盘么?
说错了,是忘了装在哪个分区
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#8

帖子 aannvvc » 2011-05-10 16:16

好吧在试着操作了几下之后...安装过程中知道了是装在sda5的...但还是不敢装下去,怕把原来ubuntu里的东西给覆盖了...
现在比较纠结的是不知道怎么挂载那个分区= =
既没有自动挂载磁盘实用工具也用不了...
直接用那个命令的话就会提示error: cannot stat 'aufs'.
我是插进CD选试用进入ubuntu的..不知道这样做有没有问题
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#9

帖子 onshoestring » 2011-05-10 16:17

终端运行:

代码: 全选

 cd ~/Desktop && wget 'http://nchc.dl.sourceforge.net/project/bootinfoscript/bootinfoscript/0.55/boot_info_script055.sh' && sudo bash boot_info_script055.sh
把RESULTS.txt文件内容贴上来。
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#10

帖子 aannvvc » 2011-05-10 16:31

Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda

sda1: _________________________________________________________________________

File system: vfat
Boot sector type: Vista: Fat 32
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files/dirs: /menu.lst /boot.ini /bootmgr /boot/bcd /grldr /ntldr
/NTDETECT.COM

sda2: _________________________________________________________________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: _________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 11.04
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda6: _________________________________________________________________________

File system: swap
Boot sector type: -
Boot sector info:

sda7: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda7 starts
at sector 63.
Operating System:
Boot files/dirs:

sda8: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda8 starts
at sector 63.
Operating System:
Boot files/dirs:

sda9: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: No errors found in the Boot Parameter Block.
Operating System:
Boot files/dirs:

sda10: _________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP
Boot sector info: According to the info in the boot sector, sda10 starts
at sector 63.
Operating System: Windows 7
Boot files/dirs: /Windows/System32/winload.exe

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 63 114,966,001 114,965,939 c W95 FAT32 (LBA)
/dev/sda2 114,966,526 625,137,344 510,170,819 f W95 Ext d (LBA)
Extended partition linking to another extended partition
/dev/sda5 114,966,528 152,295,423 37,328,896 83 Linux
/dev/sda6 152,297,472 154,013,695 1,716,224 82 Linux swap / Solaris
/dev/sda7 154,015,218 308,030,309 154,015,092 7 HPFS/NTFS
/dev/sda8 308,030,373 462,045,464 154,015,092 7 HPFS/NTFS
/dev/sda9 462,045,528 543,221,909 81,176,382 7 HPFS/NTFS
/dev/sda10 543,221,973 625,137,344 81,915,372 7 HPFS/NTFS


blkid -c /dev/null: ____________________________________________________________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda10 3AC6BD90C6BD4CBF ntfs WIN7
/dev/sda1 CC3F-B81F vfat
/dev/sda2: PTTYPE="dos"
/dev/sda5 7022dea9-ab17-4072-942e-c0b6dfe64265 ext4
/dev/sda6 573b9cd3-97ff-4382-a3c8-e05d4b239b86 swap
/dev/sda7 4E80B0D06C979E44 ntfs 工具
/dev/sda8 B0A18DDEEC101C79 ntfs 数据
/dev/sda9 02F5A88B6AC74F10 ntfs 其他
/dev/sda: PTTYPE="dos"
error: /dev/sdb: No medium found

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

aufs / aufs (rw)
/dev/sr0 /cdrom iso9660 (ro,noatime)
/dev/loop0 /rofs squashfs (ro,noatime)


================================ sda1/menu.lst: ================================

# This is a sample menu.lst file. You should make some changes to it.
# The old install method of booting via the stage-files has been removed.
# Please install GRLDR boot strap code to MBR with the bootlace.com
# utility under DOS/Win9x or Linux.

color blue/green yellow/red white/magenta white/magenta
timeout 30
default /default

title veket C
kernel (hd0,0)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,0)/veket/initrd.gz

title veket D
kernel (hd0,4)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,4)/veket/initrd.gz

title veket E
kernel (hd0,5)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,5)/veket/initrd.gz

title veket F
kernel (hd0,6)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,6)/veket/initrd.gz

title veket G
kernel (hd0,7)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,7)/veket/initrd.gz

title veket H
kernel (hd0,8)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,8)/veket/initrd.gz

title veket I
kernel (hd0,9)/veket/vmlinuz root=/dev/ram0 PMEDIA=idehd
initrd (hd0,9)/veket/initrd.gz

title find and load NTLDR of Windows NT/2K/XP
fallback 1
find --set-root --ignore-floppies /ntldr
chainloader /ntldr
savedefault --wait=2

title find and load BOOTMGR of Windows VISTA
fallback 2
find --set-root --ignore-floppies /bootmgr
chainloader /bootmgr
savedefault --wait=2

title find and load CMLDR, the Recovery Console of Windows NT/2K/XP
fallback 3
find --set-root --ignore-floppies /cmldr
chainloader /cmldr
#####################################################################
# write string "cmdcons" to memory 0000:7C03 in 2 steps:
#####################################################################
# step 1. Write 4 chars "cmdc" at 0000:7C03
write 0x7C03 0x63646D63
# step 2. Write 3 chars "ons" and an ending null at 0000:7C07
write 0x7C07 0x00736E6F
savedefault --wait=2

title find and load IO.SYS of Windows 9x/Me
fallback 4
find --set-root /io.sys
chainloader /io.sys
savedefault --wait=2

title find and boot 0PE.ISO
fallback 5
find --set-root /0PE/0PE.ISO
map /0PE/0PE.ISO (0xff) || map --mem /0PE/0PE.ISO (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

title find and boot MicroPE.ISO
fallback 6
find --set-root /boot/MicroPE.ISO
map /boot/MicroPE.ISO (0xff) || map --mem /boot/MicroPE.ISO (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

title Parted Magic ISO
fallback 7
find --set-root /pmagic.iso
map /pmagic.iso (0xff) || map --mem /pmagic.iso (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

title Ultimate Boot CD ISO
fallback 8
find --set-root /ubcd.iso
map /ubcd.iso (0xff) || map --mem /ubcd.iso (0xff)
map --hook
chainloader (0xff)
savedefault --wait=2

title commandline
commandline

title floppy (fd0)
chainloader (fd0)+1
rootnoverify (fd0)

title back to dos
quit

title reboot
reboot

title halt
halt

title MAXDOS.IMG
find --set-root --ignore-floppies /boot/MAXDOS.IMG
map --mem /boot/MAXDOS.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)



================================ sda1/boot.ini: ================================

[boot loader]
timeout=5
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
C:\GHLDR=Ò»¼üGHOST v2010.01.02
C:\GRLDR="Veket"

=================== sda1: Location of files loaded by Grub: ===================


??GB: menu.lst

=========================== sda5/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 vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
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/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
set locale_dir=($root)/boot/grub/locale
set lang=
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
### 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/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 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/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
echo 'Loading Linux 2.6.38-8-generic ...'
linux /boot/vmlinuz-2.6.38-8-generic root=UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.38-8-generic
}
submenu "Previous Linux versions" {
menuentry 'Ubuntu, with Linux 2.6.35-28-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-28-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/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
echo 'Loading Linux 2.6.35-28-generic ...'
linux /boot/vmlinuz-2.6.35-28-generic root=UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-28-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
set gfxpayload=$linux_gfx_mode
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 ro quiet splash vt.handoff=7
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-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/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-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/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(/dev/sda,msdos8)'
search --no-floppy --fs-uuid --set=root 7022dea9-ab17-4072-942e-c0b6dfe64265
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod fat
set root='(/dev/sda,msdos1)'
search --no-floppy --fs-uuid --set=root cc3f-b81f
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 ###

=============================== sda5/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/sda8 during installation
UUID=7022dea9-ab17-4072-942e-c0b6dfe64265 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda9 during installation
UUID=573b9cd3-97ff-4382-a3c8-e05d4b239b86 none swap sw 0 0

=================== sda5: Location of files loaded by Grub: ===================


71.9GB: boot/grub/core.img
61.8GB: boot/grub/grub.cfg
75.2GB: boot/initrd.img-2.6.35-22-generic
59.8GB: boot/initrd.img-2.6.35-28-generic
73.7GB: boot/initrd.img-2.6.38-8-generic
72.6GB: boot/vmlinuz-2.6.35-22-generic
72.6GB: boot/vmlinuz-2.6.35-28-generic
70.8GB: boot/vmlinuz-2.6.38-8-generic
73.7GB: initrd.img
59.8GB: initrd.img.old
70.8GB: vmlinuz
72.6GB: vmlinuz.old
=======Devices which don't seem to have a corresponding hard drive==============

sdb
头像
onshoestring
论坛版主
帖子: 4666
注册时间: 2009-09-06 5:53

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#11

帖子 onshoestring » 2011-05-10 16:43

像是又动过分区,原来是sda8,现在变成sda5了。
sda5/etc/fstab:
# / was on /dev/sda8 during installation
# swap was on /dev/sda9 during installation

代码: 全选

sudo -i
mount /dev/sda5 /mnt
grub-install --boot-directory=/mnt/boot /dev/sda
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
exit
aannvvc
帖子: 10
注册时间: 2011-04-05 17:28

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#12

帖子 aannvvc » 2011-05-10 16:52

onshoestring 写了:像是又动过分区,原来是sda8,现在变成sda5了。
sda5/etc/fstab:
# / was on /dev/sda8 during installation
# swap was on /dev/sda9 during installation

代码: 全选

sudo -i
mount /dev/sda5 /mnt
grub-install --boot-directory=/mnt/boot /dev/sda
mount --bind /proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
chroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
exit
非常感谢!亲爱的ubuntu我终于又回来了 :em21
coffeefirst
帖子: 43
注册时间: 2008-10-25 17:54

Re: ghost XP和ubuntu11.04双系统下安装WIN7后ubuntu神秘失踪...

#13

帖子 coffeefirst » 2011-07-06 11:04

onshoestring, could you please help me? I have got a nearly same question with this guy, viewtopic.php?f=139&t=337477
回复