From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Nm7Bd-00066N-Sc for garchives@archives.gentoo.org; Mon, 01 Mar 2010 15:05:34 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A9481E097D; Mon, 1 Mar 2010 15:04:39 +0000 (UTC) Received: from mk-outboundfilter-1.mail.uk.tiscali.com (mk-outboundfilter-1.mail.uk.tiscali.com [212.74.114.37]) by pigeon.gentoo.org (Postfix) with ESMTP id 3037EE095D for ; Mon, 1 Mar 2010 15:04:38 +0000 (UTC) X-Trace: 333026716/mk-outboundfilter-1.mail.uk.tiscali.com/PIPEX/$PIPEX-ACCEPTED/pipex-customers/81.86.110.137/None/peter.ruskin@dsl.pipex.com X-SBRS: None X-RemoteIP: 81.86.110.137 X-IP-MAIL-FROM: peter.ruskin@dsl.pipex.com X-SMTP-AUTH: aoyu93@dsl.pipex.com X-MUA: KMail/1.9.10 X-IP-BHB: Once X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEALZli0tRVm6J/2dsb2JhbACbDnS6OYR7BIsI X-IronPort-AV: E=Sophos;i="4.49,560,1262563200"; d="scan'208";a="333026716" X-IP-Direction: OUT Received: from 81-86-110-137.dsl.pipex.com (HELO nero.ruskin) ([81.86.110.137]) by smtp.pipex.tiscali.co.uk with ESMTP; 01 Mar 2010 15:04:37 +0000 From: Peter Ruskin Organization: Retired To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Dual booting Dell with Windows 7 Date: Mon, 1 Mar 2010 15:04:36 +0000 User-Agent: KMail/1.9.10 References: <201002131509.50360.michaelkintzios@gmail.com> <20100217103116.GA29205@math.princeton.edu> <358eca8f1002281551x4030c222rdaee05756bb00abd@mail.gmail.com> In-Reply-To: <358eca8f1002281551x4030c222rdaee05756bb00abd@mail.gmail.com> X-No-Archive: yes Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <201003011504.36971.peter.ruskin@dsl.pipex.com> X-Archives-Salt: 290ee713-ffff-4d9e-b3f7-c97a5e3e4c11 X-Archives-Hash: 3c606c8cd333efb22ff305c4ea831233 On Sunday 28 February 2010 23:51:21 Mick wrote: > I have now succeeded at achieving what I wanted: =A0to use the > Windows 7 boot manager (bootmgr.exe) which is the successor to > NTLDR to chainload GRUB from it and so leave the Windows > installation intact (at least until the warranty expires) ;-) > > I very briefly detail here the steps that I followed - if you > need more please contact me and I will help if I can, or if I get > some time I will sign up to edit a Wiki page. > > First the necessary WARNING: =A0You can render your MSWindows OS > unbootable and without an installation CD things can get hairy. > =A0So research the necessary steps to recover a borked MSWindows > boot system using the facilities offered by the OEM *before* you > start and use partimage to make a back up, just in case. > > There's two or three gotchas that make this more difficult than > chainloading GRUB from NTLDR.exe under Win2k and WinXP: > > 1. =A0Disk and partition signatures in the MBR are used by Vista > and Windows 7 to find the active boot partition of MSWindows. =A0If > you move that partition then its disk offset changes and you > start getting errors like "winload.exe..... is missing or > corrupt", when what has actually happened is that the drive ID > (partition signature) has changed and BCD doesn't know about it. > > 2. =A0OEMs use additional partitions to save installation images > for recovery purposes and they often mark these as active boot > partitions. The boomgr and BCD is consequently installed there as > part of the installation script - but it doesn't clearly tell you > this in the BCD file (that's the new boot.ini) unless you can > decipher partition ID signatures. =A0Remove that recovery partition > to save space and your MSWindows won't boot again. > > 3. =A0Windows 7 uses BitLocker on the IPL in the MBR and this may > introduce additional complications - you mess with the MBR and > then kiss goodbye to booting your MSWindows bloatware again. > > My solution worked by editing the BCD file using the native > editor provided by MSWindows, the bcdedit command. =A0The > winload.exe (which partly replaces NTLDR) is thereafter used > normally to launch an image of the GRUB partition boot record and > that of course knows where to jump to launch your Gentoo. > =A0There's no need for 3rd party boot managers - there are two or > three available like Neogrub which should do the same job by > offering you a GUI, but if you are capable enough to install > Gentoo then you can easily find your way around the BCD file with > bcdedit.exe. > > The main steps to achieve this solution are: > > 1. =A0Install GRUB in your Linux /boot partition and capture an > image of the partition boot record (it must be unmouted at the > time): > > dd if=3D/dev/sda5 of=3Dboot.lnx bs=3D512 count=3D1 > > 2. =A0Copy the boot.lnx file to C:\boot.lnx > > 3. =A0Launch cmd.exe as administrator and call bcdedit /v which > will show you something like this: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > C:\Windows\system32>bcdedit /v > > Windows Boot Manager > -------------------- > identifier =A0 =A0 =A0 =A0 =A0 =A0 =A0{9dea862c-5cdd-4e70-acc1-f32b344d47= 95} > device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0partition=3D\Device\HarddiskVol= ume2 > path =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\bootmgr > description =A0 =A0 =A0 =A0 =A0 =A0 Windows Boot Manager > locale =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0en-US > inherit =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {7ea2e1ac-2e61-4728-aaa3-896d9d0a= 9f0e} > default =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {fda5ebf3-119b-11df-969c-f924691e= 8117} > resumeobject =A0 =A0 =A0 =A0 =A0 =A0{5744906c-0bf4-11df-8e08-0026b920b49c} > displayorder =A0 =A0 =A0 =A0 =A0 =A0{fda5ebf3-119b-11df-969c-f924691e8117} > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {fda5ebf6-119b-11df-969c-= f924691e8117} > toolsdisplayorder =A0 =A0 =A0 {b2721d73-1db4-4c62-bf78-c548a880142d} > timeout =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 3 > > Windows Boot Loader > ------------------- > identifier =A0 =A0 =A0 =A0 =A0 =A0 =A0{fda5ebf3-119b-11df-969c-f924691e81= 17} > device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0partition=3DC: > path =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\Windows\system32\winload.exe > description =A0 =A0 =A0 =A0 =A0 =A0 Windows 7 Home Premium > locale =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0en-US > recoverysequence =A0 =A0 =A0 =A0{5744906e-0bf4-11df-8e08-0026b920b49c} > recoveryenabled =A0 =A0 =A0 =A0 Yes > osdevice =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0partition=3DC: > systemroot =A0 =A0 =A0 =A0 =A0 =A0 =A0\Windows > resumeobject =A0 =A0 =A0 =A0 =A0 =A0{5b312091-116a-11df-8b54-806e6f6e6963} > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > The first entry is the bootmgr, the second is MSWindows OS > partition. First make a back up of the BCD file: > > C:\Windows\system32>bcdedit /export C:\BCD_backup > > Then create a new entry using bcdedit for the Linux boot image, > by entering: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D > bcdedit /create /d "Gentoo Linux2" /application BOOTSECTOR > The entry {fda5ebf7-119b-11df-969c-f924691e8117} was successfully > created. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D > > Cut and paste the partition ID in all the subsequent commands: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > bcdedit /set {fda5ebf7-119b-11df-969c-f924691e8117} device boot > > bcdedit /set {fda5ebf7-119b-11df-969c-f924691e8117} path > /boot.lnx > > bcdedit /set {fda5ebf7-119b-11df-969c-f924691e8117} locale en-US > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > If you don't get "The operation completed successfully." you know > you've done something wrong. > > Then set it as last in the menu: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > bcdedit /displayorder {fda5ebf7-119b-11df-969c-f924691e8117} > /addlast The operation completed successfully. > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > and increase the delay before the menu automatically boots the > default (leave the default as MSWindows until you prove that your > Linux system can boot): > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > =A0bcdedit /timeout 10 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > Then run C:\Windows\system32>bcdedit /v to see what you have just > made, at the bottom of the menu: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > Real-mode Boot Sector > --------------------- > identifier =A0 =A0 =A0 =A0 =A0 =A0 =A0{fda5ebf6-119b-11df-969c-f924691e81= 17} > device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0boot > path =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0\boot.lnx > description =A0 =A0 =A0 =A0 =A0 =A0 Gentoo Linux > locale =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0en-US > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > > Now, this may not boot if your MSWindows boot drive is different > to the MSWindows OS partition (as was in my case). =A0So, we need > to point the bootmgr at the partition where the linux boot image > resides, in my case C: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > bcdedit /set {fda5ebf7-119b-11df-969c-f924691e8117} device > partition=3DC: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D > > Use the /v option to check all is good and reboot the machine. > Hopefully, you will be greeted with a GRUB splash. =A0:-) Thanks for the howto, Mick. I followed it on my Windows Vista Home=20 Premium 64; got "The operation completed successfully" all the way=20 through, but on reboot I don't get a boot menu. This doesn't matter much to me at the moment, as I use Acronis OSS=20 Selector for boot manager, but this doesn't work on Windows 7, so=20 my free update to Windows 7 is gathering dust. =2D-=20 Peter =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Gentoo Linux: Portage 2.2_rc63 kernel-2.6.32-gentoo-r5 AMD Phenom(tm) 9950 Quad-Core Processor gcc(Gentoo: 4.4.3) KDE: 3.5.10 Qt: 3.3.8b =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D