Page 3 of 3 FirstFirst 123
Results 21 to 28 of 28

Thread: Windows 7 and partitions, on Ubuntu machine

  1. #21
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Windows 7 and partitions, on Ubuntu machine

    When Windows 7 is installed in a logical partition and the primary partition that normally contains Windows 7's boot loader files is deleted, 'Startup Repair' in the Windows Installation DVD can easily fix it.

    It seems to be necessary to run 'Startup Repair' twice in succession to accomplish that.
    The first run of 'Startup Repair' takes a long time and creates an new 'System Reserved' partition for the boot loader files if there is free space in the hard disk and a primary partition slot available in the MBR.
    The second run of 'Startup Repair' seems to complete the job, I'm not sure exactly what it does but it seems to be necessary for Windows 7 to boot up.

    I'm surprised how hard Windows 7's automated 'Startup Repair' tries to fix Windows 7.

  2. #22
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Windows 7 and partitions, on Ubuntu machine

    It is my understanding that beside which boot loader to use ntldr or bootmgr, the PBR also has the start and size of the NTFS partition. That has to match the partition table or its true size or else it will not work. But chkdsk also fixes the size in the PBR if needed. Not sure what else is in PBR.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #23
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Windows 7 and partitions, on Ubuntu machine

    It is my understanding that beside which boot loader to use ntldr or bootmgr, the PBR also has the start and size of the NTFS partition. That has to match the partition table or its true size or else it will not work. But chkdsk also fixes the size in the PBR if needed. Not sure what else is in PBR.
    Hmmm, I might end up needing to take a closer look into that before I'm through.

    After trying to use bootrec /fixboot to repair the Windows boot sector in a logical partition returns 'Element not found', and it doesn't seem to do any good as far as booting is concerned.

    There is another program that can be used instead. That program is called bootsect.exe and here's a web page showing a few different ways to go about it,How to Rebuild the Boot Sector for Windows Vista and Windows 7. - Terabyte.

    The code for installing a Windowx XP boot sector is D:\boot\bootsect /nt52 F: and the code for installing a Vista or Windows 7 boot sector is D:\boot\bootsect /nt60 F: (Where D: is the CDROM drive and F" is the Windows partition).

    I tried that and bootsect.exe said it has succeeded.

    Unfortunately though, I still only got as far as a black screen with a blinking cursor in the top left-hand corner when I tried to chainload it from GRUB, exactly the same as I was getting before.

  4. #24
    Join Date
    Jul 2005
    Location
    Hughenden, Australia
    Beans
    Hidden!
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Windows 7 and partitions, on Ubuntu machine

    As I already mentioned in an earlier post, I was happy and impressed to find out the the Windows Installation Disk's Startup Repair Tool can actually create a new primary partition and install the boot loader files into it when Startup Repair is run twice in succession. (Providing there is a spare primary partition number available and there is enough free space on the hard disk).

    I decided to see what happens when all the primary partition numbers in the hard disk are taken up by partitions formatted with Gnu/Linux file systems.
    The result was System Repair didn't recognize my Windows 7 installation as a valid Windows operating system and said it couldn't fix the problems.

    I tried plugging in the USB with the System Reserved partition (containing Windows 7's boot loader files) and rebooting the Installation Disk's and going to the repair utilities frame but the installation disc didn't accept the USB drive. It could run CHKDSK on it from the command line but it didn't recognise it as part of the Windows installation. I thought about trying to install a USB driver. I don't know whether that may have helped at all but I left that for a future experiment.

    But the Startup Repair worked fine when BCD was installed in my other hard disk in Windows XP.
    So the next thing I did was plug in my first hard drive again, the one with XP in it.
    I created a new partition of 101 MiB, formatted it NTFS and labelled it 'System Reserved'.
    Then I booted the Windows 7 installation disk and my Windows 7 was listed in the Repair Utilities operating system list again, so it was recognised as a valid Windows OS.
    I ran Startup Repair twice and it fixed the Windows 7 boot problem.

    Then I booted Ubuntu and took a look around to see what happened. I was hoping it would have used the 'System Reserved' partition I had made for it in my first hard disk. Instead, it installed BCD into my Windows XP again.

    So Windows 7 seems to be happy with its boot loader partition in a different internal hard disk than its operating system partition, but not an external USB disk. (Even though it can easily be booted from one). And it seems to prefer to install its boot loader into another Windows operating system instead of into an available empty partition.
    I wonder how it tells an empty partition from a Windows XP partition and it will create its own boot loader partition in an empty internal hard disk?
    Last edited by Herman; January 23rd, 2013 at 11:58 AM.

  5. #25
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Windows 7 and partitions, on Ubuntu machine

    Some of the Windows boot drive issues being discussed in this thread.
    http://ubuntuforums.org/showthread.php?t=2107126

    You can see details of PBR and the backup PBR with testdisk. The dump compares the two and it is about two pages long. Second page shows in text which boot loader it is using.

    This is my XP install after using a Windows 7 chkdsk, I did not save the second page, but there seem to be a lot of differences.

    Some info on Boot sector.
    http://thestarman.pcministry.com/asm/mbr/NTFSBR.htm
    Attached Images Attached Images
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  6. #26
    Join Date
    Mar 2005
    Location
    Ice cold Norway
    Beans
    517

    Smile Re: Windows 7 and partitions, on Ubuntu machine

    Not to interrupt the good talk here, but I managed to achieve what I wanted to do. Here's what I did:
    1. Put Windows 7 on a USB stick (NTFS)
    2. Resized a partition on the HDD leaving about 40 GB free
    3. Flagged that partition as boot (both using GParted)
    4. Disconnected the SSD which I used to boot Ubuntu 12.04 from
    5. Booted from the USB stick and put Windows 7 on the free space
    6. Finally I wrestled a bit with Windows and the BIOS before I found the right combination of boot order and boot flags (in GParted)
    7. Celebrated the victory

  7. #27
    Join Date
    Mar 2005
    Location
    Ice cold Norway
    Beans
    517

    Re: Windows 7 and partitions, on Ubuntu machine

    and 8. Came here and thanked you guys for all the help

  8. #28
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Windows 7 and partitions, on Ubuntu machine

    Glad you got it working.

    Herman & I did get a bit off topic as it should be about your issues.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







Page 3 of 3 FirstFirst 123

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •