• Announcements

    • xper

      MSFN Sponsorship and AdBlockers!   07/10/2016

      Dear members, MSFN is made available via subscriptions, donations and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, become a site sponsor and ads will be disabled automatically and by subscribing you get other sponsor benefits.
Sign in to follow this  
Followers 0
Tripredacus

Modifying MBR to boot to second partition

5 posts in this topic

I am, once again, trying to find an alternate solution to running a system recovery than using the software we currently use. This time, instead of duplicating their recovery partition in order to redeploy with Imagex, I am making one of my own. To do this, I built a custom Win PE that launches a Flash Projector app that the user can use to recover the C drive. I have not been able to see if this portion is working yet as I am having a problem getting it to attempt to boot to the second partition, or even the main partition.

Jaclaz has mentioned a MBR app here: http://www.msfn.org/board/index.php?showto...st&p=769544

Which I must not be using properly. Let me run down the steps I've gone through so far, and how the system behaves after the reboot.

1. Boot into our normal PE and run the following in diskpart:

select disk 0
clean
create part pri size=62220
active
assign letter=c
format fs=ntfs quick
create part pri
select part 2
assign letter=d
format fs=fat32 quick
exit

2. Deploy the image to C, which is a Windows XP Pro SP2 x86 image.

3. Deploy the recovery image onto drive D

4. open up diskpart again

select disk 0
select vol 1
att vol set hidden
att vol set nodefaultdriveletter

5. Run mbr program (its in the recovery partition)

mbr 0 /install selm 5 11 "Press F11 for recovery" 0xC 0x52

6. Restart the PC.

If I let the computer boot normally, it reboots by itself and loops this way. This is fine atm because I don't care if it can boot into Windows.

If I press F11 when the prompt comes up, it reports that it cannot find boot media, or if LAN boot is enabled, it tries to boot of the IBA (Intel Boot Agent).

So I am thinking I am missing a step. Any ideas? The method of installing the MBR or the bootloader needs to be a 32bit app so that I can run it from the PE after imaging.

0

Share this post


Link to post
Share on other sites

Since you're using a hidden FAT32 volume anyway, maybe try the simpler SEL function instead of SELM?

mbr 0 /install sel 5 11 "Press F11 to boot the recovery partition"

0

Share this post


Link to post
Share on other sites

OK I found out why the C drive wouldn't boot. Diskpart showed both Vol 0 and Vol 1 to be HIDDEN NODEFAULTDRIVELETTER. So I clear those attributes on Vol 0 (Drive C) and it cleared it on both volumes. I assigned a letter to Vol 0 (C:) and Vol 1 (D:) but for some reason if I mark Vol 1 as HIDDEN, both volumes get marked HIDDEN. And yes, I am using sel vol 0 and sel vol 1.

So at this point, neither of the above MBR commands allow it to find the second partition.

0

Share this post


Link to post
Share on other sites

Some (small sketchy) info here - http://support.microsoft.com/kb/300415

XP TechNet - http://technet.microsoft.com/en-us/library/bb490893.aspx

Another more organized reference here - http://www.geocities.com/rick_lively/MANUA.../D/DISKPART.HTM

So is this a difference between using VOLume as apposed to PARTITION? I see that using VOL when using basic disks assumes "partition". In addition, it seems that somehow you may need to set the Recovery Partition to Active (has to be one active, you know). I have noted in the past (AFAIKR) that if only one partition exists then that partition will boot. Could be because on Compaq/HP (past experience), the BIOS "sees" only one and "decides" to boot to it; could have been because the Disk Boot Code (MBR)(before the Partition Boot) was "special code" by the OEM to set the only to active or just "go there" (kind of like Grub4Dos, also kindly provided by Jaclaz).

Any help here?

Edited by submix8c
0

Share this post


Link to post
Share on other sites

I got it to work, and also know why the attributes were being assigned to both volumes. This happened because the partition table is set up as MBR and not the GUID method.

Terrabyte Unlimited has a tutorial (of sorts) to set up a recovery partition. They also have a second revision.

http://www.terabyteunlimited.com/kb/article.php?id=277

I had to do some additional commands with MBR.EXE also. These in the image phase:

mbr 0 /install selm 5 11 "Press F11 for recovery" 0xC 0x1C
mbr 0 1 /h

The second, sets the second partition to hidden, so it does not appear in Windows. It still appears in DISKPART but it does not display the HIDDEN attribute, but it is still hidden anyways. Also have to add this to the boot process of the OS on the recovery partition:

mbr 0 /reset

This makes it so after you reboot from the recovery partition, it sets it back to being hidden and makes the first partition active, to allow you to boot into Windows again.

For now I am working on getting my custom software to work off the recovery partition, and for that I will make a post in the Windows PE forum.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.