chromeos usb boots to grub> prompt

6,539 views
Skip to first unread message

normcf

unread,
Jun 20, 2012, 11:51:24 PM6/20/12
to chromium-...@chromium.org
I have downloaded and compiled the source, built the image with BOARD=x86-generic, and ran the ./image_to_usb.sh to a usb thumb drive (8G so lot's of space).  I changed the bios of my computer to boot from usb successfully as it does not boot the Ubuntu installed on the hard drive.  Instead, it just gives me the grub> prompt, which I'm pretty sure comes from the usb drive.  I looked at some grub documentation, but the documented commands were different from the grub 1.97 commands I see on the screen.  Obviously I am missing some critical piece, but I have been searching the net for a few day to no avail.

john@transition:~/chromiumos/src/scripts$ uname -a
Linux transition 3.2.0-25-generic #40-Ubuntu SMP Wed May 23 20:30:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

Do you think the problem is not having Ubuntu version 10.04 - Lucid ?

Any help would be appreciated.

Thanks,
John

Steve Pirk

unread,
Jun 21, 2012, 1:07:46 AM6/21/12
to nor...@gmail.com, chromium-...@chromium.org
I believe I read something about grub and the master boot record. I know even reading a Vista disk with Ubuntu Disk Manager (gparted off of a Live cd) will screw up the grub bootloader. I would take a look to see what your grub file looks like.

A quicker way to test this would be to remove the drive that has Linux installed on it. I have also heard of timeout issues with a USB boot, and it falls through to the hard disk after grub loads but before the usb device becomes fully ready to boot from.

It is also past the time I should be replying to emails like this, so if my answers do not make sense, apologies in advance ;-]




--
Chromium OS discuss mailing list: chromium-...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en

normcf

unread,
Jun 24, 2012, 4:02:10 PM6/24/12
to chromium-...@chromium.org, nor...@gmail.com
Sorry it took so long, but this is my first chance to test your theory.  I tried disconnecting all drives before booting on usb and got the same result.  I hoped you were right about the internal drive (ssd) being read first, but with all internal drives disconnected I got the same result (grub prompt). I would like to show you my grub file, but I am new to chromeos, and bootloaders in general, so it will take me a while to find out where it lives.  To me, it looks like it never reads the file, but like I said, more research is needed.  My board is an ASRock and it seems to have UEFI (according to the "setup utility") bios. Maybe I need a board that runs the older bios to boot the chromeos build from the usb drive. I will try to experiment booting from this usb on some other computers and see if it works anywhere.  Thanks, for your help.




--
Chromium OS discuss mailing list: chromium-os-discuss@chromium.org

normcf

unread,
Jun 26, 2012, 12:06:26 AM6/26/12
to chromium-...@chromium.org
OK, I tested the thumb drive on an old IBM and it booted.  It didn't find the network, but at least it started chromium.  This means the usb stick is good, but something is wrong with the bios/uefi on my newer computer that only let's it get as far as the grub loader.  I need to do some more research into how the boot sequence works to understand why this board does not work.  Board is an ASRock H67M-ITX just in case someone know this board.

Thanks,

John

Steve Pirk

unread,
Jun 26, 2012, 11:41:59 PM6/26/12
to nor...@gmail.com, chromium-...@chromium.org
Google "ASRock H67M-ITX chromeos" and see what comes up. Maybe also google "ASRock H67M-ITX usb boot" and see what you get.
Glad the image is good!

I imagine there might be some manual grub commands you could use to boot the usb kernel, but off the top of my head, I cannot think of what they might be for Chromium OS. Let me think on that a bit.




--
Chromium OS discuss mailing list: chromium-...@chromium.org

normcf

unread,
Jul 1, 2012, 12:27:31 PM7/1/12
to chromium-...@chromium.org
Hi,

I have looked at the chromium_image.bin file (hexdump) and determined that partition 12 in the GUID Partition table has the magic type for EFI SYSTEM.  I also pulled apart the image using unpack_partitions.sh and verified that bootx64.efi and grub.cfg are present in /efi/boot/.  I disconnected all the internal drives from the computer and booted to the grub> prompt.  At this point I give grub2 the ls command and see only (hd0), so this can only be the USB key.  I have tried the grub2 ls command with numerous different entries (e.g. ls (hd0,12) or ls (hd0,gpt12)) with many different partition numbers and always get "error: no such partition".  I now suspect the uefi code can read the USB key and manages to load grub2, but either grub2 cannot read the GPT, or cannot read the USB key at all.  I see there were some planned additions to grub2 regarding reading USB devices, so I need to figure out if chromuimos has tweaked the grub 1.97 to add some special boot code.  If chromuinos uses an unmodified grub2, I can try to figure out how to get the chromiumos build/image to use a newer grub2 and see if that helps.  Still a lot of looking around before I get to that point.

nobes

unread,
Jul 26, 2012, 8:16:40 PM7/26/12
to chromium-...@chromium.org
Hi Norm,

I too have a similar problem with an ASRock E350M1/USB3.  If it helps you further with your testing, on bootup, I can push F11 and choose which boot device I want.  There are two listed for the USB, UEFI and plain USB.  If I boot with the UEFI, I get the grub prompt.  If I boot with the USB option, it starts a vesa terminal but then just sits there.  I've tried with both USB3 and USB2 ports with the same results.

Hope this gets you a little further.  This is, admittedly, the first time I've ever even heard of UEFI, so I've got to do some research myself on the topic.  If you learn any more, please post and I'll do the same.

Nobes

nobes

unread,
Jul 27, 2012, 4:19:12 AM7/27/12
to chromium-...@chromium.org
Norm,
 
Made quite a bit of advancement in a caffeine/Pabst fueled hacking session.  I'm successfully booting chromium and am on the network.  I recompiled the chromiumOS install kernel with a bunch of changes and wrote a new image to usb.  Follow the instructions here: http://www.chromium.org/chromium-os/how-tos-and-troubleshooting/kernel-configuration using the amd64-generic flavor (protip: use "amd64-generic" for "board", that'll save you 20-30 mins right there =).  I haven't narrowed down the exact fixes, but probably the most notable are (Please note that the last time I knew what I was doing [very well] during a kernel recompile was the 2.2 days):
 
* E350 is an AMD K8 family processor
* Compiled in ATI Radeon support where applicable (my board has a Radeon something or other)
* compile your wired/wireless drivers as modules (still fighting with my WNA 1100, but my wired realtek works)
* enabled every USB hub + storage + scsi support I thought could be preventing the hexxeh images from booting/recognizing my USB stick as an sda (although *probably* not necessary)
* boot exclusively from USB, *NOT* UEFI.  I haven't tested from UEFI, but I suspect I'll still get the grub nonsense.
 
Once I get the kernel working as I want it, I'll scale back all the useless stuff I compiled in/modulized.  It's pretty bloated but I just wanted something working.  I took notes on everything dmesg picked up so that should help me narrow it down (just like the old days compiling on a 486....)
 
I can share my edited .config's if you'd like [chromium [[maddeningly]] splits the .config into like 7 of them that keeps you guessing which the real one is, until I'm educated it keeps me guessing anyway...]
 
If you don't compile your own images already, I'm not sure what part of the process could overwrite your .config files (if any), so it may benefit you to build a factory image first, then follow the above steps.  Follow these directions.
 
 
Unfortunately, it's not completely straight forward and the documentation seems pieced together.  If you need any specific help, feel free to Private Message me and I'll help where I can.
 
Nobes

normcf

unread,
Sep 30, 2012, 2:42:01 AM9/30/12
to chromium-...@chromium.org
OK, it's been a while of playing around and I am currently typing this on my build of chromiumOS on an asrock motherboard.  I spent a number of weekends trying different kernel option changes, but there was no change.  Essentially, pressing F11 during POST gave a choice of UEFI boot or USB.  The USB boot always gave the blank screen where I could press Alt F2 and get the screen that echos key presses.  The UEFI always entered a grub that could not see any disks.  

I noticed the grub version was quite old (not grub2), so I wondered if it could properly handle the GPT.  Outside the chroot, I downloaded the latest version of grub2 and compiled with a quite large group of options, basically everything that I thought could remotely help.  I copied this new bootx64.efi into my users home within the chroot.  Then I modified (hacked) the trunk/src/scripts/build_library/create_legacy_bootloader_templates.sh and replaced lines near line 201 with 

   sudo cp /home/myuserid/bootx64.efi ${FLAGS_to}/efi/bootbootx64.efi

Then I built everything again and generated the new USB key.  I booted, and the USB boot failed as usual, but the UEFI boot brought up the new grub2 screen, and I was able to see files on disk, but the boots still failed.  I looked at the boot commands (use e to edit them) and noticed the command tried to load from a disk that was not recognized.  I replaced the disk with (hd0,gpt3) and it booted.  I went through the initial questions about language etc, logged in and here we are.

I will make another append with the details when I get back to my dev computer.

Thanks for the help from Nobes. 
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages