Jump to content











Photo
* * * * * 1 votes

Colorful boot menu with ansi escape code in Boot.ini


  • Please log in to reply
13 replies to this topic

#1 fujianabc

fujianabc

    Member

  • Members
  • 46 posts
  •  
    China

Posted 01 January 2010 - 01:12 PM

Happy new year! :)

Here is a small trick for the boot.ini file. You can use ansi escape code in boot.ini file to make a color boot menu :) .
e.g.
[boot loader]

timeout=30

default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="?[1;32mMicrosoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT

c:\grldr="Grub4dos"

multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windmows Server 2003" /noexecute=optout /fastdetect

c:\bootsect.bin="MS-DOS"
And you will see the menu

Attached Thumbnails

  • 1.png


#2 ireneuszp

ireneuszp

    Frequent Member

  • Advanced user
  • 191 posts
  •  
    Poland

Posted 01 January 2010 - 02:18 PM

:) thanks, nice trick ;)

#3 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 01 January 2010 - 02:37 PM

yummmmmyyyy :)

#4 agni

agni

    Frequent Member

  • Tutorial Writer
  • 270 posts
  • Location:Bengaluru (Bangalore)
  •  
    India

Posted 01 January 2010 - 04:52 PM

Amazing!
How did you find this?

#5 fujianabc

fujianabc

    Member

  • Members
  • 46 posts
  •  
    China

Posted 02 January 2010 - 06:33 PM

Amazing!
How did you find this?

It is found about 4 years ago.
http://www.cn-dos.ne...d.php?tid=20816

This discovery is a by-product during the crack of NTLDR.

#6 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 03 January 2010 - 06:45 PM

This discovery is a by-product during the crack of NTLDR.

For what reason was NTLDR cracked?

:)

#7 Rinrin

Rinrin
  • Members
  • 8 posts
  •  
    China

Posted 28 March 2010 - 04:38 AM

For what reason was NTLDR cracked?

:)

not cracked, just by reviewed disassembly code.
the original thread from here:
http://bbs.znpc.net/...ead.php?tid=874

#8 daylight

daylight
  • Members
  • 3 posts
  •  
    United Kingdom

Posted 13 August 2011 - 11:12 PM

can you very kind and provide the actual boot.ini file so i can learn this method.
I have tried copy paste the code provided but my pc was un-bootable and i have to use recovery disk to replace boot.ini

thanks a lot

Edited by daylight, 13 August 2011 - 11:13 PM.


#9 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 13 August 2011 - 11:36 PM

The code you see in the first post once was an actual boot.ini. However the migration during the board update has screwed it up.
Wait till the board is properly working again. With some luck, the problem will then have fixed itself.

:cheers:

#10 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 13 August 2011 - 11:46 PM

Yes, please allow 1~2 days for us to get these details fixed.

#11 daylight

daylight
  • Members
  • 3 posts
  •  
    United Kingdom

Posted 13 August 2011 - 11:47 PM

Thanks friends for a quick response.
i will wait then.
and keep my fingers across

#12 amalux

amalux

    Platinum Member

  • Tutorial Writer
  • 2813 posts
  •  
    United States

Posted 14 August 2011 - 03:15 AM

Should find what you need in here: http://www.mediafire...4jp85/grldr.zip

:cheers:

#13 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 14 August 2011 - 12:48 PM

This is the BOOT.INI inside the archive amalux provided:

[boot loader]
Timeout=30
Default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="LAST CONFIG - XP Pro (Last Configuration)" /noexecute=optin /fastdetect
C:\grldr="Start GRUB4DOS Menu"
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="MP HALMACPI - XP Pro (ACPI Multiprocessor PC) for multi-core, hyperthreading" /noexecute=optin /fastdetect /kernel=ntkrmp.exe /hal=halmacpi.dll /SOS /WINVBLOCK=BUS=1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="UP HALAACPI - XP Pro (ACPI Uniprocessor PC) for single-core, no hyperthreading" /noexecute=optin /fastdetect /kernel=ntkrup.exe /hal=halaacpi.dll /SOS /WINVBLOCK=BUS=1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="UP HALACPI - XP Pro (ACPI PC) for most compatability on ACPI computers" /noexecute=optin /fastdetect /kernel=ntkrup.exe /hal=halacpi.dll /SOS /WINVBLOCK=BUS=1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="MP HALMPS - XP Pro (MPS Multiprocessor PC) for multi-core Xeons" /noexecute=optin /fastdetect /kernel=ntkrmp.exe /hal=halmps.dll /SOS /WINVBLOCK=BUS=1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="UP HALAPIC - XP Pro (MPS Uniprocessor PC) for single-core Xeons" /noexecute=optin /fastdetect /kernel=ntkrup.exe /hal=halapic.dll /SOS /WINVBLOCK=BUS=1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="UP HALSTAN - XP Pro (Standard PC) for old non-ACPI computers" /noexecute=optin /fastdetect /kernel=ntkrup.exe /hal=halstan.dll /SOS /WINVBLOCK=BUS=1
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="MP HALSP - XP Pro (Compaq SystemPro Multiprocessor PC)" /noexecute=optin /fastdetect /kernel=ntkrmp.exe /hal=halsp.dll /SOS /WINVBLOCK=BUS=1

with the actual ANSI codes bolded.



The "square" is 0x1B, i.e. first element in the above is
1B 5B 31 3B 33 30 6D = 


Colour reference:

http://ascii-table.c...e-sequences.php

Here is the "original" BOOT.INI by fujianabc, having replaced the characters stupidly parsed by the stupid board software parser.
Please note that it is so stupid (or so stupidly set) to not even parse things wrongly in the SAME way, first occurrence of 0x1B has become "?" or 0x5B whilst all the others remained 0x1B :w00t:

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP Professional" /NOEXECUTE=OPTIN /FASTDETECT
c:\grldr="Grub4dos"
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="Microsoft Windmows Server 2003" /noexecute=optout /fastdetect
c:\bootsect.bin="MS-DOS"




:cheers:
Wonko

#14 daylight

daylight
  • Members
  • 3 posts
  •  
    United Kingdom

Posted 14 August 2011 - 12:51 PM

Thanks my friends.
all understood and all working perfect.
appreciated.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users