Jump to content











Photo
- - - - -

GRUB4DOS - Find Splashimage

grub4dos splashimage gz

  • Please log in to reply
7 replies to this topic

#1 grrrd

grrrd

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    United Kingdom

Posted 01 June 2016 - 03:20 PM

Hi All;

 

I have created a simple menu.lst that provides two options which works exactly how I would like.

 

what i have done now is to start to 'tart' it up a little and provide a splash image on boot. This again works fine, but only in most occasions.

 

The issue comes when using my menu.lst on machines that have a inbuilt memory card reader and so the image file is not located where i would expect.

 

The current setup is to look on the section volume for the image - but is there a way to 'find' the splash image like when i find the ntldr?

 

My Menu.lst currently;

write (md)0x220+1 !BAT\necho -n -P:0000 $[0133]                      --- Rescue my PC ---                                         \0                              
initscript (md)0x220+1

password abcde
splashimage=(hd0,1)/BT/Restore/Image.xpm.gz
default 0
timeout 5
color white/blue 
color normal=0x0c highlight=0x1e helptext=0x0D standard=0x02 border=0x0c

title Boot to Windows\n
errorcheck off
find --set-root /ntldr || find --set-root /bootmgr
chainloader /ntldr || chainloader /bootmgr


#2 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 02 June 2016 - 12:39 AM

Try to replace this

 

splashimage=(hd0,1)/BT/Restore/Image.xpm.gz

 

with this:

 

find   --set-root   /BT/Restore/Image.xpm.gz   &&   splashimage   /BT/Restore/Image.xpm.gz

  • grrrd likes this

#3 grrrd

grrrd

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    United Kingdom

Posted 02 June 2016 - 07:59 AM

thanks tinybit - i will give this a try and let you know.



#4 grrrd

grrrd

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    United Kingdom

Posted 02 June 2016 - 08:18 AM

perfect fix - thank you very much! :good:



#5 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 June 2016 - 10:58 AM

OT, and if I may :unsure:, what is the reason of this entry?
title Boot to Windows\n
errorcheck off
find --set-root /ntldr || find --set-root /bootmgr
chainloader /ntldr || chainloader /bootmgr

that will alway attempt to boot a NT/2K/XP/2003 BEFORE attempting to boot a Vista/7/etc., the net effect on dual boot machines might be OK, you will always boot the NT/2K/XP/2003 and never to the Vista/7/etc., but actually any machine that has on *any* disk an instance of NTLDR in root and not a valid NT/2K/XP installation won't boot :dubbio:.

:duff:
Wonko
  • grrrd likes this

#6 grrrd

grrrd

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    United Kingdom

Posted 02 June 2016 - 02:09 PM

So maybe its me being a novice on this that is the issue? 

What i am doing is using Grub4Dos as a recuse 'partition'. My machines all have 2 activate partitions, first partition has windows 7 installed, the second is just a data store.

I load Grub and then time out the search for NTLDR to boot Windows 7 as its default option. If windows is corrupted (or a user wants a fresh start) when booting they press the 'down arrow' and can load Winpe via an ISO on the Data partition.

 

In all my tests this seems to work efficicently and i have yet to come in to any issues - could you share with me what you would do differently with this setup?

 

thanks 

 

My full menu.lst:

write (md)0x220+1 !BAT\necho -n -P:0000 $[0133]                      --- Rescue my PC ---                                         \0                              
initscript (md)0x220+1

password abcde
find   --set-root   /BT/image.xpm.gz    &&   splashimage   /BT/image.xpm.gz
default 0
timeout 5
color white/blue 
color normal=0x0c highlight=0x1e helptext=0x0D standard=0x02 border=0x0c

title Boot to Windows\n
errorcheck off
find --set-root /ntldr || find --set-root /bootmgr
chainloader /ntldr || chainloader /bootmgr

title Rescue my PC!
password abcde
find --set-root /BT/WinPE.iso
map /BT/WinPE.iso (0xff) || map --mem /BT/WinPE.iso (0xff)
map --hook
chainloader (0xff)


#7 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 02 June 2016 - 03:15 PM

Well, if - for any reason - you copy an original NTLDR to your "data store", booting through that menu.lst entry will fail.

If you have no NT/2K/XP/2003, it makes no sense to look for NTLDR and, if it is not found "switch" to BOOTMGR, BUT attempt to chainload NTLDR as well...

something *like*
find --set-root /ntldr && chainloader /ntldr && boot
find --set-root /bootmgr && chainloader /bootmgr

(haven't tested if the above actually works) would make more sense, but while the simplest solution that would work in your setup could be a much plainer:
find --set-root /bootmgr
chainloader /bootmgr

If you want to do something *advanced* you can use IFTITLE, *like*:
iftitle [find --set-root /ntldr] Boot to Windows NT/2K/XP
find --set-root /ntldr
chainloader /ntldr

iftitle [find --set-root /bootmgr] Boot to Windows VISTA/7/8
find --set-root /bootmgr
chainloader /bootmgr

or make it even more complex (but this is about multiple bootmgr's and/or ntldr/s on various volumes, consider it only a JFYI):
http://reboot.pro/to...-find-and-boot/

:duff:
Wonko
  • grrrd likes this

#8 grrrd

grrrd

    Frequent Member

  • Advanced user
  • 135 posts
  •  
    United Kingdom

Posted 03 June 2016 - 08:15 AM

Thanks for this Wonko - i will do some testing today and let you know what i find!







Also tagged with one or more of these keywords: grub4dos, splashimage, gz

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users