(HOWTO) Using GRUB As Bootloader (Second Stage After U-Boot)
(HOWTO) Using GRUB As Bootloader (Second Stage After U-Boot)
t=26894
3. grub-install /boot
this will install all the GRUB files into the /boot directory
1 of 6 06/05/2019 à 14:04
[HOWTO] Using GRUB as bootloader (second stage after U... https://forum.odroid.com/viewtopic.php?t=26894
4. create a simple grub.cfg file with an entry to boot, for example (note
that I have /boot directory, because I don't use separate partition for boot
files, and also UUID definitely is going to be different for you):
menuentry 'Kernel' {
devicetree /boot/exynos5422-odroidxu4.dtb
initrd /boot/initrd.img-4.9.25
linux /boot/vmlinuz-4.9.25 console=tty1 console=ttySAC2,115200n8 root
}
5. to make U-Boot call GRUB as the loader you need this to be bootcmd
of U-Boot (My /boot is not a separate partition and I don't use fat32
partition to store kernels, my system is on first partition of the card and all
ext4):
that will load standard GRUB menu with the menuentry you provided.
Even if the menuentry would be wrong - it's much easier to work with
kernels and parameters from the GRUB menu and editor
Last edited by OverSun on Sat May 20, 2017 12:29 am, edited 1 time in total.
2 of 6 06/05/2019 à 14:04
[HOWTO] Using GRUB as bootloader (second stage after U... https://forum.odroid.com/viewtopic.php?t=26894
Posts: 5751
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2,
N2
Location: Bucharest, Romania
Has thanked: 46 times
Been thanked: 24 times
Contact:
This is the way it should work, I will get into this soon. Thanks OverSun rooted
Posts: 6456
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Is the eMMC driver built into the kernel? I don't think it's a module. Location: Gulf of Mexico, US
Has thanked: 8 times
Been thanked: 6 times
I would also try the direct location to your menu entry (/dev/mmbblk0p2), Contact:
just an idea.
3 of 6 06/05/2019 à 14:04
[HOWTO] Using GRUB as bootloader (second stage after U... https://forum.odroid.com/viewtopic.php?t=26894
files and modules for real grub on it, loads them and shows the menu.
After the reset u-boot loads, it loads core.img successfully, but then this
core.img sees only (hd0) and no partitions on it, so it cannot find the
GRUB second stage.
This could be either u-boot mmc driver reset sequence flaw (I suspect
most) specific for -XU4, core.img (GRUB first stage flaw) generic for
ARM's, or Linux weird flaw that does something to the card during reboot
and doesn't release it successfully...
Also this happens not 100% of time, it's 50/50, sometimes it boots after
reset, sometimes not.
Well, I'm not looking deeply into that right now, for me it's ok like this. It
doesn't bother me to unplug/plug the board since I'm experimenting
anyway. But the grub is waaaaay more easier as the system than u-boot
to tinker with.
I wouldn't advise you to try that if you don't know what you're doing. Just
wait when it's stable and rolled out by vendor if they decide to go that
way.
The process itself right now is pretty complicated to setup and has a flaw
that doesn't make it useful 100%.
Find out what happens from uboot when "reset" is issued, this triggers a rooted
full 'hard' boot in my testing. Posts: 6456
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 8 times
Been thanked: 6 times
Contact:
4 of 6 06/05/2019 à 14:04
[HOWTO] Using GRUB as bootloader (second stage after U... https://forum.odroid.com/viewtopic.php?t=26894
OverSun wrote:
For some reason first stage GRUB called from u-boot after a reboot
cannot find mmc to call second stage.
This could be either u-boot mmc driver reset sequence flaw (I suspect
most) specific for -XU4, core.img (GRUB first stage flaw) generic for
ARM's, or Linux weird flaw that does something to the card during
reboot and doesn't release it successfully...
Strangely, I've seen something similar with the USB connected on-board
devices on the HC1 (NIC & SATA) - my root is on SATA connected SSD,
and after anything but a clean reboot from a properly started normal
ODROID kernel, there is a high likelihood of one or the other or both USB
devices not coming up. After that a power cycle seems to be required, but
5 of 6 06/05/2019 à 14:04
[HOWTO] Using GRUB as bootloader (second stage after U... https://forum.odroid.com/viewtopic.php?t=26894
I've sure I've seen recent mentions (commit log maybe?) of fixes to u-boot
initialization code to address something like this, but can't remember
where...
S.
have to deal with grub for once, I do probably need a more automated Contact:
approach to kernel management.. so this is worth a look..
11 posts • Page 1 of 1
Post Reply
WHO IS ONLINE
Users browsing this forum: No registered users and 3 guests
Board index The team Members Delete cookies All times are UTC+09:00
6 of 6 06/05/2019 à 14:04