[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub-setup: error: Non-sector-aligned data is found in the core file

From: UrJiZ
Subject: Re: grub-setup: error: Non-sector-aligned data is found in the core file
Date: Sun, 11 Nov 2007 14:47:21 +0200

On Nov 10, 2007 6:22 PM, Marco Gerards <address@hidden> wrote:
> Robert Millan <address@hidden> writes:
> > On Thu, Nov 08, 2007 at 02:36:28PM +0200, UrJiZ wrote:
> >> On 11/7/07, Robert Millan <address@hidden> wrote:
> >> <snip>
> >> > For building a floppy use grub-mkrescue instead.
> >> >
> >>
> >> Used ./grub-mkrescue, but it:
> >> a) seems not to create a filesystem on the disk image (how can i put
> >> grub.cfg on the disk?)
> >
> > I was thinking we could have some way to embed filesystems in a GRUB image
> > (we might need this for LinuxBIOS port).
> We could just add files using grub-mkimage.  If a file isn't a module,
> it won't be loaded but accessible.  We can use (host) or so for
> this...

I just had the first success of loading grub from an Option ROM in
qemu. I modified ROMOS code mostly just removing the disk emulation
system and making it a simple core.img loader (the loading is a memory
copy + setting dl to what the user has defined +  jmp 0:8200h). I can
post this code if someone is interested. It is written in assembler,
x86 intel syntax, compiled using nasm and at the moment the rom
checksum fixing is done by the same dos tool(romchk.exe) as for romos,
i ran this with dosbox.

Now i have both biosdisk and ata modules in the core, and the
dl-register-based rootdisk detection just uses fd if dl < 80h or hd if
dl > 80h. Having the possibility of selecting an ata drive via some
special value of dl would be great, i was thinking of F0h = ata0 ...
FFh = ata15 (although ata15 is not yet possible, but maybe possible in

Also, I'm not sure of this, but it seems that the ata driver blocks
out the hd*-devices and i understand this, but it also blocks
fd*-devices and this is something i don't really understand, I'd
really like to access both cdrom's and floppy disks.

And for the including of files in core.img, all i really need is a way
to include grub.cfg in there so that my ROM grub can display a menu
even without a root disk. I would be willing to attempt to work on
this, but i'd like to hear some suggestions/specification of how it
should be done (eq in what layer of grub, whether to have only
grub.cfg possible or to be able to have an entire filesystem (will
propably take more time for me), etc..).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]