kxylxp / grub4dos-chenall

Automatically exported from code.google.com/p/grub4dos-chenall
0 stars 0 forks source link

0.4.6a 2014--9-18 behaving strangely with external SSD drive #204

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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

Original issue reported on code.google.com by Steve6375 on 19 Sep 2014 at 4:47

GoogleCodeExporter commented 8 years ago
Something 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

Original comment by Steve6375 on 19 Sep 2014 at 9:12

GoogleCodeExporter commented 8 years ago
Please try this first

Original comment by chenall.cn on 21 Sep 2014 at 3:53

GoogleCodeExporter commented 8 years ago
I 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)

Original comment by Steve6375 on 21 Sep 2014 at 8:40

GoogleCodeExporter commented 8 years ago
https://github.com/chenall/grub4dos/commit/0618759937ea55e192a4e515daa4d16458379
a2b

Think problem started here?

Original comment by Steve6375 on 21 Sep 2014 at 8:46

GoogleCodeExporter commented 8 years ago
@Steve6375
not problem here

did you try grub4dos-0.4.5c-2014-09-21.7z ?

Original comment by chenall.cn on 22 Sep 2014 at 2:54

GoogleCodeExporter commented 8 years ago
Yes, that is the version that fails for HPAD test

try

if "%HPAD:~0,1%"==" " echo fred

Original comment by Steve6375 on 22 Sep 2014 at 8:18

Attachments:

GoogleCodeExporter commented 8 years ago
ok.

Original comment by chenall.cn on 22 Sep 2014 at 9:55

GoogleCodeExporter commented 8 years ago
OK - that fixed the problem with 0.4.5c.

Original comment by Steve6375 on 22 Sep 2014 at 11:04

GoogleCodeExporter commented 8 years ago
0.4.6a

Original comment by chenall.cn on 22 Sep 2014 at 12:09

GoogleCodeExporter commented 8 years ago
grub4dos-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

Original comment by Steve6375 on 22 Sep 2014 at 3:00

GoogleCodeExporter commented 8 years ago
Still 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!!!

Original comment by Steve6375 on 23 Sep 2014 at 5:29

GoogleCodeExporter commented 8 years ago
If 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

Original comment by Steve6375 on 23 Sep 2014 at 6:12

Attachments:

GoogleCodeExporter commented 8 years ago
grldr 0.4.5c 20140908 works OK and does not exit - it runs whole batch file

Original comment by Steve6375 on 23 Sep 2014 at 6:20

GoogleCodeExporter commented 8 years ago
HDD 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

Original comment by Steve6375 on 23 Sep 2014 at 10:01

GoogleCodeExporter commented 8 years ago
Is there which version can be used?

Please upload the memory info..using grub4dos `displaymem`

Original comment by chenall.cn on 24 Sep 2014 at 8:38

GoogleCodeExporter commented 8 years ago
grab1.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

Original comment by Steve6375 on 24 Sep 2014 at 9:59

Attachments:

GoogleCodeExporter commented 8 years ago
can 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

Original comment by chenall.cn on 25 Sep 2014 at 2:31

GoogleCodeExporter commented 8 years ago
grub4dos-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

Original comment by Steve6375 on 25 Sep 2014 at 7:39

GoogleCodeExporter commented 8 years ago
Here 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

Original comment by Steve6375 on 25 Sep 2014 at 8:05

Attachments:

GoogleCodeExporter commented 8 years ago
I think this is similar to Issue 198.
Please try new and use @boot instead ?_BOOT

Original comment by chenall.cn on 26 Sep 2014 at 1:25

GoogleCodeExporter commented 8 years ago
grub4dos-0.4.5c-2014-09-26.7z   OK

if I use @boot

Original comment by Steve6375 on 26 Sep 2014 at 6:52

GoogleCodeExporter commented 8 years ago
Actually 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)

Original comment by Steve6375 on 26 Sep 2014 at 7:09

GoogleCodeExporter commented 8 years ago
Have you try new?

Original comment by chenall.cn on 30 Sep 2014 at 1:15

GoogleCodeExporter commented 8 years ago
yes! See #21 and #22

Original comment by Steve6375 on 30 Sep 2014 at 8:11

GoogleCodeExporter commented 8 years ago
Attached 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.

Original comment by Steve6375 on 2 Oct 2014 at 11:42

Attachments:

GoogleCodeExporter commented 8 years ago
P.S. When I say CheckAccess runs OK, I mean it runs and says the BIOS is buggy, 
as expected.

Original comment by Steve6375 on 2 Oct 2014 at 11:44

GoogleCodeExporter commented 8 years ago
Same 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)!

Original comment by Steve6375 on 2 Oct 2014 at 11:54

GoogleCodeExporter commented 8 years ago
Note: 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.

Original comment by Steve6375 on 2 Oct 2014 at 12:08

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I 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 *

Original comment by chenall.cn on 3 Oct 2014 at 3:57

GoogleCodeExporter commented 8 years ago
There 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).

Original comment by Steve6375 on 3 Oct 2014 at 8:26

Attachments:

GoogleCodeExporter commented 8 years ago
If 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...)

Original comment by Steve6375 on 3 Oct 2014 at 11:38

GoogleCodeExporter commented 8 years ago
I tested with grub4dos-0.4.5c-2014-09-04.7z   safe_int13  version
>> Same symptom as #32

Original comment by Steve6375 on 5 Oct 2014 at 9:05

GoogleCodeExporter commented 8 years ago
I 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

Original comment by Steve6375 on 5 Oct 2014 at 9:33

GoogleCodeExporter commented 8 years ago
These are two test files I used for checking the problem

Original comment by Steve6375 on 5 Oct 2014 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
More 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??

Original comment by Steve6375 on 5 Oct 2014 at 10:38

GoogleCodeExporter commented 8 years ago
If 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.

Original comment by Steve6375 on 6 Oct 2014 at 8:48

GoogleCodeExporter commented 8 years ago
I can not found problem in code.
Try this please.

Original comment by chenall.cn on 11 Oct 2014 at 9:22

GoogleCodeExporter commented 8 years ago
Same 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?

Original comment by Steve6375 on 11 Oct 2014 at 9:45

Attachments:

GoogleCodeExporter commented 8 years ago
 removed the ;; code support.

Original comment by chenall.cn on 11 Oct 2014 at 1:25

GoogleCodeExporter commented 8 years ago
That still fails in exactly the same way!

So what other changes were there between 
2013-03-20 FAIL
2013-03-12 OK

???

Original comment by Steve6375 on 11 Oct 2014 at 2:04

GoogleCodeExporter commented 8 years ago
Please can you check the download in #40  - is it correct version with ;; 
removed?

How come

echo 1 ;; echo 2

works???

Original comment by Steve6375 on 11 Oct 2014 at 2:41

GoogleCodeExporter commented 8 years ago
Sorry!this please.

Original comment by chenall.cn on 11 Oct 2014 at 2:56

Attachments:

GoogleCodeExporter commented 8 years ago
That version also fails the test and  echo 1 ;; echo 2  does not work.
So the problem must be somewhere else???

Original comment by Steve6375 on 11 Oct 2014 at 2:59

GoogleCodeExporter commented 8 years ago
https://github.com/chenall/grub4dos/commit/e2b5ce08d11687f7ec21ffc989113ea501f1c
69a#diff-3f10e611bd6c650328f5c927c5b50bdaR184

Original comment by Steve6375 on 11 Oct 2014 at 3:06

GoogleCodeExporter commented 8 years ago

Original comment by chenall.cn on 11 Oct 2014 at 3:35

Attachments:

GoogleCodeExporter commented 8 years ago
Both of those work!
What did you change?

Original comment by Steve6375 on 11 Oct 2014 at 3:41

GoogleCodeExporter commented 8 years ago
just delete below line.
    if (cmd[0] == cmd[1] && cmd[2] != 0x20)
        continue;
Please try this again.

Original comment by chenall.cn on 12 Oct 2014 at 12:06

GoogleCodeExporter commented 8 years ago

Original comment by chenall.cn on 12 Oct 2014 at 12:23

GoogleCodeExporter commented 8 years ago
That fails in the same way as before.

Original comment by Steve6375 on 12 Oct 2014 at 7:53