Jump to content











Photo
- - - - -

Specify kernel as a blocklist, possible ? Suspected G4D bug...


  • Please log in to reply
12 replies to this topic

#1 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 23 October 2015 - 12:06 PM

While hunting the grail (trying to get grub4dos to bootstrap a linux residing
on a disk with 4K-sectors, cf. other thread http://reboot.pro/to...-on-4k-sectors/) I have come to the conclusion that
Grub4DOS does NOT accept the 'blocklist' notation for a KERNEL file :-(

ISTM it would be a desirable enhancement to be able to specify a KERNEL (and INITRD as well...) as a blocklist, in cases those files reside outside of file systems (that Grub4DOS can mount). A blocklist should be accepted everywhere that a file is, in
Grub4DOS (and upstram, legacy Grub - is that still being maintained ?)

I'm feeling like filling a bug/feature request at Chenall's Grub4DOS site, but
before I do please someone confirm the "bug/misfeature" is real.
I have little time of mine now and haven't checked beyond the above cited case
(on 4K media) so there is a possibility the "bug/misfeature" is not present on
regular 512-K medium, and/or I may have "goofed" altogether.
Confirmation / expert advice on this report heartily wished ! Tinybit, maybe ? please !

#2 steve6375

steve6375

    Platinum Member

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

Posted 23 October 2015 - 12:33 PM

I did this on a 512-byte sector drive using 0.4.6a 2015-10-21 and it seemed to work?

 

blocklist /vmlinuz

(hd0,0)6262392+7826

kernel (hd0,0)6262392+7826

  [Linux-bzimage, setup=0x4200, size=0x3ce000]

 

Maybe you need to ensure the start and size are multiples of 8 on a 4k-sector drive? I made sure the file was contiguous first.


Edited by steve6375, 23 October 2015 - 12:37 PM.


#3 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 23 October 2015 - 01:46 PM

If your BIOS is broken on the 4K-sector disks, you cannot go any further with grub4dos. Full stop.

 

Urhmmmm, except that some one would write a grub4dos driver for the 4K-sector disks.



#4 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 23 October 2015 - 04:00 PM

I did this on a 512-byte sector drive using 0.4.6a 2015-10-21 and it seemed to work?

Thank you ! Indeed, it works - as it should -(on regular bios disks) !
I have just checked (after you) and launched one of my installed linuces
while specifying both kernel and initrd as blocklists (and /not/ contiguous, too) :=)

BTW what command or tool do you use, if any, to make one file contiguous under Linux ?
Analogous to what Sysinternals' "contig" does under the "other" OS ?

Maybe you need to ensure the start and size are multiples of 8 on a 4k-sector drive? I made sure the file was contiguous first.

I'm sure they were multiples of 8, because I had to do the multiplication "by hand" (OK, using calculator...) in order to convert block numbers given by 'debugfs'.

I'll double check everything with the "4K sector" disk once again very carefully.

#5 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 23 October 2015 - 04:21 PM

If your BIOS is broken on the 4K-sector disks, you cannot go any further with grub4dos. Full stop.
Urhmmmm, except that some one would write a grub4dos driver for the 4K-sector disks.


Indeed, recent 0.4.6.a builds (Chenall's) started including 4-K sector support,
coded by Yaya2007. BIOS int 13h read/write sectors works perfectly, but G4D still fails to work at partition (filesystem) level -> issue #47 there https://github.com/c...b4dos/issues/47

#6 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 23 October 2015 - 05:04 PM

I think you might have missed something essential or important. If I am not mistaken, yaya's driver only works for usb storage devices. It cannot drive the internal harddisks. So to access the internal disk, grub4dos have to use the ROM BIOS. And if the ROM BIOS is broken, you will logically gain a failure without any suspense.

#7 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 23 October 2015 - 05:46 PM

I think you might have missed something essential or important. If I am not mistaken, yaya's driver only works for usb storage devices. It cannot drive the internal harddisks. So to access the internal disk, grub4dos have to use the ROM BIOS. And if the ROM BIOS is broken, you will logically gain a failure without any suspense.

I think /you/ missed a piece, namely, the whole context  :=)

The disk I'm trying to boot from without motherboard BIOS support

is indeed USB-attached. Mainboard BIOS support for USB-disk-boot

fails beacause it assumes 512 byte-sectors, whereas the device in

question presents only 4K-byte-sectors.



#8 tinybit

tinybit

    Gold Member

  • Developer
  • 1175 posts
  •  
    China

Posted 24 October 2015 - 12:59 AM

It is a good experience to see I have lost the whole context. :-)

yaya is working hard on the usb storage driver for grub4dos.

I think of any failure (on accessing usb file/data) as a driver bug.

So I think you may report it to yaya.

#9 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 24 October 2015 - 09:12 AM

(More...) I was so excited with Yaya2007's implement of 'int 13' for 4K sectors (@USB) 

that I assumed it was correct after very superficial checing.

 

Turns out it is not correct (yet)   :-(

 

Slightly less superficial testing with "cat --hex" at different sector offsets and varying read length

shows varying meaningless bytes being displayed ! No wonder Grub could not find and load

my kernel, or recognize and mount file systems !

 

When I have time - which may take days or even weeks - I'll append to that there bug report

or open a new one. Meanwhile I'm stunned : am I the one user on this planet concerned

with the bug ? Has noone read and checked Yaya's new code ? Either bugs creep therein,

or it might be how the old (Grub) code interacts with the additions. Someone should review.

 

So frustrating !



#10 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 24 October 2015 - 09:13 AM

cancel ! (double-posted by error)  


Edited by Ninho, 24 October 2015 - 09:16 AM.


#11 steve6375

steve6375

    Platinum Member

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

Posted 24 October 2015 - 09:35 AM

Since BIOSes do not support 4k sector booting, grub4dos cannot be booted from a 4k drive via the BIOS. Also 4k drives that do not support 512-byte sector emulation are not that common. So it is not a concern of many people.

I am guessing you did not check the 4k support, which yaya added for you, very well?

Do you have any idea how long it takes to write and test such code and check it does not break existing functionality?

How much did you pay yaya for his time to write the 4k support code and test it - my guess is nothing!

I think to complain about someone who has spent a lot of his own time and energy adding a feature which you requested for free and which you spent very little effort on, is very unfair.



#12 Ninho

Ninho

    Member

  • Members
  • 69 posts

Posted 24 October 2015 - 09:58 AM

@Steve : I haven't been, and am not complaining about the fine coders.

I but expressed some frustration at seemingly being the only person interested in this.

 

I know support for the 4K sectors on USB is at hand because I have programmed it

myself for DOS.

 

I am trying to help by testing, and reporting my experience, which unfortunately

is it's not working yet. I don't see how this is complaining ? Please understand

that Yaya2007 does not have a device which he can test the 4K sectors, as I understand it.

 

Enough said - or do you really wish me to get started iver you IMO misguided and slightly insulting post ?


Edited by Ninho, 24 October 2015 - 10:10 AM.


#13 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 October 2015 - 12:22 PM

I but expressed some frustration at seemingly being the only person interested in this.

 
If you see it on the bright side, you are a member of a very exclusive club ;).
 

Enough said - or do you really wish me to get started iver you IMO misguided and slightly insulting post ?

For doing that you might need to join the Fight Club :w00t: :ph34r:, but I cannot tell you anything about it.  :whistling:

 

Back to topic (almost) I dropped a semi-random idea on your other thread:

http://reboot.pro/to...-on-4k-sectors/

http://reboot.pro/to...ctors/?p=196007

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users