help-grub
[Top][All Lists]
Advanced

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

Re: grub in mac


From: Andrei Borzenkov
Subject: Re: grub in mac
Date: Thu, 12 Nov 2015 10:40:59 +0300

On Thu, Nov 12, 2015 at 10:29 AM, Peter Cheung <address@hidden> wrote:
> Thanks, i am trying to fix this in code, but i am too new to grub coding. I
> want to print out something in ./grub-core/kern/disk_common.c, so i do
> "grub_util_info("peter\n");" and add "include <grub/util/misc.h>" on the top
> of the file, but i get this error:
>
> In file included from lib/../kern/disk_common.c:1:0,
>
>                  from lib/disk.c:31:
>
> ../include/grub/util/misc.h:22:20: fatal error: stdlib.h: No such file or
> directory
>

disk_common is unrelated to your problem. You need to look at host
device probing code under grub-core/osdep, code that maps host device
to grub device is historically located in various getroot.c files.

>
> May I know the correct way to print out something please?
>

#ifdef GRUB_UTIL
  grub_util_info (...);
#endif



> thanks
> from Peter
>
>> Subject: Re: grub in mac
>> To: address@hidden
>> From: address@hidden
>> Date: Wed, 11 Nov 2015 08:08:09 +0300
>> CC: address@hidden
>
>>
>> 11.11.2015 07:34, Peter Cheung пишет:
>> > I tried grub-install, but same error message, another thing i discovered
>> > is "the size of hostdisk//dev/rdisk2 is 204800", but my hd.img file is
>> > 100MB.thanksfrom Peter
>> >
>> ...
>>
>> > /toolchain/sbin/grub-install: info: drive = 0.
>> > /toolchain/sbin/grub-install: info: the size of hostdisk//dev/rdisk2 is
>> > 204800.
>> > /toolchain/sbin/grub-install: info: guessed root_dev
>> > `hostdisk//dev/rdisk2' from dir
>> > `/Users/peter/NetBeansProjects/PeterI/temp/grub/i386-pc'.
>> > /toolchain/sbin/grub-install: info: setting the root device to
>> > `hostdisk//dev/rdisk2,1'.
>> > /toolchain/sbin/grub-install: error: attempt to read or write outside of
>> > disk `hostdisk//dev/disk2'.
>> >
>>
>>
>> No, it is not the same message. Now it correctly detects disk2, but it
>> lacks MAC OS X specific code for BIOS device guessing.
>>
>> grub-install expects device.map in /boot/grub; so put it there (i.e. on
>> filesystem on /dev/disk2s1).
>>
>> Someone more familiar with OS X need to contribute device detection code
>> for it.
>>
>> _______________________________________________
>> Help-grub mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/help-grub



reply via email to

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