Jump to content











Photo
* * * * * 4 votes

Easy2Boot Development Discussion

grub4dos multiboot multipass usb boot iso

  • Please log in to reply
1230 replies to this topic

#801 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 30 July 2014 - 05:55 PM

Maybe, perhaps, probably, users of grub4dos happened to have no chance to chainload a syslinux FAT32 bootsector. Or users of syslinux happened to have no chance to use grub4dos.

 

Notice that the sector has hidden_sectors=0, and it has broken the de facto standards built by MS. I wonder which utility created this sector, and why? Is that a bug or by mistake? Can it be fixed?

From the script used to install the live system on USB, I saw this:

# Install legacy MBR
		command = "dd if=/usr/lib/syslinux/mbr.bin bs=440 count=1 of=/dev/#{target.device}"
		puts command
		system command



#802 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 30 July 2014 - 06:29 PM

 

From the script used to install the live system on USB, I saw this:



# Install legacy MBR
		command = "dd if=/usr/lib/syslinux/mbr.bin bs=440 count=1 of=/dev/#{target.device}"
		puts command
		system command

Yep :) but that writes a "generic" code to the MBR, Master Boot Record or first absolute sector of the device, LBA 0, while the issues found are in the bootsector, or  PBR (Partition Boot Record) or VBR (Volume Boot Record) i.e. first absolute sector of the Partition (or Volume), in your specific case LBA 63 or LBA 8,401,995.

 

:duff:

Wonko



#803 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 30 July 2014 - 06:58 PM

don't understand this talk about syslinux???

I have already told you that the code in the PBR is from grubinst.exe in post #792.

Adric is making an Easy2Boot USB drive which uses grub4dos. He said that he installed grub4dos to both MBR and PBR (post #769).

A clue here is that the PBR has 'GRLDR5.0' at the start, whereas my grubinst.exe from RMPrepUSB installs  'GRLDR5.1'. So whatever installed the grub4dos code to the PBR was not RMPrepUSB's grubinst (or possibly it had been later modified by BootIce???). The MBR code is RMPrepUSB's grubinst code however.

Maybe the culprit here is that Adric partitioned the USB drive using some unspecified method (post #769) which mangled the CHS entries in the MBR- AND/OR - maybe it is  a problem using BootIce to modify the partition ID (or otherwise fiddle with the boot sectors) because the RMPrepUSB grub4dos MBR code is incompatible with BootIce (my versions starts with 0x33 0xC0 for better compatibility with some BIOSes that look at the first bytes in the MBR, so all the special parameter bytes (for timeout, etc.) from byte 02 to 08 in the MBR are shifted along by 2 in the RMPrepUSB MBR code).???

 

@Adric - how exactly did you prepare the USB drive?

Basically, I booted the Desinfec't live CD and used an app on the Linux desktop to install Desinfec't on a USB flash. I tested the flash to make sure everything worked. I then backed up the partitions with Paragon HDM so I could restore them later. I then used RMPREP to create a 4096 Mib partition after which I installed grub and easy2boot on that partition. I restored the linux partitions and then tried to boot the linux system with easy2boot. This is when Grub complained about the zero hidden sectors. I had to fix this first to get past the grub error. After that, the normal chainloader cmd would not work untill I changed it it to use  +2.  I redid the E2B flash partition several times (not always the same way) which eventually led to my 3rd problem with the blinking cursor because of the missing free space at the end of the flash.



#804 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 30 July 2014 - 07:12 PM

Yep :) but that writes a "generic" code to the MBR, Master Boot Record or first absolute sector of the device, LBA 0, while the issues found are in the bootsector, or  PBR (Partition Boot Record) or VBR (Volume Boot Record) i.e. first absolute sector of the Partition (or Volume), in your specific case LBA 63 or LBA 8,401,995.

 

:duff:

Wonko

Here's the script that creates the usb flash. I'm not familiar with Linux so maybe someone can find more in the file.

Attached Files



#805 steve6375

steve6375

    Platinum Member

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

Posted 30 July 2014 - 07:35 PM

You should re-run syslinux after tweaking the partitions - did you do that?



#806 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 30 July 2014 - 07:55 PM

You should re-run syslinux after tweaking the partitions - did you do that?

No, Shouldn't the restore put the partitions back the way they were saved?

I did not tweak the linux system partition. I only expanded the partition containing the sigs, swap file, etc which happend to be the last partition.

 

I did not have any problems booting the 2nd partition natively.

Attached Thumbnails

  • USB.png


#807 steve6375

steve6375

    Platinum Member

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

Posted 30 July 2014 - 08:24 PM

Well, I know that you cannot just copy the syslinux PBR from one system to another and expect it to work. There is a pointer somewhere (PBR?) which points to the ldlinux.sys file. If that file is in a different sector (cluster?) then it all falls over. When you run syslinux.exe to install syslinux, it works out where ldlinux.sys is and then writes the address into the disk (PBR?) somewhere.



#808 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 369 posts
  •  
    India

Posted 07 August 2014 - 06:04 AM

Hello Steve......

 

Why you not introducing 'Change Theme' options in 'E2B Menu'. So that we can choose any theme within from 'E2B Menu' according to our mood. \_ISO\MYTHEMES folder will contain multiple themes [ .bmp (Wallpapers) and their respective .cfg (MyE2B.cfg) ] files (e.g. 'Aliums', 'Blue', 'Mac', 'Jolene', 'GFXMenu'.....etc....). 

 

After choosing a theme from the 'Change Theme' option within from 'E2B Menu',  FASTLOAD will be automatically loaded and will save current theme as a default.

--------------------------------------------------

\_ISO\MYTHEMES\Aliums.bmp.gz

\_ISO\MYTHEMES\Aliums.cfg

\_ISO\MYTHEMES\blue.bmp.gz

\_ISO\MYTHEMES\blue.cfg

\_ISO\MYTHEMES\Mac_Wallpaper.bmp.gz

\_ISO\MYTHEMES\Mac_Wallpaper.cfg

\_ISO\MYTHEMES\Jolene1024.bmp.gz

\_ISO\MYTHEMES\Jolene1024.cfg

\_ISO\MYTHEMES\GFXMenu

\_ISO\MYTHEMES\GFXMenu.cfg

 

_ISO\MAINMENU\MYTHEMES.mnu

------------------------------------------------

 

And when we choose 'Change Theme' option within from 'E2B Menu' then E2B Menu will show 'Change Theme' options to choose according to mood.

 

Choose your favorite theme according to your mood. 

------------------------------------------------------------------------------------

Aliums

Blue

Mac

Jolene

GFXMenu

------------------------------------------------------------------------------------

 

Is it possible ?
 

Thanks in Advance.....

 

Regards.......



#809 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 08:44 AM

You can change the wallpaper like this

title Change Wallpaper\n Choose a new E2B menu background
set CHOSEN=
call /%grub%/pickafile.g4b /_ISO .gz
if "%CHOSEN%"=="" configfile (md)0xa000+0x50
clear
splashimage /_ISO/%CHOSEN%
configfile (md)0xa000+0x50

changing the whole MyE2B.cfg file however just adds another level of complication which I don't want to do.


  • devdevadev likes this

#810 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 09:44 AM

For a Change Theme menu try this

 

1. Create a large \_ISO\MyE2B.cfg file   - You can use  the Sample_MyE2B.cfg file  but it must be at least as large as your largest  .cfg file - if not add lots of spaces to the end - if you have an NTFS E2B drive it must be approx 1000 bytes or larger.

 

2. Create a \_ISO\MYTHEMES folder and copy into it all your wallpaper  files and each MyE2B.cfg file but rename them

 

e.g.

\_ISO\MYTHEMES

=============

Jolene_GFX.cfg
message

 

Mac.cfg
Mac_Wallpaper.bmp.gz

 

stripedflat.bmp.gz
StripedFlat.cfg

 

 

3. Edit each .cfg file and change the path of the wallpaper - e.g.

set MYWBMPGZ=/_ISO/MYTHEMES/stripedflat.bmp.gz

- if using a GFX boot menu then add it like this  (note: this is correct - do not use full path for GFX!)

set GFX=MYTHEMES/message

4. Finally add your Themes.mnu file to \_ISO\MAINMENU folder or \_ISO\MAINMENU\MNU folder

# Place all MyE2B.cfg and wallpaper files in \_ISO\MYTHEMES andrename .cfg files
# Edit each \_ISO\MYTHEMES\xx.cfg file so background or GFX has correct path
# e.g. set MYWBMPGZ=/_ISO/MYTHEMES/stripedflat.bmp.gz  OR set GFX=MYTHEMES/message  (note no \_ISO for GFX)
# Rename \_ISO\Sample_MyE2B.cfg to \_ISO\MyE2B.cfg (must be >1KB and larger than largest xxx.cfg file)
# For the default E2B theme, make a \_ISO\MYTHEMES\Default_Theme.cfg file with just !BAT on the first line

title Change Theme\n Choose a new E2B Theme
if not exist /_ISO/MyE2B.cfg echo ERROR: Please create a large \_ISO\MyE2B.cfg file && pause && configfile (md)0xa000+0x50
set CHOSEN=
errorcheck on
debug normal
graphicsmode 3
clear
echo Pick a Theme...
call /%grub%/pickafile.g4b /_ISO/MYTHEMES .cfg
if "%CHOSEN%"=="" set DONEMENU= && configfile ()/%grub%/menu.lst
echo
echo Overwriting \_ISO\MyE2B.cfg file with \_ISO\MYTHEMES\%CHOSEN%...
# fill (rd) with 0's , 0x82d0 is rd-base mem address, Fn24 is memset - fill memory  <addr> <string> <size>
map (md)0x300+200 (rd) > nul ;; read 0x82d0 > nul ;; call Fn.24  %@retval% 0x20  102400 > nul 
dd if=(rd)+1 of=()/_ISO/MYE2B.cfg > nul
if exist ()/_ISO/MYTHEMES/%CHOSEN% dd if=()/_ISO/MYTHEMES/%CHOSEN% of=()/_ISO/MyE2B.cfg > nul
if exist ()/_ISO/mythemes/%CHOSEN% chainloader /grldr
boot

  • devdevadev likes this

#811 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 369 posts
  •  
    India

Posted 07 August 2014 - 10:07 AM

Finally I got exactly what I expect. Thousands of thanks for your great help and support.................Love you Steve.......



#812 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 10:37 AM

menu changed in previous post to fix a few niggles!



#813 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 04:08 PM

post #810 revised again (2nd last line) to use chainloader /grldr as gives a cleaner environment.



#814 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 06:51 PM

Hi Steve. I am an avid fan of Easy2Boot and I absolutely love it. A possible request leading on from devdevadevs post is an option for choosing resolution e.g. 1440x900, 1920x1080 and 1366x768. These seem to be the most common options for screen sizes I deal with. And another possible request is to make the Prepare E2B script for OS X as you have done for Linux and Windows. Thanks for taking the time to read this and if you can't do these that is fine as these are only minor niggles.


  • devdevadev likes this

#815 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 07:17 PM

Hi

 

You can't just change screen resolution because the bitmap wallpaper will be made to fit a certain size.

 

There is a Change Wallpaper menu - see my blog - so you can change to a different wallpaper and different resolution - but the menu colours and position will stay the same.

 

 

Alternatively, you can adjust a \_ISO\MyE2B.cfg file so that it will auto-detect what resolutions are available and then set GMODE and MYWBMPGZ variables for that resolution

# allow vbeprobe command to output text
debug 1
# list all available BIOS modes
vbeprobe > (md)0x220+5
# turn off text output from future commands
debug off
# look for 640, 800 and 1024 modes - be careful to only use x24 or x32 modes for full colour bitmaps
cat --locate=", 640x480x24"  (md)0x220+5 > nul && set GMODE=640 480 24 && set MYWBMPGZ=/_ISO/nice640.bmp.gz
cat --locate=", 800x600x24"  (md)0x220+5 > nul && set GMODE=800 600 24 && set MYWBMPGZ=/_ISO/nice800.bmp.gz
cat --locate=", 1024x768x24" (md)0x220+5 > nul && set GMODE=1024 768 24 && set MYWBMPGZ=/_ISO/nice1024.bmp.gz
# now change to the highest resolution supported and load the matching bitmap

# DELETE THESE TWO LINES ONCE IT IS WORKING
cat (md)0x220+5
echo GMODE=%GMODE%  MYWBMPGZ=%MYWBMPGZ% && pause

Just replace the  set GMODE and set MYWBMPGZ lines with this code in the \_ISO\MyE2B.cfg file. You will have to edit it to put in your own resolutions and bitmaps.

 

 

 

re. OS X, I don't have an OS X system or OS and have no idea how to write a script for it - sorry.


  • devdevadev likes this

#816 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 07:20 PM

Hi

 

You can't just change screen resolution because the bitmap wallpaper will be made to fit a certain size.

 

There is a Change Wallpaper menu - see my blog - so you can change to a different wallpaper and different resolution - but the menu colours and position will stay the same.

 

 

Alternatively, you can adjust a \_ISO\MyE2B.cfg file so that it will auto-detect what resolutions are available and then set GMODE and MYWBMPGZ variables for that resolution

# allow vbeprobe command to output text
debug 1
# list all available BIOS modes
vbeprobe > (md)0x220+5
# turn off text output from future commands
debug off
# look for 640, 800 and 1024 modes - be careful to only use x24 or x32 modes for full colour bitmaps
cat --locate=", 640x480x24"  (md)0x220+5 > nul && set GMODE=640 480 24 && set MYWBMPGZ=/_ISO/nice640.bmp.gz
cat --locate=", 800x600x24"  (md)0x220+5 > nul && set GMODE=800 600 24 && set MYWBMPGZ=/_ISO/nice800.bmp.gz
cat --locate=", 1024x768x24" (md)0x220+5 > nul && set GMODE=1024 768 24 && set MYWBMPGZ=/_ISO/nice1024.bmp.gz
# now change to the highest resolution supported and load the matching bitmap

# DELETE THESE TWO LINES ONCE IT IS WORKING
cat (md)0x220+5
echo GMODE=%GMODE%  MYWBMPGZ=%MYWBMPGZ% && pause

Just replace the  set GMODE and set MYWBMPGZ lines with this code in the \_ISO\MyE2B.cfg file. You will have to edit it to put in your own resolutions and bitmaps.

 

 

 

re. OS X, I don't have an OS X system or OS and have no idea how to write a script for it - sorry.

Yeah that is what I was thinking I would make several backgrounds and then implement that script. As for OS X since I have an OS X machine I will see if I can adapt your script as Linux and OS X are similar in terms of command line. 



#817 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 07:39 PM

How will you run bootlace or grubinst.exe under OS X to install grub4dos to the USB drive???



#818 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 07:41 PM

Yeah... It is based of Unix so If they are not Unix versions I would have to find them and if I can't well... that would suck



#819 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 07:46 PM

I ran df and my drive comes up /dev/disk1s1 So surely all I would need to do is replace /dev/sdc1 with /dev/disk1s1 and sda with disk0

 

"Filesystem    512-blocks       Used Available Capacity   iused   ifree %iused  Mounted on

/dev/disk0s2  1751953152 1713661320  37779832    98% 214271663 4722479   98%   /

devfs                384        384         0   100%       666       0  100%   /dev

map -hosts             0          0         0   100%         0       0  100%   /net

map auto_home          0          0         0   100%         0       0  100%   /home

/dev/disk0s4   199174136  180116320  19057816    91%    212362 9587906    2%   /Volumes/BOOTCAMP

/dev/disk1s1    62515360       3008  62512352     1%         0       0  100%   /Volumes/E2BTEST"



#820 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 07:47 PM

I would try bootlace to see if that will work - if not you are stuffed!

 

P.S. I wouldn't use disk0 if I were you!



#821 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 07:50 PM

Exactly but not really as I have a Windows virtual machine for that but it would be cool to consolidate it all as one OS. I will boot up Ubuntu to compare drive labels and all that.



#822 steve6375

steve6375

    Platinum Member

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

Posted 07 August 2014 - 07:53 PM

The linux script just

  1. formats a partition
  2. copies over the E2B files
  3. runs bootlace to install the grub4dos bootloader

 

Steps 1 and 2 are easily done under any OS using a GUI with a couple of clicks. Step 3 is the bit that must be done from the command line and is the bit newbies will need help with.



#823 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 08:01 PM

Yep Bootlace has a problem cannot execute binary file this happens on both bootlace.com and bootlace64.com even when I chmoded them. Looks like they aren't compatible with Unix :(. Defragfs works though so that is a positive


Edited by reece394, 07 August 2014 - 08:07 PM.


#824 betrand

betrand

    Frequent Member

  • Advanced user
  • 467 posts
  •  
    France

Posted 07 August 2014 - 08:12 PM

@Reece394,

Can't you just use an hexeditor (with disk access) and paste grldr.mbr as a workaround?



#825 reece394

reece394

    Newbie

  • Members
  • 21 posts
  •  
    United Kingdom

Posted 07 August 2014 - 08:15 PM

@Reece394,

Can't you just use an hexeditor (with disk access) and paste grldr.mbr as a workaround?

Maybe? But as I found out when making my memory stick accessible by VirtualBox I have to unmount the drive entirely before I can boot into it for Read and Write access. I use an Automator script for that. But back on topic Hexediting is a bit scary!







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