Jump to content











Photo
- - - - -

How to pre-modify boot.ini parameters?


  • Please log in to reply
14 replies to this topic

#1 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 06 February 2011 - 06:48 AM

Hello

I hope I can find an answer here. I want to create XP setup cd that by default will cause xp boot to use grub4dos as bootloader. So I know I can rename ntldr to ntldrxp and rename grldr to ntldr and put it inside i386 to be copied by xp setup. The problem is I also need to modify the boot.ini file. But when I look for it inside i386 setup I cannot find it. I guess that XP setup generates it during initial setup. So my question is is there a way to modify the boot.ini file generation? I want it to include the following lines by default:

title Microsoft Windows XP SP2 Pro (Find and Load)
find --set-root /ntldrxp
chainloader /ntldrxp

By the way, the reason I want to use grub as default boot loader is because I want to format the system drive using 64K cluster size which is not supported by default xp boot method (Anyone know any alternative fix for this?)

Thanks

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 February 2011 - 11:12 AM

With all due respect :ranting2: you have some ideas mixed ;).
Renaming the ntldr to ntldrxp is not recommended (but it's allright).
Writing to BOOT.INI this:
title Microsoft Windows XP SP2 Pro (Find and Load)

find --set-root /ntldrxp

chainloader /ntldrxp
is pointless :w00t:, since the above is an entry for menu.lst (the grub4dos configuration file).
BOOT.INI is generated during the setup and it is CHANGED by setup itself during the setup itself.

What you may want to do is to edit the internal, embedded menu.lst grldr contains, but you will need more than that entry if you want to actually use it during setup.

As a "generic" tip, to have addtional files copied during setup from source to target you add files to the source "\I386" directory and you add entries for them in TXTSETUP.SIF.

I am also missing :w00t: HOW do you plan to proceed - assumed that you are actually booted by grub4dos/grdr to format anythyng with a 64K cluster size (and also wondering WHY you would need to do that. :unsure:

Maybe you could explain better your "overall goal" (which is not "using grldr before ntldr" nor "format with 64 Kb cluster"), explaining why you would want to use 64 Kb clusters, which only practical use AFAIK is with FAT16 to increase the max capacity from around 2 Gb to around 4 Gb?

:cheers:
Wonko

#3 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 06 February 2011 - 03:46 PM

Thanks. I might had things confused. Anyway I want to install XP SP3 on a new HDD that was formated using Win7PE with 64K cluster size. This is the only way this HDD can be formated and remain aligned since this is an advanced format drive by WD (1.5T caviar black). I have a 120GB partition created with Win7PE for system files. After XP setup copies the initial files, I get a disk error on first reboot. I tried to use Paragon multiboot tool and it did fix the problem, but I want to have this fix or an alternative by grub4dos be added to my unattended setup. If you have any other ideas, I'd really appreciate it.

Thanks

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 February 2011 - 04:26 PM

Thanks. I might had things confused. Anyway I want to install XP SP3 on a new HDD that was formated using Win7PE with 64K cluster size. This is the only way this HDD can be formated and remain aligned since this is an advanced format drive by WD (1.5T caviar black). I have a 120GB partition created with Win7PE for system files. After XP setup copies the initial files, I get a disk error on first reboot. I tried to use Paragon multiboot tool and it did fix the problem, but I want to have this fix or an alternative by grub4dos be added to my unattended setup. If you have any other ideas, I'd really appreciate it.

Thanks

Yep :cheers:, what I am missing :cheers: (or you are missing :ph34r:) are TWO :merc: logical links in your chain of thoughts.
I am currently missing:
  • the actual *need* of anything being formatted 64 Kb clusters to represent the *only* way ....
  • the actual *usefulness* of grub4dos connected with formatting ot partitioning matters...

So, if you could provide the actual error you get, we could start from there and understand WHAT causes it (and hopefully find a way to avoid having it).

NTFS default cluster sizes have always worked, and since they are mostly 4kb, they don't have AFAIK *any* possible conflict with 4 kb sectors disks (like I presume your disk is):
http://support.micro...kb/140365/en-us

AFAIK the problems come from having 4Kb sectors (and NOT 64 Kb clusters):
http://www.anandtech.com/show/2888
http://forum.hddguru...now-t15827.html

This may help in clearing the terminology:
http://forums.pcper....ad.php?t=469818

Are we talking about this:
http://www.wdc.com/g...id=7&language=1
http://support.wdc.c...dsw.asp?sid=123
(or something else?)

:rofl:
Wonko

#5 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 06 February 2011 - 05:20 PM

Yep :cheers:, what I am missing :cheers: (or you are missing :ph34r:) are TWO :merc: logical links in your chain of thoughts.
I am currently missing:

  • the actual *need* of anything being formatted 64 Kb clusters to represent the *only* way ....
  • the actual *usefulness* of grub4dos connected with formatting ot partitioning matters...

So, if you could provide the actual error you get, we could start from there and understand WHAT causes it (and hopefully find a way to avoid having it).

NTFS default cluster sizes have always worked, and since they are mostly 4kb, they don't have AFAIK *any* possible conflict with 4 kb sectors disks (like I presume your disk is):
http://support.micro...kb/140365/en-us

AFAIK the problems come from having 4Kb sectors (and NOT 64 Kb clusters):
http://www.anandtech.com/show/2888
http://forum.hddguru...now-t15827.html

This may help in clearing the terminology:
http://forums.pcper....ad.php?t=469818

Are we talking about this:
http://www.wdc.com/g...id=7&language=1
http://support.wdc.c...dsw.asp?sid=123
(or something else?)

:rofl:
Wonko



Yes that's the one from WD. I don't know how to post images here, but after I use WD tool or Win7PE to create the 120GB system partition, I install XP, after files finish being copied and right after the first reboot I get the following error:

"A disk read error occurred..
Press Ctrl-Alt-del to restart.."

IF I format the partition using XP, then I do not get this error. But WD recomands for best performance to use win7 format or use their advanced format tool. Even if I use XP to format than use WD Acronis tool to Align the partition, I end up getting the same error trying to install XP...

XP simply wont boot to advanced format drive... I found a work around. Using Paragon boot manager (rescue disk) right after the first boot of XP setup, before the error appears, I can create a multiboot menu and then XP setup continues without any errors.

Using Acronis disk director 11, I see that Win7PE default cluster size was 64K not 4K, probably because of this advanced format drive, which uses 4096byte sector size not 512...

So as I see it, looks like XP can work with this HDD, but it must be booted alternatively. So this is why grub4dos came to my mind.

Any other ideas? I gues that this drive behaves similar to SSD drive in terms of needing to be optimally aligned.

Thanks for the help

#6 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 06 February 2011 - 05:33 PM

OK, you are right. This is not a cluster size issue. Even if I use Disk director to format the drive with 4Kb cluster size, use WD tool to make sure partition is aligned per the AF spec, still XP wont boot without the alternative boot method. XP will only boot to a partition formated by XP, but with this kind of partition, WD tool reports that partition is not aligned.. So I use the WD tool to align, here we go again, XP wont boot... But again, Paragon boot manager can create to multiboot to load XP w/o a problem.. I can live with that, but I wanted to have a fully unattended XP CD that do not depand on third party tool like Paragon boot manager, which adds some folder to root directory...

#7 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 06 February 2011 - 05:42 PM

...I can live with that, but I wanted to have a fully unattended XP CD that do not depand on third party tool like Paragon boot manager, which adds some folder to root directory...

Are you attempting to produce an unattended XP installation process for deployment to a large number of computers equipped with the HDD model you've mentioned?

Could you potentially benefit from a batch file which could be launched as part of the GUI portion of Setup and which would do something like:

attrib -s -h -r c:\boot.ini

copy /y d:\special.ini c:\boot.ini

attrib +s +h +r c:\boot.ini

copy d:\grldr c:\GRLDR

? If so, I think that there is the possibility of using an $OEM$ directory, or something like that. I'd have to review 2000/XP/2003 slip-streaming, OEM setup, or maybe even SysPrep documentation to remember exactly.

Nevermind the strike-through above. You need this pre-GUI-portion.

#8 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 06 February 2011 - 05:50 PM

Thanks. where exactly this pre-gui file located? Do i need to copy grub4dos files to cd root?

#9 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 06 February 2011 - 06:09 PM

Thanks. where exactly this pre-gui file located? Do i need to copy grub4dos files to cd root?

Perhaps you could prepare your .ISO to actually boot GRLDR instead of Windows Setup. You could then include a MENU.LST on that .ISO. That MENU.LST could search for a "sentinel" file in order to determine which phase of your unattended process is the current phase. For example, find --set-root could be used to search for $WIN_NT$.~BT/TXTSETUP.SIF. If it finds it, then you'd want to boot your "repair" environment. If it doesn't find it, it should boot Windows Setup.

You might then also have your "repair" environment create another sentinel file "DONE.TXT". The MENU.LST could look for this file, too. If it's found, then you'd want to continue Windows Setup's latter phases by booting the now-installed NTLDR on the now-"repaired" NTFS volume that Windows has begun installing to.

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 February 2011 - 06:10 PM

Yes that's the one from WD. I don't know how to post images here, but after I use WD tool or Win7PE to create the 120GB system partition, I install XP, after files finish being copied and right after the first reboot I get the following error:

"A disk read error occurred..
Press Ctrl-Alt-del to restart.."

Let's troubleshoot this problem.
What I need (THREE sets of files):
  • a copy of the MBR
  • a copy of the PBR
After the "normal" partitioning/formatting performed by Windows 7.

  • a copy of the MBR
  • a copy of the PBR
After the "normal partitioning/formatting performed by XP

  • a copy of the MBR
  • a copy of the PBR
After the "normal partitioning/formatting performed by XP AND the run of the WD alignment tool

To make sure I am not missing anything, I would like to have also a fourth set of files:
  • a copy of the MBR
  • a copy of the PBR
Taken in the sitauation (whatever it is) that actually gives you the mentioned errors.

A suitable tool to get these files is to use HDHacker:
http://dimio.altervista.org/eng/
and get once the first sector of the \\.\Physicaldrive and once the first 16 sectors of the \\.\Logicaldrive.
(or you can use any disk editor, if you know what you are doing)

Once you have the files (possibly named in an understandable way, like (example):
  • 7_MBR.DAT
  • 7_PBR.DAT
  • XP_MBR.DAT
  • XP_PBR.DAT
  • XP_WD_MBR.DAT
  • XP_WD_PBR.DAT
  • Prob_MBR.DAT
  • Prob_PBR.DAT

Compress them together in a .zip or .7z archive, upload it on any free file hosting site and post a link to the archive.

:ph34r:
Wonko

#11 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 06 February 2011 - 06:43 PM

Thanks

I can only access the sys drive offline using Win7PE or Hiren's mini XP. Will HDHacker (is it or any alternative tool already available on Hiren boot cd 14?) work from any of these live cd's?

#12 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 06 February 2011 - 07:23 PM

this drive behaves similar to SSD drive in terms of needing to be optimally aligned.

Use diskpar.exe (yes, diskpar) to partition drive.
Align first partition to sector 64. Align
Format drive within XP setup.

#13 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 06 February 2011 - 07:45 PM

Don't use WAREZ. :cheers:

AFAIK HDhacker should run allright in a 7PE.

Actually anything with direct disk access will do.

The diskpar approach is also a valid one, as anything cdob :merc: comes out with, BUT I would not be so sure about the 64 sectors offset on a 4kb sector drive :ph34r: being the "best" choice, anyway here is some additional info, from the mouth of the wolf:
http://technet.micro...643096(EXCHG.80).aspx

Since the stoopid board software breaks links containing parenthesis (brackets), copy and paste:
http://technet.microsoft.com/en-us/library/bb643096(EXCHG.80).aspx

I wonder if with these large sectors the actual good ol' 64 is still valid, or if there are "better" values. :cheers:

:rofl:
Wonko

#14 cdob

cdob

    Gold Member

  • Expert
  • 1469 posts

Posted 06 February 2011 - 08:53 PM

I wonder if with these large sectors the actual good ol' 64 is still valid, or if there are "better" values. :dubbio:

http://www.anandtech.com/show/2888/2

In order to solve the misalignment issue, Western Digital is offering two solutions. The first solution for correcting misaligned partitions is specifically geared towards Win 5.x, and that is an option on the drive itself to use an offset. Through the jumpering of pins 7 and 8 on an Advanced Format drive, the drive controller will use a +1 offset, resolving Win 5.xx’s insistence on starting the first partition at LBA 63 by actually starting it at LBA 64, an aligned position.

That's recommended for a single partition at hard disk only.

Sector 64 is the hard disk manufacturer suggestion.

Other manufacturer may suggest other offsets.

If you use third party drive backup tools a more common offset may be nice.
A current third party drive backup tool should have been tested at Windows 7 nowadays.

http://www.wdc.com/w...2579-771430.pdf

#15 EB1000

EB1000

    Newbie

  • Members
  • 19 posts
  •  
    Israel

Posted 09 February 2011 - 11:55 AM

OK thanks for everyone for the help and support. I've changed my mind a little and decided to go for a true SSd drive. I'll be using my 1.5TB WD HDD as a secondary drive (formated using Win7PE). I just ordered OCZ PCI-E x4 SSD 120GB drive after reading the guide cdod posted (thanks!). I will try to follow the guide and install xp on the new SSD. Actually I never new such an interface exists for a HD.. with 480MB/sec I think I'll be soon upgrading all my HDD to PCI-E SSD!! (when I'll be able to afford it..)
Anyway, my new SSD should arrive in a few days. I'll open a new thread and keep you updated.

Thanks

link to my new (120GB) drive:

http://www.ocztechno...xpress-ssd.html

Edited by EB1000, 09 February 2011 - 11:56 AM.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users