Jump to content











Photo
* * * * * 5 votes

Easy2Boot Development Discussion

grub4dos multiboot multipass usb boot iso

  • Please log in to reply
1381 replies to this topic

#726 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 02:26 PM

same error with --force and without --force.

SysLinux must not care about the hidden sectors being 0, since it boots okay on a direct boot.



#727 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 02:28 PM

How about

chainloader --raw (hd0,1)+1
boot

?



#728 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 July 2014 - 02:38 PM

The hidden sectors value for both those partitions is 0 !!!

This can be "automagically" corrected this way:
 

partnew (hd0,3) 0x0C (hd0,1)+1

 

this will create a (temporary) partition entry (hd0, 3) AND correct the "sectors before" in the PBR of (hd0,1) <- this latter change is "permanent".

 

partnew (hd0,3) 0 0 0

 

this will delete the (temporary) partition entry.

 

:duff:

Wonko



#729 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 03:06 PM

Well, that got rid of the Error 43 msg which was replaced with Boot Error :D

I got the following msg creating the extra partition;

 

Fat32 BPB found with the leading 0xEB (jmp). Hidden Sectors= 0x0

Changing hidden sectors 0x0 to 0x13E1800... Success.

 

Will activate the 2nd partition to see if it still boots



#730 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 03:11 PM

P.S. Please try latest grub4dos  grldr file e.g. here

If there is still a problem, I think we should report the issue to chenall as I see several people have had the same issue in the past and I can't see that any solution was found (other than patching bytes in the PBR).

 

P.S. also try

errorcheck off
chainloader --raw (hd0,1)+0x50
boot


#731 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 03:27 PM

Will activate the 2nd partition to see if it still boots

Hmm, not sure what is wrong here, but I made the e2b partition inactive and the linux partition active, but when I boot, I still end up with the e2b partition.



#732 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 03:29 PM

What code is in the MBR

Use RMPrepUSB - Drive Info - 0



#733 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 03:33 PM

If grub4dos is in the MBR then it should always boot to grub4dos/E2B - unless the BIOS is a funny one that boots to an active partition instead of running the MBR code???

So not quite sure why you are seeing the affect of it booting to E2B, but if you make the 2nd partition active it boots to linux???



#734 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 04:03 PM

If grub4dos is in the MBR then it should always boot to grub4dos/E2B - unless the BIOS is a funny one that boots to an active partition instead of running the MBR code???

So not quite sure why you are seeing the affect of it booting to E2B, but if you make the 2nd partition active it boots to linux???

If I recall correctly, Linux would boot if set active before I added e2b to the 1st partition which was a data partiton at the time. For some reason I was under the wrong impression that the boot process would first look for a loader on the active partition. I guess I'll have to remember to remove the usb before booting if I only want to use it to store data.



#735 memoarfaa

memoarfaa

    Member

  • Members
  • 81 posts
  •  
    Egypt

Posted 13 July 2014 - 04:23 PM

you can also do this 

don't chain-load Hard Disk mbr from E2B

try to chain-load isolinux.bin from E2B

title Disinfec't\n Boot to 2nd Partition
find --set-root /syslinux/isolinux.bin
chainloader /syslinux/isolinux.bin


#736 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 04:33 PM

 

P.S. Please try latest grub4dos  grldr file e.g. here

If there is still a problem, I think we should report the issue to chenall as I see several people have had the same issue in the past and I can't see that any solution was found (other than patching bytes in the PBR).

 

P.S. also try

errorcheck off
chainloader --raw (hd0,1)+0x50
boot

This suggestion did the trick. It also works without errorcheck off or without using --raw. The key here seems to be +0x50. This and Wonko's 'fix' for the 0 hidden sectors looks like a working solution. FYI, here are the diffs from of the partitions before and after. BTW, can you explain how the (hd0,1)+0x50 parm differs from (hd0,1)+1

Attached Files



#737 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 04:40 PM

Can you confirm that

chainloader (hd0,1)+1
boot

still does not work



#738 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 04:50 PM

 

you can also do this 

don't chain-load Hard Disk mbr from E2B

try to chain-load isolinux.bin from E2B

title Disinfec't\n Boot to 2nd Partition
find --set-root /syslinux/isolinux.bin
chainloader /syslinux/isolinux.bin

Gives me an error..

 

Cannot chainload ISOLINUX from a non-CDROM device.

Error 13: Invalid or unsupported executable format.



#739 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 05:02 PM

Can you confirm that

chainloader (hd0,1)+1
boot

still does not work

Confirmed - Boot error (is this Grub's fault and what does +0x50 do different?)

 

Thanks everyone for the spending time to help me out.



#740 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 05:05 PM

and 

chainloader (hd0,1)+0x50

still works?

 

Just double-checking, because with Wonko's fix, the hidden sectors issue should be resolved and chainloader (hd0,1)+1 should now work...



#741 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 13 July 2014 - 05:24 PM

and 

chainloader (hd0,1)+0x50

still works?

 

Just double-checking, because with Wonko's fix, the hidden sectors issue should be resolved and chainloader (hd0,1)+1 should now work...

Yes, +0x50 is the only thing that works. Just tried it from E2B .mnu. Everything else without the magical +0x50 fails. Wonko's change fixed the error 43 about 0 hidden sectors, but it did not fix booting with +1.



#742 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 13 July 2014 - 05:51 PM

Well, I am not sure why it works!

 

I used a clonezilla partition with grub4dos which had syslinux installed to the PBR.

It booted fine using  chainloader (hd0,0)+1

I then changed the hidden sectors to 0 0 0 0    (same as your PBR) -  chainloader (hd0,0)+1  and +0x50 both failed with Error 43: hidden-sectors = 0 error as expected

I then used partnew to make the PBR hidden sectors good.

I can now boot it again using chainloader (hd0,0)+1   (the hidden sectors value is identical to what it was before).

 

I guess there is something odd about the PBR boot code that you have???

 

Anyway, between Wonko and myself, we seem to have found a solution.

#Error 43: The BPB hidden_sectors should not be zero for a hard-disk partition boot sector
#See Wonko's post at http://reboot.pro/topic/16429-easy2boot-development-discussion/page-30#entry185771
# This error may be found when attempting to chainload to a partition - e.g. chainloader (hd0,1)+1
# The following code assumes partition 4 is empty/unused
set BOOTPTN=(hd0,1)
debug normal
parttype (hd0,3) | set check=
set check=%check:~-5,4%
#create new ptn4 (also fixes up the BPB hidden sectors in %BOOTPTN%)
if %check%==0x00 partnew (hd0,3) 0x00 %BOOTPTN%
# remove new partition entry
if %check%==0x00 partnew (hd0,3) 0 0 0 0
if NOT %check%==0x00 echo ERROR: Partion Table entry 4 already exists! && pause --wait=3 && configfile /menu.lst
chainloader %BOOTPTN%+0x50
boot

P.S.  (hd0,1)+1  means load 1 sector into memory starting at the start of the 2nd partition,  (hd0,1)+0x50 means load 50hex (80) sectors into memory. However, +1 does have a special meaning and can sometimes mean ('the whole partition') - but it cannot be loading the whole partition into memory as the command executes almost immediately. ??

Maybe Chenall or tinybit could explain?



#743 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 13 July 2014 - 06:45 PM

Loosely, I would try to understand if the size of loading is affecting the booting, i.e. trying:

chainloader (hd0,1)0+10

chainloader (hd0,1)0+20

chainloader (hd0,1)0+30

chainloader (hd0,1)0+40

chainloader (hd0,1)0+50

chainloader (hd0,1)0+...

chainloader (hd0,1)0+80

until the stupid thingy boots, refining it with intermediate values until we have the exact number of sectors involved, then dd these sectors and have a look at them.

 

It is possible that the thingy is made in some peculiar ways :unsure:

 

:duff:

Wonko



#744 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 14 July 2014 - 04:31 PM

Wonko,

 

chainloader (hd0,1)+0x10 also works (+1 doesn't). If you want more info about the sectors and which ones, give

me some instructionss and I'll get the info to you.



#745 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 14 July 2014 - 04:40 PM

P.S. Please try latest grub4dos  grldr file e.g. here

 

I went back to the older grldr because I noticed the new one uses a different font when the E2B menu is displayed. It is much thinner and looks lousy on my laptop. The older grldr can also boot the 2nd partition with +0x50 and it uses a thicker font when displaying E2B. Can the font used by grldr be changed someway or is this hardcoded?

 

Edit: Found this which explains the font situation:

http://rmprepusb.blo...-available.html



#746 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 14 July 2014 - 05:33 PM

You should use the version of grub4dos that is included with E2B - it has bug fixes and tweaks. I have discovered many bugs and problems in grub4dos whilst developing E2B and Chenall has fixed many of them - so please always use the latest version.

E2B fonts are controlled by the \_ISO\MyE2B.cfg file, there is an entry to use the thicker BIOS font and not load the unifont file:

 

\_ISO\MyE2B.cfg

!BAT
set NOUNIFONT=1

re. chainloader (hd0,1)+0x10

 

can you try chainloader (hd0,1)+08

 

and then increase or decrease 8  (up to 16 and down to 0) until you find the point where it stops working - e.g.  +5 doesn't work and +6 does  (or whatever...)



#747 adric

adric

    Frequent Member

  • Advanced user
  • 168 posts

Posted 14 July 2014 - 10:18 PM

I'm planning to update my e2b to v1.52 so everything will be up-to-date.

 

Everything from chainloader (hd0,1)+2 on up works fine.



#748 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 14 July 2014 - 11:09 PM

Thanks for testing, that is most odd! It seems that code needs the 2nd sector for some reason that I don't understand because normal booting would only read the first sector, so it should give an error on a normal boot???

weird!



#749 tinybit

tinybit

    Gold Member

  • Developer
  • 1165 posts
  •  
    China

Posted 15 July 2014 - 06:31 AM

you may disassemble the 2 sectors and find why.



#750 steve6375

steve6375

    Platinum Member

  • Developer
  • 7161 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 15 July 2014 - 08:58 AM

@tinybit Sectors are in post #736  - 2nd one looks like a normal FAT32 sector...







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