Jump to content











Photo
* * * * * 3 votes

Easy2Boot Development Discussion

grub4dos multiboot multipass usb boot iso

  • Please log in to reply
1158 replies to this topic

#51 Rootman

Rootman

    Frequent Member

  • Advanced user
  • 241 posts
  • Location:USA

Posted 11 March 2013 - 03:08 PM

However, there are many non-linux ISOs that do not work - Hirens, DLC, all Windows install ISOs, ERD Commander 2005, Diag504fCD.iso WD diag (needs --mem), MSDart (needs hd0/hd1 swap), many linux iso with persistence (file needs to be specified using cheat codes) and many others that I can't remember...

 

Thanks, I may have to mess with it some more, never can leave a good thing alone :)

 

Interestingly I downloaded the Hirens latest version and stuck it in the AUTO folder, it booted just fine and the few items I tried from it worked just fine including the mini XP.  So Hirens WILL work in the auto folder.



#52 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 11 March 2013 - 03:19 PM

Interestingly I downloaded the Hirens latest version and stuck it in the AUTO folder, it booted just fine and the few items I tried from it worked just fine including the mini XP.  So Hirens WILL work in the auto folder.

Did you get a fully populated desktop with about a dozen or more icons on it?



#53 Rootman

Rootman

    Frequent Member

  • Advanced user
  • 241 posts
  • Location:USA

Posted 11 March 2013 - 04:45 PM

Did you get a fully populated desktop with about a dozen or more icons on it?

 

Just to be sure I booted  the Hirens ISO in VirtualBox to compare with what I got with USB boot from the AUTO directory and NO the mini XP does NOT show the fully populated desktop, so to use it a .MNU file with proper cheatcodes will have to be used.

 

So you are in fact right, Hirens will not boot correctly to EVERYTHING using the auto boot method.  But since I am not interested in the mini XP (I have a full working Win 7 PE and a WIn XP PE of my own) it's not an issue.

 

Are there other portions of Hirens which will not work correctly by booting into it from the AUTO directory? Everything else that I tried seemed to work OK.



#54 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 11 March 2013 - 05:05 PM

See http://www.rmprepusb...utorials/hirens - DOS programs and MiniXP need the \HBCD folder. If it sees the ISO at \ISO\Hiren'sBootCD.iso  (note spelling) then mini XP will work as it mounts the ISO once it has booted.



#55 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 16 March 2013 - 06:48 PM

BETA06 available.

 



#56 DanielCollinet

DanielCollinet
  • Members
  • 4 posts
  •  
    Aruba

Posted 17 March 2013 - 01:58 PM

Hello and thx for nice tool...sry for my bad english.

I installed it on usb hard drive^^(beta05). I try to install win 7, and as long as you use given name(Win7_32_SP1.ISO)it is working, but if you use another isoname(e.g 7x86) it is not working... I tried to understand what is going on

# list all files in the /ISO folder so the user can see them
/grub/ListFileExt.g4b /_ISO/Windows/Win7 .iso
::ls ()/_ISO/Windows/Win7/
echo   ->working
# Ask user which iso they want (name is converted to uppercase as /u is specified)
set /p /u ask=Enter iso filename WITH NO .ISO EXTENSION (e.g. Win7Pro32 ) :  -> working
if "%ask%"=="" echo No iso file specified! && configfile /grub/menuwin7.lst
clear
# check if user entered a valid filename with no ISO extension!
ls /_ISO/Windows/Win7/%ask%.iso || echo Cannot find /_ISO/Windows/Win7/%ask%.iso !!! && pause --wait=3 && configfile (bd)/grub/menu.lst
echo Loading /_ISO/Windows/Win7/%ask%.iso - please wait ...  -> never get here ,if I use own label

 

Why can't use own isolabel?

My .iso name is found (7x86) tries to load -> seems to work -> then "file can not be found" message appears -> but which file? ->

 

and loop -> I can go through the whole menu again and "%ask%" includes the last typed name ->7x86 will kept in memory, even if I type no name, the last given name is used.

I change the name of my isofile as given in your file( iftitle [if exist /_ISO/Windows/Win7/win7_32_SP1.iso] )

 

Is there any possibility to integrate $oem$ folder, I mean to tell setup where to find folder... no need to integrate into iso. That would be very flexible, perhaps in mysetup.cmd(tut43)?

 

thx


Edited by DanielCollinet, 17 March 2013 - 02:26 PM.


#57 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 17 March 2013 - 02:55 PM

Hi

First - it won't work using a hard disk - that is why the documentation, etc, says use a FLASH DRIVE.

If you use a hard disk to try to boot WIn 7 install ISO, then you will be prompted for a CD driver when you try to install Windows. Please see Tutorial 43 for more details.

Secondly, when you type the name of the ISO file do NOT type the .ISO extension, i.e.

 

7x86  = OK

7x86.ISO = BAD - will not find it



#58 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 17 March 2013 - 03:07 PM

Secondly, when you type the name of the ISO file do NOT type the .ISO extension, i.e.

 

7x86  = OK

7x86.ISO = BAD - will not find it

Maybe :unsure:

 

 

 



set ask=%ask:.iso=%

:cheers:

Wonko



#59 DanielCollinet

DanielCollinet
  • Members
  • 4 posts
  •  
    Aruba

Posted 17 March 2013 - 03:08 PM

Hi steve6375,

thx for respond. I have read your advice not to use hard drive(but ignored it^^).

Did the changes to isofiles as described in tut43, here I found your link to easyboot...

 

found some errors in MenuWin7.lst :

line26

iftitle [if exist /_ISO/Windows/Win7/win7_64_SP1.iso] INSTALL Windows 7 SP1 32-bit\n This will install Windows 7 to your hard disk

should be 64

 

line 103

find --set-root /ISO/%ask%.iso

should be /_ISO/

 

Is there a method to integrate $oem$ folder in a flexible way, instead to integrate it on any iso?

 

edit:

 

tried the line changes:

getting:

find --set-root /_ISO/%ask%..iso

"Error 15: File not found"

could be one dot too much...

 

If I use your label,name I am able to install win7...


Edited by DanielCollinet, 17 March 2013 - 03:23 PM.

  • steve6375 likes this

#60 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 17 March 2013 - 03:27 PM

Is there a method to integrate $oem$ folder in a flexible way, instead to integrate it on any iso?

 

I am not sure how to do this using the setup.exe. Maybe you could specify the folder in the AutoUnattend.xml file?

If you want an automatic way of installing Win7, then the Win7 install from ISO is not the way to do it. I would boot to WinPE and the use a script to partition and format the drive, extract a wim file, add extra drivers, etc. + a purpose made unattend.txt.

 

Thanks for the bug/typo reports!


  • Motasem likes this

#61 DanielCollinet

DanielCollinet
  • Members
  • 4 posts
  •  
    Aruba

Posted 17 March 2013 - 04:41 PM

Hello steve6375,

I made some changes...again

 

line 103

find --set-root /_ISO/%ask%.iso

changed to

 

find --set-root /_ISO/Windows/Win7/%ask%.iso

now i can use custom name...

 

I want to have multiple $oem$ folder(s) and autounattend.xml files  anywhere on my USB drive and call them directly from windows setup.

 

thx


Edited by DanielCollinet, 17 March 2013 - 04:53 PM.


#62 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 17 March 2013 - 04:55 PM

Thanks - I will change the Q for next release so that it asks for the .iso extension as well, I must admit I often type in  xxx.iso instead of xxx myself!!

I did it to save typing, but it just causes confusion!

 

For a HDD this is more difficult. If you also had a small USB flash drive connected, you could overwrite the USB flash drive \AutoUnattend.xml file with your own version from the hard disk and then boot to Setup???



#63 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 27 March 2013 - 11:23 AM

BET08 now available.

 

Details here



#64 DanielCollinet

DanielCollinet
  • Members
  • 4 posts
  •  
    Aruba

Posted 30 March 2013 - 05:32 PM

Hi Steve6375,

after a lot of searching and reading(didn't know how to call this)

 I have read this thread:

http://reboot.pro/to...so-files/page-2

 

sushil1576 was trying to call custom $oem$ folder from setup.exe. I don't know if I am right but I can give setup.exe parameters?

I will try to build a new mysetup.cmd... thx. Perhaps you got some tut's that could help.

 

greetings



#65 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 30 March 2013 - 06:48 PM

maybe this is more what you want???



#66 halikus

halikus

    Frequent Member

  • Advanced user
  • 110 posts
  •  
    Canada

Posted 03 April 2013 - 07:14 AM

I have been testing this project and love it.  I did a few modifications to addiso.g4b and duplicated the nessessary lst and mnu files to have more boot options.  More is better :)

 

doing this will allow it to load isos off usb AND cd in a submenu.

 

:.makemenu
if "%DD%"=="1" echo @MAKEMENU
setlocal
if "%DD%"=="1" echo Checking (bd)%DIR%/%1
if "%1"=="" endlocal && goto :EOF
::If is a directory ignore it
cat --length=0 (bd)%DIR%/%1 || goto :EOF
:: if not iso file then ignore
if "%DD%"=="1" echo MAKEMENU: checking %~x1 extension
WENV check "#.iso#"=="#%~x1#" || goto :EOF
set hlp=\n Boot from %1\n
echo Adding %DIR%/%1
echo title %1 %hlp% >> (md)0x3000+0x50
echo map  %DIR%/%1 (0xff) >> (md)0x3000+0x50
echo map --hook >> (md)0x3000+0x50
echo root (0xff) >> (md)0x3000+0x50
echo chainloader (0xff) >> (md)0x3000+0x50
echo >> (md)0x3000+0x50
goto :EOF

 

 

 

this does the same, but loads it to memory

 

:.makemenu
if "%DD%"=="1" echo @MAKEMENU
setlocal
if "%DD%"=="1" echo Checking (bd)%DIR%/%1
if "%1"=="" endlocal && goto :EOF
::If is a directory ignore it
cat --length=0 (bd)%DIR%/%1 || goto :EOF
:: if not iso file then ignore
if "%DD%"=="1" echo MAKEMENU: checking %~x1 extension
WENV check "#.iso#"=="#%~x1#" || goto :EOF
set hlp=\n Boot from %1\n
echo Adding %DIR%/%1
echo title %1 %hlp% >> (md)0x3000+0x50
echo map --mem  %DIR%/%1 (0xff) >> (md)0x3000+0x50
echo map --hook >> (md)0x3000+0x50
echo root (0xff) >> (md)0x3000+0x50
echo chainloader (0xff) >> (md)0x3000+0x50
echo >> (md)0x3000+0x50
goto :EOF

 

 

 

this will sdan for img files and load them

 

:.makemenu
if "%DD%"=="1" echo @MAKEMENU
setlocal
if "%DD%"=="1" echo Checking (bd)%DIR%/%1
if "%1"=="" endlocal && goto :EOF
::If is a directory ignore it
cat --length=0 (bd)%DIR%/%1 || goto :EOF
:: if not img file then ignore
if "%DD%"=="1" echo MAKEMENU: checking %~x1 extension
WENV check "#.img#"=="#%~x1#" || goto :EOF
set hlp=\n Boot from %1\n
echo Adding %DIR%/%1
echo title %1 %hlp% >> (md)0x3000+0x50
echo map --mem  %DIR%/%1 (fd0) >> (md)0x3000+0x50
echo map --hook >> (md)0x3000+0x50
#echo root (fd0) >> (md)0x3000+0x50
echo chainloader (fd0)+1 >> (md)0x3000+0x50
echo rootnoverify (fd0) >> (md)0x3000+0x50
echo >> (md)0x3000+0x50
goto :EOF

 

 

and this will scan for gz zipped images and load them

 

:.makemenu
if "%DD%"=="1" echo @MAKEMENU
setlocal
if "%DD%"=="1" echo Checking (bd)%DIR%/%1
if "%1"=="" endlocal && goto :EOF
::If is a directory ignore it
cat --length=0 (bd)%DIR%/%1 || goto :EOF
:: if not gz file then ignore
if "%DD%"=="1" echo MAKEMENU: checking %~x1 extension
WENV check "#.gz#"=="#%~x1#" || goto :EOF
set hlp=\n Boot from %1\n
echo Adding %DIR%/%1
echo title %1 %hlp% >> (md)0x3000+0x50
echo kernel /boot/grub4dos/memdisk >> (md)0x3000+0x50
echo initrd %DIR%/%1 >> (md)0x3000+0x50
echo >> (md)0x3000+0x50
goto :EOF



#67 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 03 April 2013 - 08:34 AM

So if you put an ISO file into the AUTOISO folder, do you get three identical menu entries?

This assumes all .img files will be floppy images (usually called .IMA)?

.gz files can be mapped using   map --mem /xxx.iso (0xff)   instead of memdisk.

 

P.S. You can make a bootable ISO from the flash drive using the RMPrepUSB CTRL+M  'File-Makegrub4dos ISO' menu tab (in latest Beta).



#68 halikus

halikus

    Frequent Member

  • Advanced user
  • 110 posts
  •  
    Canada

Posted 03 April 2013 - 09:11 PM

You don't get duplicate entries.  When you scan with, lets say, autoiso.g4b the command is autoiso.g4b .automenu /_ISO and in autoiso.g4b it has a line for wich extension to scan for, in this case .iso.  I duplicated autoiso.g4b changing the string to (ie:) .gz and it scans that.  As for ima and img, they are the same (just rename extention) so i opt for gz files usually to compress them and not have to worry about the img\ima difference.   I also had to have a corresponding mnu for it in the menu (mainmenu), an lst "backup" (29k), and the blank mnu menu header.  I unfortunatly rewrote all your code to my liking so all the paths and directories are different, but the actual changes for added functionality are so small it easy to implement.

 

First, my menu looks like this.  I have my default menu added to main.mnu (menu.mnu in my case), i eliminated autoiso dir and just use _iso, but with an img dir added.  From  entry 20 (chameleo.iso) down it is just autoiso generated iso entries (no img or gz).  

 

http://i49.tinypic.com/2mhv7ex.png

 

If you select entry 11 (boot iso files) it looks like this after scanning \_ISO

 

http://i50.tinypic.com/ak7nzm.png

 

If you select entry 15 (boot gz file) it looks like this after scanning _ISO\IMG

 

http://i50.tinypic.com/35b5l4m.png

 

And my layout of files is very different from your package, but only really in the file names and paths for organizations sake.

 

http://i45.tinypic.com/2aigdvt.png

 

 

If you want me to send you my grub4dos dir i can, or post an indepth example of one of my changes i can.  This really is a great approach and i don't mind helping you to make it better and more robust for the masses.

 

 

Edit:   I also want to mention that the main reason that led me to rewrite your file names are because of errors i was getting.  I am using the newest grub4dos (grub4dos-0.4.5c-2013-04-01) and do most of my testing in VMware from ISO (i briefly worked for VMware).  I noticed when it lists isos it truncates the names to 8 letters.  When i tried to run some of your mnu menu entries, it would often give an error for 2 reasons.  

 

1:  Files (lst, mnu, g4b) with a number (like easy2boot) wont load (file not found).  By removing the "2" it works.

2:  Files (lst, mnu, g4b) longer than 8 characters would complain of file not found.   Shortening them to 8 or less charachters would work. 

 

By fixing these errors i ended up having to scour your code and ended up understanding it and learning its approach.  After awhile, i ended up rewriting it all to make the layout less cluttered and logical.  So, i hope you don't take offence of me rewriting everything, i did it purely to make it work and be more organized.  After that, i tried to add features. 

 

Do you ONLY test via USB, or from an iso too?  Im wondering if i am the only one getting these errors, or if you simply don't know they exist because you primarily test via USB.

 

Also, if it matters, i boot to the bcd menu first, then chainload grub4dos as i still come across old hardware with USB1 drivers and grub4dos can take minutes to load, whereas the bcd is instant.  I use bcd, grub4dos, Grub2, syslinux, isolinux, and EFI bcd, EFI grub2, EFI clover, loaded via EFI refind from a 32 gig usb with a 30 gig ntfs partition, and a small 1 gig fat32 second partition for EFI, and use the bios to decide which partition i boot to..


Edited by halikus, 03 April 2013 - 09:50 PM.


#69 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 04 April 2013 - 12:07 PM

OK. Thanks for the reply.

Yes, I only test with USB, Easy2Boot is a USB multiboot drive project. As grub4dos only understands RockRidge then 8.3 filenames must be used if you want to run from CD/DVD (use ls command to see the short names).

I notice that the file counts are not coming out - your menu entries say   ( present)  when it should say something like  (3 present). The files are counted in menu.lst and you can define new variables for each of them. Also not sure that your XPPROSP3 is going to work just loaded as an ISO??

I was thinking about changing the menu structure (e.g. put everything under \E2B). I wanted to keep things simple (you are obviously an advanced user) and have only linux ISOs automagically detected and then anything else needing a .mnu file. Otherwise I would get lots of enquiries saying 'why doesn't my  xxxxx.gz or xxxx.ima or xxxx.img, etc work?'

 

cheers

Steve



#70 halikus

halikus

    Frequent Member

  • Advanced user
  • 110 posts
  •  
    Canada

Posted 04 April 2013 - 07:25 PM

Thanks for the reply.   It makes sense about the rockridge vs juliet as i author the DVD with oscdimg for bootmgr bios and efi booting.  Making the DVD this way also overcomes the 4 gig file limitation for things like install.wim.  I don't personally install NT6 from ISO, as i have a 10 gig install.wim and heavily modified winpes.  It saves alot of space combining the wims rather than having individual isos of each OS and arch.  But, as I install XP via ISO and  winvblock i also add the firadisk NT6 solution, just because i can.

 

For the (# Present) it displays only ( Present) on cd, but says (5 Present) on USB as it should.  I was wondering about that difference myself.

 

I like the single _iso directory myself, rather than an _iso dir AND and autoiso dir.  This way, its only one dir to worry about for paths, and also this way all isos displayed.  I agree XP.isos won't boot "normally", but i don't mind having it listed so i know its there.  I basically scan _iso as a default, and try to boot the iso initially with the defaults, if that doesn't work, then try an alternative method.  By scanning the _iso dir though it also scans all sub directories so it picks up the windows isos too.   I don't personally see the need for the various subdirs in the _iso folder as most things i try to boot work, and if they don't, they usually need a "magic" trick with the mnu files, where you can just scan with easy2boot.mnu.  Is there a simple way to not scan subfolders with the g4b?  That way, the _iso root can act as the autoiso dir does, the installwindows.mnu will scan the _ISO\windows dir, and any other mnu we add can scan an _iso\"subdirectory".  

 

When you say "Otherwise I would get lots of enquiries saying 'why doesn't my  xxxxx.gz or xxxx.ima or xxxx.img, etc work?'"  it shouldn't matter as the existing features only scan the iso extension, and the features i added only scan for gz, ima or img.

 

 

Here is what i have done if you want to see my approach to things.  I think everything works on USB, and on cd everything works but firadisk, winvblock, and the partition 4 trick.

https://mega.co.nz/#...ERkr3wOVra4jGrI



#71 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 05 April 2013 - 01:40 PM

You may be interested in adapting the qtest.g4b batch file I have added to Easy2Boot. See here for more details of new BETA09. It should be easier for you to change.



#72 Moon Lover

Moon Lover

    Newbie

  • Members
  • 12 posts

Posted 06 April 2013 - 01:03 AM

thanks a lot Steve for the really nice project

 

i also agree with halikus about listing all iso's under _ISO folder, since i'm using the zalman VE-300 i need all iso's to be in _ISO folder

 

also change the code to ignore the Autoiso folder and scan only the _ISO\Linux folder.

 

 

thanks a lot for your effort really appreciate it



#73 steve6375

steve6375

    Platinum Member

  • Developer
  • 6350 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 06 April 2013 - 11:19 AM

Thanks for the comments. I may get rid of the AUTOISO folder and just have an AUTO folder as the new Quick Test seems more versatile.

 

I use subfolders under _ISO because the Zalman VE200 has a 32 file limit per folder.

 

I was thinking of maybe having a folder structure like this

 

_ISO\MainMenu\   folder only - any ISO/IMA/IMG/GZ files placed here will be listed in the main menu

_ISO\MainMenu\ + all sub-folders - any mnu file will be listed in the main menu

_ISO\AUTO\   folder + subfolders - all files (except .txt files) will be listed by the AUTORUN menu

_ISO\MNU\ + subfolders - .mnu files and payloads go here - listed by the SPECIAL menu

_ISO\WINDOWS\ + subfolders - place windows install ISOs in here

 

 

So the Main (first) menu would look like this (first 3 are iso files in _ISO\MainMenu, 4th&5th are from .mnu under the \mainmenu folder):

 

xxxx.iso

yyyy.iso

zzz.ima

Ophcrack

WinPE8 SE

AUTORUN MENU (3 present)

SPECIAL MENU (using .MNU files)

WINDOWS INSTALL ISOs (2 present)

 

 

 

What do you think?

 



#74 halikus

halikus

    Frequent Member

  • Advanced user
  • 110 posts
  •  
    Canada

Posted 06 April 2013 - 08:06 PM

Very, very nice with the QTEST feature.  Im seriously impressed, and think you are just trying to make me look like an amateur :)  Its a great simplistic approach and think it is a milestone in grub4dos scripts.  I think it will benefit alot of people and is alot more eloquent than anything i attempted.  I never even knew half of those file extentions existed.  I re-routed quickboot to _ISO as it worked for everything i threw at it, besides gz file with an added extention, like memtest.img.gz, but memtest.gz works.  It works so well i think you should retire autoiso.mnu (and autoiso dir) and addiso.mnu (and adding isos to the menu) and just have qtest scan the _iso directory and list all files in the directory.  Everything works, besides files that would need a special mnu to work.  I just noticed your 32 file per dir limitation with the zalman, so i am now more sympathetic to your subdirectories.  I prefer to have everything in one directory so i can see whats there.
Also, it picks up dmg images but won't even try to boot them (missing dmg extention, probably on purpose).  Is it possible to boot any kind of dmg file with grub4dos?  Ive been trying to find a way to boot a mac live environment (im new to mac).  I think i need an HFS partition for starters, and possibly an EFI base. 

For my custom menu entries, i add them to the start of main.mnu.  I found i could put the mnu menu entries in there also for the mainfolder, like qtest.mnu. This way, you can more easily consolodate and edit the menu order and have more control over it, and have to worry about one less mnu scan path.

I also scan for my windows isos differently. I dont use CountFiles.g4b, and just add this to my

iftitle [if exist /_ISO/w8x86.ISO] Install Windows 8 x86\n Install Windows 8 from an ISO file
set COUNT8=%FCOUNT%
configfile /boot/grub4dos/LST/Win8.lst

iftitle [if exist /_ISO/w8x64.ISO] Install Windows 8 x64\n Install Windows 8 from an ISO file
set COUNT8=%FCOUNT%
configfile /boot/grub4dos/LST/Win8.lst

iftitle [if exist /_ISO/w8x86_ENT.ISO] Install Windows 8 ENT x86\n Install Windows 8 from an ISO file
set COUNT8=%FCOUNT%
configfile /boot/grub4dos/LST/Win8.lst

iftitle [if exist /_ISO/w8x64_ENT.ISO] Install Windows 8 ENT x64\n Install Windows 8 from an ISO file
set COUNT8=%FCOUNT%
configfile /boot/grub4dos/LST/Win8.lst

iftitle [if exist /_ISO/w7x86_ENT.ISO] Install Windows 7 ENT x86\n Install Windows 7 from an ISO file
set COUNT7=%FCOUNT%
configfile /boot/grub4dos/LST/Win7.lst

iftitle [if exist /_ISO/w7x64_ENT.ISO] Install Windows 7 ENT x64\n Install Windows 7 from an ISO file
set COUNT7=%FCOUNT%
configfile /boot/grub4dos/LST/Win7.lst

iftitle [if exist /_ISO/w7x86.ISO] Install Windows 7 x86\n Install Windows 7 from an ISO file
set COUNT7=%FCOUNT%
configfile /boot/grub4dos/LST/Win7.lst

iftitle [if exist /_ISO/w7x64.ISO] Install Windows 7 x64\n Install Windows 7 from an ISO file
set COUNT7=%FCOUNT%
configfile /boot/grub4dos/LST/Win7.lst

iftitle [if exist /_ISO/wVx86.ISO] Install Windows Vista x86\n Install Windows Vista from an ISO file
set COUNTV=%FCOUNT%
configfile /boot/grub4dos/LST/Vista.lst

iftitle [if exist /_ISO/wVx64.ISO] Install Windows Vista x64\n Install Windows Vista from an ISO file
set COUNTV=%FCOUNT%
configfile /boot/grub4dos/LST/Vista.lst

iftitle [if exist /_ISO/SVR2K8R2.ISO] Install Windows SERVER 2008 R2 (%COUNT28%)\n Install SERVER 2008 R2 from an ISO file
set COUNT28=%FCOUNT%
configfile /boot/grub4dos/LST/SVR2K8R2.lst

iftitle [if exist /_ISO/SVR2012.ISO] Install Windows SERVER 2012 (%COUNT12%)\n Install Windows 2012 from an ISO file
set COUNT12=%FCOUNT%
configfile /boot/grub4dos/LST/SVR2012.lst

iftitle [if exist /_ISO/XP.ISO] Install Windows XP\n Install XP from an ISO file
set COUNTXP=%FCOUNT%
configfile /boot/grub4dos/LST/XPMenu.lst


So, the approach i like for the simplest and most control, is retire addiso.mnu and autoiso.mnu, have qtest scan _iso, add mainmenu mnus to main.mnu, and have most isos in _iso with possibly other isos and images in subdirs to overcome the zalman limitation, but have all isos and images\floppies\whatever displayed in the main menu last.  Possibly add a "not search for SVR2012.ISO, w7x86.iso, etc" to qtest.g4b. 

\_ISO  (scan with qtest)
\_iso\EXTRA (a subdir for miscellanious images)
\_ISO\Windows\ (for win)
-\autoiso (depreciated)
\grub
\grub\mainmenu
\grub\firadisk
\grub\winvblock
\grub\mainmenu
\grub\docs
-\Qtest  (depreciated)




With g4b files, i wonder if its possible to use grub4dos to run commands to make the usb boot to another bootloader, use bcdedit or bootsec, etc.  Like to change the bootloader to syslinux, you need a bin file created, and to make it bootable.  I wonder if its possible to run something like this :

set usb=%cd%
echo   Wich USB drive letter?
set _choiceusb=
set /p _choiceusb=Enter a drive letter :
if "%_choiceusb%" equ "" goto exit
if "%_choiceusb%" gtr "0" goto :syslinuxbin
:syslinuxbin
cls
%~dp0syslinux.exe -f -d /boot/isolinux %_choiceusb%: %~dp0syslinux.bin
%~dp0syslinux.exe -m -a -d /boot/isolinux %_choiceusb%:

or for windows %~dp0bootsect /nt60 DRIVE: /force /mbr


With the bug in my menu with the (# present) being missing, its because it was authored with cdimage.  When i made one grub4dos style with mkisofs it showed the number of entries and was more compatible with some of your original commands and file lengths.  The only other problem that happens now and again is problems with grub finding the variable %mainmenu%.

These are what i use to author DVDs.  I found the switches were nessessary to chainload from grub2, to grub4dos, to bcd, to syslinux, etc. and have maximum compatibility.  They probably stray from the norm.

oscdimg -lWIN -u1 -h -m -k -oc -bootdata:2#p0,e,b.\boot\etfsboot.com#pEF,e,b.\efi\microsoft\boot\Efisys.bin .\ .\Win_BCD.iso

mkisofs -bXP.bin -no-emul-boot -boot-load-seg 1984 -boot-load-size 4 -iso-level 2 -J -joliet-long -l -D -relaxed-filenames -N -V XP_SP3 -v -x .DS_Store -o %CD%\Win_XP.iso %CD%

mkisofs -J -R -T -v -l -b boot/isolinux/isolinux.bin -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -volid 'ISOSYSLINUX' -o %CD%\ISOSYSLINUX.iso %CD%

mkisofs -J -R -T -v -l -b boot/grub/grldr -c boot/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -volid 'Grub' -o %CD%\Grub4dos.iso %CD%

cdimage -lWIN_GRUB -j1 -u1 -e -m -h -bootdata:2#p0,e,b.\boot\etfsboot.com#pEF,e,b.\efi\microsoft\boot\Grub.bin %cd% %cd%\Win_efiGRUB.iso
*grub.bin is a packaged rEFInd bootx64.efi and others



Another interesting thing i did was for people like me that mainly rely on the bcd style menu.  Its especially faster when you only have usb1 BIOS capabilities booting grub.  You can rename a copy of grldr to BCD_EXTRA in the Windows DVD \boot directory.  Or just add this to your existing entries in grldr with a 2 second delay before scanning for menu.lst.  Then add it to the BCD with something like this.

set BCD=%~dp0BCD
set STORE=/store %BCD%
for /f "tokens=3" %%A in ('%BCDEDIT% %STORE% /create /d "Extra Utilities" /application bootsector') do set guid=%%A
%BCDEDIT% %STORE% /set %guid% device [boot]
%BCDEDIT% %STORE% /set %guid% path \boot\BCD_EXTRA
%BCDEDIT% %STORE% /displayorder %guid% /addlast


Then, with Bootice i edit BCD_EXTRA and add the following to it.  It is essentially a single file addition of a simple grub4dos menu with some quick extras.  This way doesn't rely on a menu.lst file and is a quick and simple way to add grub4dos benefits to the less inclined regular Windows user with a single file, that can be run from anywhere you set the bcd string directory.


pxe detect
configfile
default 0
timeout 30

title  Back to Windows Setup and PE (DVD or USB /bootmgr) \n    Boot the Windows BCD boot menu
find --set-root /bootmgr
chainloader /bootmgr || chainloader /BOOTMGR

title  Boot ISO (Disk)\n  This will list ISOs in the directory ISO and allow you to boot them
ls /_ISO/
set /p MYISO=Which ISO do you want to boot?
ls /_ISO/%MYISO% || echo ISO %MYISO% NOT FOUND!
map /_ISO/%MYISO%.iso (0xff)
map --hook
chainloader (0xff)
boot

title  Boot ISO (Memory)\n  This will list ISOs in the directory ISO and allow you to boot them
ls /_ISO/
set /p MYISO=Which ISO do you want to boot?
ls /_ISO/%MYISO% || echo ISO %MYISO% NOT FOUND!
map --mem /_ISO/%MYISO%.iso (0xff)
map --hook
chainloader (0xff)
boot

title  Boot IMG (Floppy Image)\n  This will list IMGs in the directory _ISO\IMG and allow you to boot them
ls /_ISO/IMG/
set /p MYIMG=Which IMG do you want to boot?
ls /_ISO/IMG/%MYIMG% || echo IMG %MYIMG% NOT FOUND!
map --mem /_ISO/IMG/%MYIMG%.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

title  Boot IMA (Floppy Image)\n  This will list IMAs in the directory _ISO\IMG and allow you to boot them
ls /_ISO/IMG/
set /p MYIMG=Which IMA do you want to boot?
ls /_ISO/IMG/%MYIMG% || echo IMA %MYIMG% NOT FOUND!
map --mem /_ISO/IMG/%MYIMG%.IMA (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)

title  Boot GZ zipped file\n  This will list GZs in the directory _ISO\IMG and allow you to boot them
ls /_ISO/IMG/
set /p MYGZ=Which GZ zipped file do you want to boot?
ls /boot/IMG/%MYGZ% || echo GZ %MYGZ% NOT FOUND!
kernel /boot/grub4dos/memdisk
initrd /boot/IMG/%MYGZ%.gz

iftitle [if exist /boot/memtest.bin]  Memtest 86+ v1.70\n    Test memory sticks for defects.
kernel /boot/memtest.bin

iftitle [if exist /boot/plpbt.bin]  Plop\n    Run Plop, install Plop USB drivers and immediately boot to the USB device.\n    Adds USB2 support to USB1 only BIOS.
kernel /boot/plpbt.bin

iftitle [if exist /boot/EFI_DUET.gz]  Tianocore UEFI UDK DUET x86_64 (fat32 USB)\n  Loads Tinacore Boot Duet so that you can force EFI loading on a pesky Bios.\n    Must be fat32 if USB.
find --set-root --ignore-floppies /boot/EFI_DUET.gz
kernel /boot/grub4dos/memdisk raw
initrd /boot/EFI_DUET.gz

iftitle [if exist /BT5/casper/vmlinuz]  BackTrack 5 (1024x768) Persistent\n    Type startx (needs BT5 iso in \BT5\ and .disk dir in root)
kernel /BT5/casper/vmlinuz file=/cdrom/preseed/custom.seed live-media-path=/BT5/casper boot=casper persistent locale=en_US.UTF-8 keyb=us textonly noprompt vga=791--
initrd /BT5/casper/initrd.gz

iftitle [if exist /casper/vmlinuz]  Ubuntu 12.14\n    Needs .disk dir and Casper in root
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed live-media-path=/casper boot=casper locale=en_US.UTF-8 keyb=us textonly noprompt vga=791--
initrd /casper/initrd.lz

iftitle [if exist /HBCD/menu.lst]  Hirrens Boot CD\n    A collection of tools for Windows repairs.\n    Needs HBCD dir in root  
configfile /HBCD/menu.lst

iftitle [if exist /ubcd/menus/grub4dos/main.lst]  Ultimate Boot CD\n    A collection of tools for Windows repairs.\n    Needs UBCD and pmagic dir in root.   
configfile /ubcd/menus/grub4dos/main.lst

 



#75 Moon Lover

Moon Lover

    Newbie

  • Members
  • 12 posts

Posted 06 April 2013 - 08:42 PM

wow halikus i love the information you provide, and really love the whole project.

most credits go's to Steve, thanks a lot for starting this project.

 

Steve: regarding the folder structure i think its better.







Also tagged with one or more of these keywords: grub4dos, multiboot, multipass, usb boot, iso

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users