[coreboot] How to give control to bootable USB
Dhanasekar Jaganathan
jdhanasekarmca at gmail.com
Fri Jun 16 10:24:50 CEST 2017
Hi Zoran,
Ok.. I will try that.
After adding below menuentry in grub.cfg( ,
*menuentry "ONIE: Embed ONIE" --class gnu-linux --class onie {*
* echo "ONIE: Embedding ONIE ..."*
* set gfxpayload=keep*
* insmod gzio*
* insmod part_msdos*
* insmod ext2*
* #onie_entry_start*
* set root='USB0' *
* set isofile='USB0'/onie-recovery-x86_64-accton_as7512_32x-r0.iso*
* loopback loop $isofile*
* linux (loop)/live/vmlinuz $ONIE_CMDLINE_LINUX boot_reason=embed
install_url=file:///lib/onie/onie-updater*
* initrd (loop)/live/initrd.xz*
* #onie_entry_end*
*}*
I am getting below error,
*error: file `/boot/grub/i386-coreboot/loopback.mod' not found*
Actually, my ONIE .iso has* i386-PC*, not *i386-coreboot*. But GRUB is
looking for* i386-coreboot*.
I am trying to solve this issue.
Thanks,
Dhanasekar
On Fri, Jun 16, 2017 at 1:22 PM, Zoran Stojsavljevic <
zoran.stojsavljevic at gmail.com> wrote:
> To simplify your tests...
>
> If you have enough space on your /boot on your HDD, you can do the
> following:
>
> [1] Copy your ONIE-live-XYZ.iso (or whatever the true name is) there from
> USB stick to /boot partition;
>
> [2] Simplify the grub.cfg script like this:
>
> menuentry "ONIE: Embed ONIE" --class gnu-linux --class onie {
> echo "ONIE: Embedding ONIE ..."
> onie_entry_start
> set root='hd0,msdos1' ## hd0 is your HDD, 1 is /boot -> /dev/sda1)
> set isofile=/ONIE-live-XYZ.iso ## or whatever your ONIE... .iso image is
> named
> loopback loop $isofile
> *linux (loop)/live/vmlinuz* $ONIE_CMDLINE_LINUX boot_reason=embed
> install_url=file:///lib/onie/onie-updater
> *initrd (loop)/live/initrd.xz*
> onie_entry_end
>
> If this does work, U R Cool. But you need to have at least size of ~ 2GB
> for /boot (assuming your .iso is no more than ~1.5 GB in size).
>
> This is why I ALWAYS assign to /boot (/dev/sda1) NO LESS that 2GB in
> space! ;-)
>
> Zoran
>
> On Thu, Jun 15, 2017 at 3:37 PM, Dhanasekar Jaganathan <
> jdhanasekarmca at gmail.com> wrote:
>
>> Hi Zoran,
>>
>> Thanks for the info.
>>
>> With previously attached grub.cfg + Vendor BIOS, I can able to install
>> ONIE from USB.
>> But with Coreboot + GRUB2 + previously attached grub.cfg, I am unable to
>> install ONIE from USB.
>>
>> I am going to try your changes, I will let you know.
>>
>> Thanks,
>> Dhanasekar
>>
>> On Thu, Jun 15, 2017 at 6:51 PM, Zoran Stojsavljevic <
>> zoran.stojsavljevic at gmail.com> wrote:
>>
>>> Hello Dhanasekar,
>>>
>>> This, I guess, is not (entirely) correct:
>>>
>>> menuentry "ONIE: Embed ONIE" --class gnu-linux --class onie {
>>> echo "ONIE: Embedding ONIE ..."
>>> onie_entry_start
>>> *linux /vmlinuz* $ONIE_CMDLINE_LINUX boot_reason=embed
>>> install_url=file:///lib/onie/onie-updater
>>> * initrd /initrd.xz*
>>> onie_entry_end
>>>
>>> You should have something similar to the following:
>>>
>>> menuentry "ONIE: Embed ONIE" --class gnu-linux --class onie {
>>> echo "ONIE: Embedding ONIE ..."
>>> onie_entry_start
>>> set root='hdX,msdosY' ## hdX is your USB stick, Y partition, U R
>>> booting from, U should find going to GRUB2 monitor (with > prompt)
>>> set isofile=/<dir path>/ONIE-live-XYZ.iso ## or whatever your ONIE...
>>> .iso image is named
>>> loopback loop $isofile
>>> *linux (loop)/live/vmlinuz* $ONIE_CMDLINE_LINUX boot_reason=embed
>>> install_url=file:///lib/onie/onie-updater
>>> *initrd (loop)/live/initrd.xz*
>>> onie_entry_end
>>>
>>> Please, investigate a bit more using google.com! And let us know if you
>>> did solve the problem (post the final grub2 menyentry which works for you).
>>>
>>> Hope this helps to the whole community. ;-)
>>>
>>> Zoran
>>>
>>> On Thu, Jun 15, 2017 at 2:33 PM, Dhanasekar Jaganathan <
>>> jdhanasekarmca at gmail.com> wrote:
>>>
>>>> Hi Nico,
>>>>
>>>> Sorry, It is typo. I have tried with *configfile
>>>> (usb0)/boot/grub/grub.cfg* only..
>>>>
>>>> with a new *boot/grub/grub.cfg*, I am getting following error,
>>>>
>>>> *error: file '/vmlinuz' not found.*
>>>>
>>>> *error: you need to load the kernel first. *
>>>>
>>>>
>>>> FYR, I have attached /boot/grub/grub.cfg(which is present in USB).
>>>>
>>>> Thanks,
>>>> Dhanasekar
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Jun 15, 2017 at 4:59 PM, Nico Huber <nico.h at gmx.de> wrote:
>>>>
>>>>> On 15.06.2017 07:31, Dhanasekar Jaganathan wrote:
>>>>> > Hi Nico/Taiidan,
>>>>> >
>>>>> > After entering "*syslinux_configfile (*", when I press *TAB, I* I am
>>>>> not
>>>>> > seeing anything (nothing is coming)..
>>>>> >
>>>>> > So, I have tried this command *"syslinux_configfile
>>>>> > (usb0)/boot/grub/grub.cfg" *and got the error (Kernel without label).
>>>>>
>>>>> Read what Taiidan wrote carefully:
>>>>>
>>>>> >>>> also configfile (ahci0,msdos1)/grub2/grub.cfg to load a grub cfg
>>>>>
>>>>> For a grub.cfg, it's a plain *configfile* (not syslinux_configfile).
>>>>>
>>>>> Nico
>>>>>
>>>>> >
>>>>> > My USB ONIE installers has following files,
>>>>> >
>>>>> > */initrd.xz*
>>>>> >
>>>>> > */vmlinuz*
>>>>> >
>>>>> > */boot/boot.cat <http://boot.cat>*
>>>>> >
>>>>> > */boot/eltorito.img*
>>>>> >
>>>>> > */boot/grub/gurb.cfg*
>>>>> >
>>>>> > */boot/i386-PC/ *.mod (Lot of .mod files)*
>>>>> >
>>>>> >
>>>>> > Thanks,
>>>>> > Dhanasekar
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Thu, Jun 15, 2017 at 5:01 AM, Nico Huber <nico.h at gmx.de> wrote:
>>>>> >
>>>>> >> Hi Dhanasekar,
>>>>> >>
>>>>> >> On 14.06.2017 11:21, Dhanasekar Jaganathan wrote:
>>>>> >>> Hi Taiidan,
>>>>> >>>
>>>>> >>> My USB ONIE installers don't have "isolinux/syslinux.cfg". It has
>>>>> >>> "boot/grub/grub.cfg".
>>>>> >>>
>>>>> >>> When I try to run "syslinux_configfile (usb0)/boot/grub/grub.cfg"
>>>>> in GRUB
>>>>> >>> command line, I am getting "*kernel without label*" error.
>>>>> >>>
>>>>> >>> Please provide your commands
>>>>> >>
>>>>> >> Taiidan already told you the correct command name (33 lines below).
>>>>> You
>>>>> >> might have missed it ;)
>>>>> >>
>>>>> >> Nico
>>>>> >>
>>>>> >>>
>>>>> >>> Thanks,
>>>>> >>> Dhanasekar
>>>>> >>>
>>>>> >>> On Wed, Jun 14, 2017 at 3:22 AM, Taiidan at gmx.com <Taiidan at gmx.com>
>>>>> >> wrote:
>>>>> >>>
>>>>> >>>> On 06/13/2017 10:22 AM, Dhanasekar Jaganathan wrote:
>>>>> >>>>
>>>>> >>>> Hi All,
>>>>> >>>>>
>>>>> >>>>> I am trying to install ONIE from USB which has ONIE installer.
>>>>> >> Actually, I
>>>>> >>>>> am using GRUB2 as a payload. If Coreboot display list of
>>>>> bootable
>>>>> >>>>> device,I
>>>>> >>>>> can select USB which will install a OS in the hard disk. As I
>>>>> >> understood
>>>>> >>>>> that Coreboot won't display list of available bootable device
>>>>> (not like
>>>>> >>>>> vendor bios).I don't know how to give control to bootable USB or
>>>>> boot a
>>>>> >>>>> bootable USB by coreboot. Can you please help me on this?.
>>>>> >>>>>
>>>>> >>>>>
>>>>> >>>>> Thanks,
>>>>> >>>>> Dhanasekar
>>>>> >>>>>
>>>>> >>>> Assuming you are booting a standard linux distro iso:
>>>>> >>>> syslinux_configfile (*TAB* to see what is available
>>>>> >>>>
>>>>> >>>> then simply for instance syslinux_configfile
>>>>> (usb0,msdos1)/isolinux/
>>>>> >> syslinux.cfg
>>>>> >>>> (or w/e)
>>>>> >>>>
>>>>> >>>> also configfile (ahci0,msdos1)/grub2/grub.cfg to load a grub cfg
>>>>> >>>>
>>>>> >>>> Ideally you would add a grub cfg to the coreboot image that does
>>>>> >> something
>>>>> >>>> like load a config file from a specified local disk so that it is
>>>>> easy
>>>>> >> to
>>>>> >>>> update (ie: no re-flashing) instructions for that are on the wiki.
>>>>> >>>>
>>>>> >>>> SeaBIOS would provide the classic AMI style F12 selection menu,
>>>>> but I
>>>>> >>>> don't like it due to how many times I have accidentally enabled
>>>>> option
>>>>> >> rom
>>>>> >>>> execution by forgetting to include the configuration file.
>>>>> >>>>
>>>>> >>>
>>>>> >>>
>>>>> >>>
>>>>> >>
>>>>> >>
>>>>> >
>>>>>
>>>>>
>>>>
>>>> --
>>>> coreboot mailing list: coreboot at coreboot.org
>>>> https://mail.coreboot.org/mailman/listinfo/coreboot
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot/attachments/20170616/3a4f70cd/attachment.html>
More information about the coreboot
mailing list