关于64位 windows&linux双系统引导问题,64位windows


换了台本子win7 64位,抽空做个双系统,装了下linux。

遇到开机问题:进linux可以正常使用,进win7花屏死机,初步估计是grub(此时的boot sector位grub)的问题,启动器被破坏一种表现。

对应做了以下处理:

1、在linux下修改/boot/grub/gurb.cfg,把:

 1  ### BEGIN /etc/grub.d/30_os-prober ###
 2  menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-04EC18F4EC18E22A' {
 3        insmod part_msdos
 4         insmod ntfs
 5        set root='hd0,msdos1'
 6         if [ x$feature_platform_search_hint = xy ]; then
 7     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  04EC18F4EC18E22A
 8        else
 9           search --no-floppy --fs-uuid --set=root 04EC18F4EC18E22A
10         fi
11         parttool ${root} hidden-
12         chainloader +1
13  }
14 ...
15 }
16 ### END /etc/grub.d/30_os-prober ###

修改为:

 1  1 fi

2 parttool ${root} hidden-

3 ntldr /bootmgr ### bootmgr启动器 ###  

重定位启动位置。

 

而后重装grub,quote网上案例:

事先在bash做个update-grub

可以得到

win系统的硬盘所在位置

比如,win7 on /dev/sda1

 

而后

 1 $sudo fdisk -l  

--》

 1 Disk /dev/sda: 500.1 GB, 500107862016 bytes  
 2 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors  
 3 Units = sectors of 1 * 512 = 512 bytes  
 4 Sector size (logical/physical): 512 bytes / 512 bytes  
 5 I/O size (minimum/optimal): 512 bytes / 512 bytes  
 6 Disk identifier: 0xc3ffc3ff  
 7   
 8 Device Boot Start End Blocks Id System  
 9 /dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT  
10 /dev/sda2 206848 102402047 51097600 7 HPFS/NTFS/exFAT  
11 /dev/sda3 102402048 266242047 81920000 7 HPFS/NTFS/exFAT  
12 /dev/sda4 266244094 976771071 355263489 f W95 Ext'd (LBA)  
13 /dev/sda5 266244096 362371071 48063488 7 HPFS/NTFS/exFAT  
14 /dev/sda6 362373120 771971071 204798976 7 HPFS/NTFS/exFAT  
15 /dev/sda7 771973120 772165631 96256 83 Linux  
16 /dev/sda8 772167680 776165375 1998848 82 Linux swap / Solaris  
17 /dev/sda9 776167424 912883711 68358144 83 Linux  
18 /dev/sda10 912885760 976771071 31942656 83 Linux  

可以看到win系统所在位置,起始位2048,end在206847,以及sector的信息  sectors of 1 * 512 = 512 bytes。

——》

1 sudo grub-install /dev/sda  
2 sudo update-grub  
3 sudo dd if=/dev/sda of=/dev/sda bs=512 count=1 seek=2048 skip=206847

so on。

相关内容

    暂无相关文章