bugGNU GRUB - Bugs: bug #43062, boot-directory not in core.img

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #43062: boot-directory not in core.img

Submitter:  Jay Michael <jmichael>
Submitted:  Sun 24 Aug 2014 05:18:18 AM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name:  Jay Michael
Open/Closed:  Closed Release:  2.02~beta1
Release:  Reproducibility:  Every Time
Planned Release:  None

Jump to the original submission

Fri 23 Jan 2015 09:41:12 AM UTC, comment #9: 

No and no. Bootsector is boot.img. And it prints "GRUB" very early unless you use ubuntu version (in that case revert to upstream or ask support at ubuntu forums). The message about unbootable disk is not coming from GRUB but most likely from BIOS itself. If you see string "GRUB" then at least a bootsector is loaded and we may be able to adjust GRUB, if you don't, then there is nothing GRUB can do.

Vladimir Serbinenko <phcoder>
Group administrator
Fri 23 Jan 2015 06:26:06 AM UTC, comment #8: 

I'm sure my disk is using 4K sectors.

My BIOS seems to consider the Western Digital disk to be (potentially) bootable -- the drive is offered as one of the options when booting non-secure, non-UEFI.

I understand that the current code written to the boot sector, and the current code in core.img, may not work when the disk has 4K sectors.  I'm mildly interested in the possibility that the code could be changed to work when sectors are 4K.

Can anyone tell me:

Is the core.img that's copied to sector 1 of the boot device the same as the core.img that ends up in ${boot-directory}/grub/i386-pc?

Should I be able to find the string "/boot/grub" in core.img?

Jay Michael <jmichael>
Thu 22 Jan 2015 08:24:56 PM UTC, comment #7: 

Most likely your disk uses 4K sectors. I haven't found a single BIOS which will consider such a disk bootable. So not a GRUB problem as GRUB can't do anything about this.

Vladimir Serbinenko <phcoder>
Group administrator
Fri 05 Dec 2014 06:54:09 PM UTC, comment #6: 

core.img is compressed; BIS is using heuristic to find start of compressed data.

Andrei Borzenkov <arvidjaar>
Group Member
Mon 24 Nov 2014 03:11:31 AM UTC, comment #5: 

If I do a * grub-install --boot-directory=${VDOS}/boot /dev/sdc *, is the core.img that's copied to sector 1 of /dev/sdc the same as the core.img that ends up in * ${VDOS}/boot/grub/i386-pc * ?

Should I be able to find the string * "/boot/grub" * in core.img ?

Jay Michael <jmichael>
Fri 21 Nov 2014 06:42:41 AM UTC, comment #4: 

/dev/sdc is using 4K native sector size which is likely why your BISO does not recognize it as boot device and why Seagate says it is unbootable. There is not much we can do from grub side here.

BIS had issues parsing core.img, but it does not seem to be the case here. It would still be good to fix it with proper 4K support, but it is offtopic here.

Andrei Borzenkov <arvidjaar>
Group Member
Thu 20 Nov 2014 04:36:47 AM UTC, comment #3: 

     What was supposed to change?

     I've lost track of where I was and what I was doing.  I believe I reported the "bug" while trying to get a handle on doing a BIOS boot from and external drive that uses 4k sectors.  Since then, I have managed to get a 64-bit Ubuntu to boot in EFI mode from that drive.  I would now hesitate to fling grub-install at that drive, for fear of damaging something.

     When I re-ran the old bootinfoscript to confirm the old results before running the new bootinfoscript, I got different results:  Instead of

core.img is at this location and looks in partition 112 for .

I get

, but core.img can not be found at this location.

I don't know when or why in installing Ubuntu in EFI boot mode it would have wiped out the BIOS-boot bits.

     Another change to the BIS seems to have been how picky it is about which version of AWK it uses.  The new script expressed dissatisfaction with the version of mawk in my Live-USB environment -- the old version seems to fall back on a BusyBox version with just a little grumbling.  I created a symbolic link from /usr/bin/gawk to mawk to get the new script to run -- I assume that has nothing to do with the differences I'm seeing.

     Let me know if you want me to follow up on anything.

(file #32482, file #32483)

Jay Michael <jmichael>
Tue 18 Nov 2014 02:02:08 PM UTC, comment #2: 

BIS from sourceforge has problems with new grub. Try one from https://github.com/arvidjaar/bootinfoscript/blob/master/bootinfoscript

Andrei Borzenkov <arvidjaar>
Group Member
Sun 24 Aug 2014 09:28:12 PM UTC, comment #1: 

When BIOS tries to boot, I get

Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key


Jay Michael <jmichael>
Sun 24 Aug 2014 05:18:18 AM UTC, original submission:  

     The boot-directory doesn't seem to be getting into the core.img produced by running grub-install.

     I'm using an Ubuntu 14.04 Live CD (DVD), or Live USB, on a Dell 2330 All-in-One.  Eventually, I want to install Linux to an external USB drive.  Right now, I'm just trying to make sure that I can boot from the drive, a Western Digital 3TB MyBook -- my first external drive, a Seagate 2TB Expansion Desktop, seemed to be completely unbootable (as in never offered as an option in the list of devices from which to boot in BIOS setup, and as in Seagate says it "wasn't designed to be used as a boot device").

     The first partition on the WD drive is a 2GB FAT16, label VDOS.  I run
          grub-install --boot-directory=${VDOS}/boot /dev/sdc
and get a /boot/grub on the VDOS partition.
     When I boot and go to the BIOS boot options and select the WD drive, I get a message telling me to insert the correct disk[?] and hit any key, or reboot and pick another device.  It's the same message I get when I tried booting before I tried to put a boot loader on the drive.  It does not seem to be any kind of GRUB prompt.

     When I run bootinfoscript, the Boot Info Summary says:

=> Grub2 (v1.99) is installed in the MBR of /dev/sdc and looks at sector 1 of
    the same hard drive for core.img. core.img is at this location and looks
    in partition 112 for .


     I've seized on this as the next problem I need to fix.  I don't know if bootinfoscript can be trusted -- it seems to be reporting GRUB 1.99, when I'm using 2.02~beta2-9.

     I saw the bug report about a disk with a 4K block size, but that report said there was a grub error message -- I get none.

Attachments:

  • grub-install.log

output of grub-install --debug --force --no-floppy --recheck --boot-directory=/media/ubuntu/VDOS/boot /dev/sdc 2>&1

  • grub-install.bisresults

RESULTS.txt from bootinfoscript

  • core.img from ${VDOS}/boot/grub/i386-pc


Jay Michael <jmichael>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #32482:  bis-061-results.txt added by jmichael (40KiB - text/plain)
file #31943:  grub-install.log added by jmichael (96KiB - text/x-log)
file #31944:  core.img added by jmichael (24KiB - application/x-raw-disk-image)
file #31945:  grub-install.bisresults added by jmichael (24KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by jmichael (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-22 phcoder StatusNone Invalid
        Open/ClosedOpen Closed
    2014-11-20 jmichael Attached File- Added bis-061-results.txt, #32482
        Attached File- Added bis-20140825-results.txt, #32483
    2014-08-24 jmichael Attached File- Added grub-install.log, #31943
        Attached File- Added core.img, #31944
        Attached File- Added grub-install.bisresults, #31945

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code