Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

  1. #1
    Join Date
    Dec 2013
    Beans
    15

    13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    My grub install cannot find my grub.cfg automatically for some reason. This leaves me to do
    Code:
    configfile(hd0,gpt1)=/boot/grub/grub.cfg
    which finds my grub.cfg and boots normally.

    I mounted the USB EFI partition at /media/test and I installed grub with
    Code:
    sudo grub-install --target=x86_64-efi --efi-directory=/media/test --bootloader-id=grub --removable --recheck --debug
    This is mount
    Code:
    /dev/sdb1 on / type ext4 (rw,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/cgroup type tmpfs (rw)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    none on /sys/firmware/efi/efivars type efivarfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
    none on /sys/fs/pstore type pstore (rw)
    systemd on /sys/fs/cgroup/systemd type cgroup (rw,noexec,nosuid,nodev,none,name=systemd)
    This is the stub grub.cfg on the USB EFI partition. The full grub.cfg is on the OS partition.
    Code:
    search.fs_uuid a60289d6-c308-44f1-9ce6-85db3482ff32 root hd1,gpt1  
    set prefix=($root)/boot/grub
    configfile $prefix/grub.cfg
    This is parted
    Code:
    Model: ATA SAMSUNG MZMTD128 (scsi)
    Disk /dev/sda: 128GB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    
    
    Number  Start   End    Size    File system  Name                          Flags
     1      1049kB  420MB  419MB   ntfs         Basic data partition          hidden, diag
     2      420MB   693MB  273MB   fat32        EFI system partition          boot
     3      693MB   827MB  134MB                Microsoft reserved partition  msftres
     4      827MB   111GB  110GB   ntfs         Basic data partition          msftdata
     5      111GB   128GB  16.9GB  ntfs         Basic data partition          hidden, msftdata
    
    
    
    
    Model: SanDisk Cruzer Fit (scsi)
    Disk /dev/sdb: 8004MB
    Sector size (logical/physical): 512B/512B
    Partition Table: gpt
    
    
    Number  Start   End     Size    File system  Name  Flags
     1      1049kB  7800MB  7799MB  ext4               msftdata
     2      7800MB  7925MB  125MB   fat32        EFI   boot
    This is fstab
    Code:
     # / was on /dev/sdb1 during installation
    UUID=a60289d6-c308-44f1-9ce6-85db3482ff32 /               ext4    errors=remount-ro 0       1
    # /boot/efi was on /dev/mmcblk0p1 during installation
    UUID=245F-F0BE  /boot/efi       vfat    defaults        0       1
    The USB EFI partition is not automatically mounted. Should it be? I prefer not to touch the internal SSD at all.
    Last edited by ronniepinsky; January 6th, 2014 at 01:26 PM.

  2. #2
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    Is the UUID in fstab from the sda drive. If so I would change to the UUID of the flash drive.

    Is it otherwise booting directly from sdb/flash drive?

    With BIOS the boot drive is always hd0 as that is the drive set in BIOS. If you are setting internal first and then chainloading to flash drive that may be why you need hd1?

    Is ubuntu folder in efi partition on hard drive or flash drive?
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #3
    Join Date
    Dec 2013
    Beans
    15

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    Quote Originally Posted by oldfred View Post
    Is the UUID in fstab from the sda drive. If so I would change to the UUID of the flash drive.

    Is it otherwise booting directly from sdb/flash drive?

    With BIOS the boot drive is always hd0 as that is the drive set in BIOS. If you are setting internal first and then chainloading to flash drive that may be why you need hd1?

    Is ubuntu folder in efi partition on hard drive or flash drive?
    I'm not sure what you mean about the UUIDs. I am thinking the problem is more low level than with the fstab file.

    I have set EFI to boot from the flash drive first.

    I'm not sure what you mean about chainloading.

    I have installed grub in the recommended way as you can see by the line I included in the first post. This installs some grub files on the EFI partition and some files on the OS partition. I do not like the way this works so I tried first to install all grub files to the EFI partition but that would not complete without errors. I did not see any clear Ubuntu documentation on installing grub on EFI so I used:
    https://wiki.archlinux.org/index.php/grub

  4. #4
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    I am not sure that this shows you grub in the efi partition, but it will show lots of detail.

    Post the link to the BootInfo report that this creates. Is part of Boot-Repair:
    https://help.ubuntu.com/community/Boot-Info
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  5. #5
    Join Date
    Dec 2013
    Beans
    15

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    http://paste.ubuntu.com/6515594/

    I am not sure why it shows grub is installed to the MBR. I shouldn't be using MBR if I am using EFI. I guess I need to somehow remove grub from the MBR?

  6. #6
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    At some point you did install grub when booted in BIOS mode. While you can delete the grub in the MBR, with UEFI the MBR is not used except for one partition entry to show it is gpt, so old partition tools like fdisk will not automatically think drive is empty and offer to partition it.

    You how show grub in sdb2's efi partition. Does UEFI menu now show it? Or one time boot key?

    I think all the drive numbers are reversed, but search should override that and let you boot.
    Run this to update grub.
    sudo update-grub

    All you Ubuntu entries for grub menu show hd1 and chain to Windows shows hd0.
    With BIOS the boot drive is always hd0, not sure with UEFI.
    If booted in your install in the sdb drive the update-grub will reset everything.
    Last edited by oldfred; December 3rd, 2013 at 07:12 PM.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  7. #7
    Join Date
    Dec 2013
    Beans
    15

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    What seems to be happening is that even though I have set UEFI only mode in the UEFI setup, it finds grub installed to the MBR of the drive and boots in legacy mode. Because grub is installed in UEFI mode it cannot find the configuration for some reason.

    I just tried update-grub again with no change.

    I suppose I should dd grub away from the MBR and hope that it boots into UEFI mode next time? I am obviously hesitant to try that.

  8. #8
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    Most UEFI that auto switch or boot BIOS & UEFI, try booting from efi partition and if not found then boot from MBR. So is it still not finding efi partition?

    I do not like suggesting dd either. Change sdX to correct drive.
    Backup MBR
    https://help.ubuntu.com/community/Wi...ualBoot#Master Boot Record backup and re-replacement
    Backup the MBR e.g.
    sudo dd if=/dev/sdX of=mbr.bin bs=446 count=1
    Zero out MBR only of sdX Use 440 if windows as serial number is between 440 & 446.
    dd if=/dev/zero of=/dev/sdX bs=446 count=1
    Erase - Make double sure you have correct drive


    Powerful command, but often misused and then nicknamed "dd" Data Destroyer
    http://www.linuxquestions.org/questi...ommand-362506/
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  9. #9
    Join Date
    Dec 2013
    Beans
    15

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    I just tried zeroing the MBR with no change. I also tried changing hd1 to hd0 in the stub grub.cfg in the EFI partition with no change. Before the failed boot and being dumped to the grub console, it quickly flashes and says something about could not open efi/boot/something and says something about a fallback but I can't read it fast enough.

    Edit: I also tried changing the first set root= in the grub.cfg on the OS partition from hd1 to hd0 with no change.
    Last edited by ronniepinsky; December 4th, 2013 at 07:12 AM.

  10. #10
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 13.10 Grub install on EFI USB stick: configfile must be specified on every boot

    Is something still missing in /efi/boot? That might be the error?
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •