
grub4dos-chenall - issue #204
0.4.6a 2014--9-18 behaving strangely with external SSD drive
I have 3 Easy2Boot USB drives with many ISOs on it. There seems to be a problem with my external USB SSD drive (which is in caddy) and my external 80gb SATA HDD in a different caddy. The 2TB My Passprot USb HDD seems OK with all versions (as far as I can tell so far)
I have tried various versions: 2014-08-19 OK 2014-08-12 OK 2014-09-18 BAD
The problem occurs when booting from my Asus EeePC 904HD and on the USB HDD caddy also under VBox+VMUB.
Problems vary - e.g. only some ISO files are detected (or no ISO files are detected and added to the menu), or if I reload the /menu.lst file, hd0,0 becomes inaccessible
e.g. in command console root >> Disk I/O Error ls (hd0,0) >> Disk I/I Error
something is broken or at least not compatible with 0.4.5c and earlier versions of 0.4.6a!
To reproduce, make an E2B USB HDD/SSD drive. Add 0.4.6a 2014-09-18 grldr to the root. Add some ISOs to _ISO\MAINMENU test on a variety of systems
Comment #1
Posted on Sep 19, 2014 by Happy KangarooSomething is also odd with 0.4.5c latest version - similar problems
e.g. copy ISO to Easy2Boot _ISO\ANTIVIRUS\clonzilla.iso boot in Vbox type Ctrl-A for Antivirus menu
Error 30: Invalid argument
works OK with 2014-09-08 version
Comment #2
Posted on Sep 21, 2014 by Happy HippoPlease try this first
Comment #3
Posted on Sep 21, 2014 by Happy KangarooI think problem with 0.4.5c may be caused by incompatibility with older versions regarding use of double-quotes
set HPAD=\x20\x20 echo "%HPAD:~0,1%"
"%HPAD:~0,1%" (new versions)
"\" (old versions)
Comment #4
Posted on Sep 21, 2014 by Happy Kangaroohttps://github.com/chenall/grub4dos/commit/0618759937ea55e192a4e515daa4d16458379a2b
Think problem started here?
Comment #5
Posted on Sep 22, 2014 by Happy Hippo@Steve6375 not problem here
did you try grub4dos-0.4.5c-2014-09-21.7z ?
Comment #6
Posted on Sep 22, 2014 by Happy KangarooYes, that is the version that fails for HPAD test
try
if "%HPAD:~0,1%"==" " echo fred
- CaptureHPAD.JPG 35.43KB
Comment #7
Posted on Sep 22, 2014 by Happy Hippook.
Comment #8
Posted on Sep 22, 2014 by Happy KangarooOK - that fixed the problem with 0.4.5c.
Comment #9
Posted on Sep 22, 2014 by Happy Hippo0.4.6a
Comment #10
Posted on Sep 22, 2014 by Happy Kangaroogrub4dos-0.4.6a-2014-09-22.7z - looks good!
dpms works xp no disks found issue fixed if "%HPAD:~0,1%"==" " echo fred issue fixed
Comment #11
Posted on Sep 23, 2014 by Happy KangarooStill a problem with both 0.4.5c and 0.4.6a Asus EeePC External USB 3 caddy + 230GB SSD
set a=1 2 if "%a%"=="" echo fred
Error 30: Invalid argument
but OK if use WD Passport USB 2TB HDD with EeePC or 80GB external USB hdd with EeePC. All OK on VBox.
Very strange!!!
Comment #12
Posted on Sep 23, 2014 by Happy KangarooIf CheckAccess.g4b is not called then no problem with SSD on EeePC. I add extra code to fond error
code exits batch file after XXXXXXXXXXXXX4 and never gets to pause 4
EeePC has 137GB bug - so it will return an error on cat line.
echo Last Sector of last partition of %driv% is %lba% %redir% echo -n Checking last sector is accessible... %redir% cat --length=16 --hex %driv%%%lba%+1 > nul && set result=1
pause pre4 if "%a%"=="" echo XXXXXXXXXXXXX4 pause 4
- CheckAccess.g4b 2.29KB
Comment #13
Posted on Sep 23, 2014 by Happy Kangaroogrldr 0.4.5c 20140908 works OK and does not exit - it runs whole batch file
Comment #14
Posted on Sep 23, 2014 by Happy KangarooHDD NTFS
Fails on CheckAccess.g4b (if remove > nul from cat line) Fatal! Inconsistent data read from (0x80)488391961+127 Fatal! Inconsistent data read from (0x80)488392056+1 Fatal! Inconsistent data read from (0x80)488391961+127 Fatal! Inconsistent data read from (0x80)488392056+1 pause pre4
if add 0x4000000 to lba then it does NOT fail! cat --length=16 --hex (hd0)555500920+1 (remove > nul from cat line so can see errors).....
Fatal! Inconsistent data read from (0x80)555500794+127 Fatal! Inconsistent data read from (0x80)555500928+1 Fatal! Inconsistent data read from (0x80)555500794+127 Fatal! Inconsistent data read from (0x80)555500928+1 pause pre4
adding 0x10000 >> passes adding 0x1000 >> FAILS
SSD Disk has Last LBA 488,397,167
if use cat --hex and then if "%a%"=="" echo fred
If access is made to < Last LBA 488,397,167 then we get error situation. If access is made > Last LBA 488,397,167 then does not cause error situation (presumably BIOS knows LBA is > end of disk and does not actually attempt to access disk at all).
So this indicates bad registers returned by BIOS on disk error??
This could be similar to Issue 198?? https://code.google.com/p/grub4dos-chenall/issues/detail?id=198&can=1&start=100
Comment #15
Posted on Sep 24, 2014 by Happy HippoIs there which version can be used?
Please upload the memory info..using grub4dos displaymem
Comment #16
Posted on Sep 24, 2014 by Happy Kangaroograb1.txt using 22/09/2014
0.4.6a 2014-08-19 OK 2014-08-12 OK 2014-09-18 BAD
0.4.5c 20140908 OK
- Grab1.txt 582
Comment #17
Posted on Sep 25, 2014 by Happy Hippocan you please try below version? grub4dos-0.4.5c-2014-09-16.7z grub4dos-0.4.6a-2014-09-12.7z grub4dos-0.4.6a-2014-09-08.7z grub4dos-0.4.6a-2014-09-06.7z grub4dos-0.4.6a-2014-09-03.7z
Comment #18
Posted on Sep 25, 2014 by Happy Kangaroogrub4dos-0.4.5c-2014-09-16.7z OK but screws up later grub4dos-0.4.6a-2014-09-12.7z OK but screws up later grub4dos-0.4.6a-2014-09-08.7z OK but screws up later grub4dos-0.4.6a-2014-09-06.7z OK but screws up later grub4dos-0.4.6a-2014-09-03.7z OK but screws up later
Problem with 'screw up later' is that
?_BOOT variable is now junk!
echo %?_BOOT%
displays a load of dc A5
characters
i.e. I booted to grub4dos menu I ran checkaccess.g4b as a menu item First time it correctly reported BIOS BAD After that it would not run because ?_BOOT was garbage
Comment #19
Posted on Sep 25, 2014 by Happy KangarooHere is my test menu for the problem(s)
title Check BIOS Disk Access\n Checks BIOS can access all of disk.\n Some BIOSes cannot access a USB disk past 137GB /%grub%/CheckAccess.g4b errorcheck on set a=1 2 if "%a%"=="" echo fred pause errorcheck off boot
- CheckAccess.g4b 2.37KB
Comment #20
Posted on Sep 26, 2014 by Happy HippoI think this is similar to Issue 198. Please try new and use @boot instead ?_BOOT
Comment #21
Posted on Sep 26, 2014 by Happy Kangaroogrub4dos-0.4.5c-2014-09-26.7z OK
if I use @boot
Comment #22
Posted on Sep 26, 2014 by Happy KangarooActually there is still a problem!
The CheckAccess.g4b runs OK, but when it returns I get an Error 27: Unrecognised command on the command following the call to /checkaccess.g4b (see menu in post #19)
if I use /%grub%/CheckAccess.g4b ;; echo s
then it echos 's' and I get no error
/%grub%/CheckAccess.g4b && echo s >> no error (no s)
/%grub%/CheckAccess.g4b || echo s >> no error (s is dispayed)
Comment #23
Posted on Sep 30, 2014 by Happy HippoHave you try new?
Comment #24
Posted on Sep 30, 2014 by Happy Kangarooyes! See #21 and #22
Comment #25
Posted on Oct 2, 2014 by Happy KangarooAttached my test files - copy to root
I use Asus 904HA EeePC Boot from external 230GB Samsung SSD
CheckAccess runs OK but it returns I get a Error 27: Unrecognised command
and it does not run the rest of the lines (i.e. echo 1 etc etc and pause is not run). It then returns to the menu.
also, when it returns to the menu, if I do a c for command line
echo %?_BOOT%
displays a load of garbage characters - so ?_BOOT has been corrupted.
- Test1.zip 149.67KB
Comment #26
Posted on Oct 2, 2014 by Happy KangarooP.S. When I say CheckAccess runs OK, I mean it runs and says the BIOS is buggy, as expected.
Comment #27
Posted on Oct 2, 2014 by Happy KangarooSame test using 2TB USB 3.0 WD MyPassport drive shows no problem on same Asus 904HA EeePC in same USB port. i.e. 2TB USB drive >> CheckAccess reports a Bad BIOS Then echoes 1 ?_BOOT=(cd) @boot=(hd0,0)
so it works correctly!
This is strange? 230GB SSD drive shows a problem (formatted as NTFS or FAT32), but 2TB HDD does not (even though both report BAD BIOS in CheckAccess.g4b and both tested on same EeePC)!
Comment #28
Posted on Oct 2, 2014 by Happy KangarooNote: if I remove setlocal from CheckAccess.g4b then still get same problem. So it is nothing to do with setlocal. Other variables are still present if I do a set command, but ?_BOOT is corrupted.
Comment #29
Posted on Oct 3, 2014 by Happy HippoComment deleted
Comment #30
Posted on Oct 3, 2014 by Happy HippoI see your attach of grldr version is old.
Please download this version. http://grub4dos.chenall.net/downloads/grub4dos-0.4.5c-2014-09-26/
and there maybe bug in bios,Please try modify variable_base_addr(0x307FF4).
e.g. write 0x307ff4 0xC00000 && set *
Comment #31
Posted on Oct 3, 2014 by Happy KangarooThere is little difference with the new 2014-09-26 and the old 2014-09-26.
With new version ?_BOOT is lost after running the menu, with older version it is corrupted (full of NNNN). I still get the 'Error 27: Unrecognised command' error.
If I use write 0x307ff4 0xC00000 && set * then ?_BOOT is lost, so I used write 0x307ff4 0xC00000 && set ?_BOOT=%?_BOOT%
In this case, I still get 'Error 27: Unrecognised command' after CheckAccess.g4b is run and 'echo 1' and the other lines do not execute. ?_BOOT returns (hd0,0).
- Test2.zip 150.75KB
Comment #32
Posted on Oct 3, 2014 by Happy KangarooIf test with 0.4.6a 2014-09-23 I get same problem. i.e. CheckAccess reports Bad BIOS and then get 'Error 27: Unrecognised command' error. echo 1 and other commands not executed. Also ?_BOOT is corrupted (full of NNNNN...)
Comment #33
Posted on Oct 5, 2014 by Happy KangarooI tested with grub4dos-0.4.5c-2014-09-04.7z safe_int13 version
Same symptom as #32
Comment #34
Posted on Oct 5, 2014 by Happy KangarooI tested older version of 0.4.5c
It seems bug was introduced in 2013-03-20 version
FAIL = same symptom as #32
2014-08-19 FAIL 2013-06-30 FAIL 2014-05-16 FAIL 2013-04-19 FAIL 2013-03-29 FAIL 2013-03-20 FAIL 2013-03-12 OK 2012-12-31 OK 2012-03-21 OK
Comment #35
Posted on Oct 5, 2014 by Happy KangarooThese are two test files I used for checking the problem
- Test3.zip 150.75KB
Comment #36
Posted on Oct 5, 2014 by Happy KangarooMore testing - If I comment out cat --length=16 --hex %driv%%%lba%+1 > nul && set result=1
then code works, so problem is caused by disk access returning error + change in 2013-03-20??
Comment #37
Posted on Oct 6, 2014 by Happy KangarooIf I set errorcheck off before cat --length=16 --hex %driv%%%lba%+1 line then 2013-03-20 almost works except that ?_BOOT is still corrupted.
so bug in 2013-03-20 must be to do with error status being returned by command.
If I use 2013-03-12 then all works and ?_BOOT is not corrupt.
Comment #38
Posted on Oct 11, 2014 by Happy HippoI can not found problem in code. Try this please.
Comment #39
Posted on Oct 11, 2014 by Happy KangarooSame problem! Error 27: Unrecognized command and ?_BOOT corrupted
(Test3.zip from #35 used for test on Asus EeePC 904HA)
It works perfectly if I use 23-03-2012 !!!
Can you make a special version which removed the ;; code so that it is the same as 23-03-2012 but with all newer changes and I will test?
- Captureg4dScreen1.JPG 83.96KB
- Capture_g4d_screen2.JPG 59.74KB
Comment #40
Posted on Oct 11, 2014 by Happy Hipporemoved the ;; code support.
Comment #41
Posted on Oct 11, 2014 by Happy KangarooThat still fails in exactly the same way!
So what other changes were there between 2013-03-20 FAIL 2013-03-12 OK
???
Comment #42
Posted on Oct 11, 2014 by Happy KangarooPlease can you check the download in #40 - is it correct version with ;; removed?
How come
echo 1 ;; echo 2
works???
Comment #43
Posted on Oct 11, 2014 by Happy HippoSorry!this please.
- grub4dos-0.4.5c-2014-10-11.7z 256.81KB
Comment #44
Posted on Oct 11, 2014 by Happy KangarooThat version also fails the test and echo 1 ;; echo 2 does not work. So the problem must be somewhere else???
Comment #45
Posted on Oct 11, 2014 by Happy KangarooComment #46
Posted on Oct 11, 2014 by Happy Hippo(No comment was entered for this change.)
Attachments- grub4dos-0.4.5c-2014-10-11-gcc4.5.7z 255.08KB
- grub4dos-0.4.5c-2014-10-11-gcc4.8.7z 256.95KB
Comment #47
Posted on Oct 11, 2014 by Happy KangarooBoth of those work! What did you change?
Comment #48
Posted on Oct 12, 2014 by Happy Hippojust delete below line.
if (cmd[0] == cmd[1] && cmd[2] != 0x20)
continue;
Please try this again.
Comment #49
Posted on Oct 12, 2014 by Happy Hippo(No comment was entered for this change.)
Comment #50
Posted on Oct 12, 2014 by Happy KangarooThat fails in the same way as before.
Comment #51
Posted on Oct 12, 2014 by Happy HippoThanks for you test,I don't know why.
Please try below again ,hope both can work.
Comment #52
Posted on Oct 12, 2014 by Happy Kangarootest1 WORKS test2 FAILS
Comment #53
Posted on Oct 12, 2014 by Happy HippoOk,Thank you for your patience tested again..
workaround for this issue is remove following two lines.
if (cmd[0] == cmd[1] && cmd[2] != 0x20) continue;
the new version is uploaded http://grub4dos.chenall.net
Comment #54
Posted on Oct 12, 2014 by Happy KangarooSomething odd with this new version
In VBOX I get FATAL: int13_hardisk_ext: function 42. can't use 64bits lba
On Asus EeePC, Checkaccess.g4b (in E2B, not test version) stops on 'Checking last sector is accessible...' for about 2 minutes before continuing.
???
Comment #55
Posted on Oct 12, 2014 by Happy Kangaroogrub4dos-0.4.5c-2014-10-12-test1.7z also fails with the same FATAL:: int13 error.
Comment #56
Posted on Oct 12, 2014 by Happy Kangaroogrub4dos-0.4.6a-2014-10-12.7z seems OK but not 0.4.5c
Comment #57
Posted on Oct 12, 2014 by Happy Kangarooif run from USB 32Gb flash drive under VBox, grub4dos-0.4.6a-2014-10-12.7z does hang on DPMS2 in Easy2Boot (0.4.5c does not hang and works, but get FATAL: error if booting from 2TB USb HDD under Vbox).
Comment #58
Posted on Oct 15, 2014 by Happy KangarooI think issue with VBox and 2 minute delay on EeePC was caused by accessing sectors past the end of the disk. The code in CheckAccess.g4b uses lines like
set /a s1=*0x6001c6 & 0xffffffff >>2
This seems to work (i.e. divides number by 4) with some disks but not others (depending on size of partitions?)! Changing code to remove the space to
set /a s1=*0x6001c6 & 0xffffffff>>2
works OK and always divides by 4. So on some drives, the lba sector to access was x4 greater than the end of the disk and this was causing the issues in VBox and EeePC - 2 minute delay.
So 0.4.5c looks OK.
Also tested 0.4.6a 2014-10-15 and this now works with DPMS - so problems look fixed. I will continue to test but so far both versions look OK... Thanks!
Comment #59
Posted on Oct 18, 2014 by Happy HippoIf has any other problems please report issues at github.(because Googlecode is hard to access from china)
Comment #60
Posted on Oct 19, 2014 by Happy Kangarooso far testing is good! No problems. Will you be releasing this new version and 0.4.6a version?
Comment #61
Posted on Oct 21, 2014 by Happy KangarooFYI - This problem is only fixed by using
write 0x307ff4 0xC00000 && set ?_BOOT=%?_BOOT%
on first line of menu.lst
If this line is omitted then ?_BOOT is corrupted to all NNNNNs with sedillas as before.
Comment #62
Posted on Oct 21, 2014 by Happy KangarooAlso, if I use the write 0x307ff4 0xC00000 && set ?_BOOT=%?_BOOT% line in a VM or any system, then on first boot, I get splashimage 800x600 as usual. However, if I reboot VBox or QEMU then it does not change to 800x600 graphicsmode and no splashimage! This is when using the 'reboot' command. Really strange!
I tried different locations - e.g. 0x1200000 and same result - boot OK first time but on reboot -> no graphicsmode!
Status: Started
Labels:
Type-Defect
Priority-Medium