How to install Ubuntu11.04 after installing Windows 7

Source: Internet
Author: User
Tags flexnet
Figuring out what Adobe has done, this problem has been marked as a critical level (https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/730225) on Launchpad ). If you have not installed Ubuntu11.04Natty, please take it easy now; if it is already a victim, please 1. Go to Ubuntu and run sudodpkg-reconfiguregru

Figuring out what Adobe has done, this problem has been marked as a critical level (https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/730225) on Launchpad ).

If you have not installed Ubuntu 11.04 Natty, please take it easy now; if it is already a victim, please

1. Go to Ubuntu and run sudo dpkg-reconfigure grub-pc. Later, you will be asked to select the Grub installation target. Cancel the/dev/sda option here, ignore the warning, and select the partition installed in Ubuntu. This can be done before Ubuntu does not fix this problem, when the grub software package is upgraded, avoid damaging the NTFS partition again.

2. Find a Windows 7 installation disk, enter PE, run chdksk c:/f, restart, and enter Ubuntu again.

3. Execute sudo update-grub. At this time, you should be able to find the Windows startup Item again, and Windows should be able to enter normally.

4. if necessary, use sudo dd if =/dev/sda of =/ubuntu. mbr bs = 446 count = 1 back up the MBR, copy it to a partition recognized by Windows, and add a startup item under Windows. This can avoid the embarrassing situation of Ubuntu after Windows is reinstalled.

Bug Description
Binary package hint: grub
The new grub-install of natty alpha3 now detects and avoids FlexNet-occupied sectors, but it seems it somehow mishandles something and writes code into after sector 63, thus make the ntfs partition that starts there unbootable and unreadable.
I have tested with a memory stick/dev/sdc partitioned like this:
Ubuntu @ ubuntu :~ $ Sudo fdisk-lu/dev/sdc
Disk/dev/sdc: 16.2 GB, 16236085248 bytes
255 heads, 63 sectors/track, 1973 cylinders, total 31711104 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: 0x00063979
Device Boot Start End Blocks Id System
/Dev/sdc1 63 25671869 12835903 + 7 HPFS/NTFS
/Dev/sdc2 25671870 31696244 3012187 + 83 Linux
/Dev/sdc1 was not mounted.
/Dev/sdc2 was mounted on/mnt.
Then I downloaded FlexNet signature at http://forum.ubuntu.com.cn/viewtopic.php? F = 49 & t = 320155 & start = 30
Unzipped flexnet.sector32.zip, and wrote into sector32:
Sudo dd if = flexnet. sector32 of =/dev/sdc seek = 32
Ran grub-install, it detected and avoided that sector:
Ubuntu @ ubuntu :~ $ Sudo grub-install/dev/sdc -- root-directory =/mnt
/Usr/sbin/grub-setup: warn: Sector 32 is already in use by FlexNet; avoiding it. this software may cause boot or other problems in future. please ask its authors not to store data in the boot track.
Installation finished. No error reported.
NTFS partition/dev/sdc1 was now trashed. by design, the last sector of ntfs is a backup of its boot sector, so I copied the last sector of/dev/sdc1 to its first sector and successfully recovered the file system:
Ubuntu @ ubuntu :~ $ Sudo dd if =/dev/sdc of =/dev/sdc count = 1 seek = 63 skip = 25671869
I took a further look at the sectors and found that the first sector of the partition was not the only sector that was overwritten by grub, and was surprised that by recoverying only the first sector the whole file system seemed good.
By removing the FlexNet signature, grub-install never overwrite the NTFS sectors again.
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: grub (not installed)
ProcVersionSignature: Ubuntu 2.6.38-5.32-generic 2.6.38-rc6
Uname: Linux 2.6.38-5-generic i686
NonfreeKernelModules: wl
Architecture: i386
Date: Sun Mar 6 17:43:14 2011
LiveMediaBuild: Ubuntu 11.04 "Natty Narwhal"-Alpha i386 (20110302)
ProcEnviron:
LANGUAGE = en_US: en
LANG = en_US.UTF-8
SHELL =/bin/bash
SourcePackage: grub
UpgradeStatus: No upgrade log present (probably fresh install)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.