關於64位 windows&linux雙系統引導問題

來源:互聯網
上載者:User

標籤:dos   its   update   linux   啟動   star   ini   amp   rac   

換了台本子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 04EC18F4EC18E22A10         fi11         parttool ${root} hidden-12         chainloader +113  }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。

關於64位 windows&linux雙系統引導問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.