Page 51 of 54 FirstFirst ... 414950515253 ... LastLast
Results 501 to 510 of 539

Thread: How to have a custom Grub2 menu that is maintenance free

  1. #501
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by oldfred View Post
    If you look at this the standard grub-install has the many option parameters.
    man grub-install
    info grub-install.

    I have in my notes many versions of grub-install with different parameters, but most are example of just installing grub to a flash drive, so I can just boot ISO, creating my own grub.cfg to loopmount the ISOs.
    Thanks! I'll have to look at that.
    I tried:
    Code:
    menuentry "Ubuntu 16.04 Xenial (on /dev/sdc7)" {
        set root=(hd2,gpt7)
            linux /vmlinuz root=/dev/sdc7 ro quiet splash
            initrd /initrd.img
    }
    And
    Code:
    menuentry "Ubuntu 18.04 Bionic (on /dev/sdc8)" {
        set root=(hd2,gpt8)
            linux /vmlinuz root=/dev/sdc8 ro quiet splash
            initrd /initrd.img
    }
    Code:
    cavsfan@cavsfan-Xenial-Xerus:~$ sudo blkid | grep sdc
    [sudo] password for cavsfan: 
    /dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="3c1b6d6f-8a24-43da-b595-8c304ceee48d"
    /dev/sdc3: UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="345c85f4-bce7-4bc7-bbe0-db03eb319cad"
    /dev/sdc4: UUID="701AE4631AE427B4" TYPE="ntfs" PARTUUID="1e337754-b45d-45a5-a971-b8cdcae8a002"
    /dev/sdc5: UUID="ad60d57b-f7b9-4a83-8ce0-74382d2e3281" TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="3a259867-656d-41ed-9931-cf15a3bd0148"
    /dev/sdc6: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="5312b771-0835-4957-80a6-9a8a7107f24a"
    /dev/sdc7: LABEL="Xenial" UUID="4c61d35a-0e87-463e-b98b-f196bb4b8082" TYPE="ext4" PARTLABEL="Xenial_Xerus" PARTUUID="57075798-adb7-4590-ae23-6a75d976c3c1"
    /dev/sdc8: LABEL="Bionic" UUID="21cf477b-a314-4691-85f6-256e6209d5d9" TYPE="ext4" PARTLABEL="Bionic_Beaver" PARTUUID="c4e0fdc9-7eac-4661-a7c6-c5a00c9a46fc"
    /dev/sdc9: LABEL="Spare" UUID="f716b510-b16b-4fd0-b89f-ea86e90c2533" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="ac30cd57-1b77-4924-ba8c-7bc94c8f961b"
    /dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="49992d5b-79cd-4934-a12f-11782bb345bd"

    I still got the error message:
    error: disk 'hd2.gpt7' not found
    error: you need to load the kernel first
    press any key to continue...
    error: disk 'hd2.gpt8' not found
    error: you need to load the kernel first
    press any key to continue...
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Creating a Custom Maintenance Free GRUB2 Screen on Arch Linux
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series

  2. #502
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    When you look at drives in grub, is hd2 the correct drive?
    When I have flash drive plugged in my hd0 becomes hd1, and I just edit in grub when it errors like that.

    The menu entry looks correct, but error is with a period, not comma? hd2.gpt8'
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #503
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by oldfred View Post
    When you look at drives in grub, is hd2 the correct drive?
    When I have flash drive plugged in my hd0 becomes hd1, and I just edit in grub when it errors like that.

    The menu entry looks correct, but error is with a period, not comma? hd2.gpt8'
    That was probably just me typing because I could not take a screenshot.

    I'll try it again tomorrow morning. I had to re-install Xubuntu 16.04 because my previous install became worthless for some reason. I have spent all day on that.
    Probably something I did but, I don't know, figured I didn't have much in it but I am formatting my USB sticks to ext4 instead of fat32. I've had numerous problems with windows line feeds at the end of some files.
    Only VI shows the ^M (windows line end).

    This is looking much better and of course I had to change the UUID for it in my current "custom" grub.
    So, I'm really hoping that I can do the boot line like I used to.
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Creating a Custom Maintenance Free GRUB2 Screen on Arch Linux
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series

  4. #504
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    I only use ext4 on my full install or data partitions on flash drives.
    All UEFI bootable installers must have a FAT32 formatted with boot flag to be the ESP. Normal installer is also the ESP as it has /EFI/Boot/bootx64.efi for UEFI boot, but also has syslinux for BIOS boot.

    Have not used Windows files for anything for years.
    I use nano or gedit. Starting to use medit also.

    My install to a SSD takes 10 Min. Only full installs to a flash drive take a while. And I have one flash drive that was extremely slow. Still experimenting with that one. Not sure if flash drive, 18.04, or some other issue.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  5. #505
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: How to have a custom Grub2 menu that is maintenance free

    I just thought I'd format it as ext4 to copy stuff from linux to linux.

    But, I added these 2 entries to 40_custom just to see if it worked.
    Code:
    #!/bin/sh
    exec tail -n +3 $0
    # This file provides an easy way to add custom menu entries.  Simply type the
    # menu entries you want to add after this comment.  Be careful not to change
    # the 'exec tail' line above.
    menuentry "Ubuntu 16.04 Xenial (on /dev/sdc7)" {
        set root=(hd2,gpt7)
            linux /vmlinuz root=/dev/sdc7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Ubuntu 18.04 Bionic (on /dev/sdc8)" {
        set root=(hd2,gpt8)
            linux /vmlinuz root=/dev/sdc8 ro quiet splash
            initrd /initrd.img
    }
    I got this different error and I took a picture to be sure what it said.
    error: disk 'hd2,gpt7' not found.
    alloc magic is broken at 0xc43e2300: c432ab40
    Aborted. Press any key to exit
    I then pressed enter I believe and the grub on Xenial (where it is currently installed since installation yesterday).
    Which took me back to the grub screen and I selected to option to go into Bionic and got a similar error:
    error: disk 'hd2,gpt8' not found.
    alloc magic is broken at 0x907c4300: 9070cb40
    Aborted. Press any key to exit
    I do not know where those numbers after "at" are coming from.
    Here again are my partitions with blkid:
    Code:
    cavsfan@cavsfan-Xenial-Xerus:~$ sudo blkid | grep sdc
    [sudo] password for cavsfan: 
    /dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="3c1b6d6f-8a24-43da-b595-8c304ceee48d"
    /dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="49992d5b-79cd-4934-a12f-11782bb345bd"
    /dev/sdc3: UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="345c85f4-bce7-4bc7-bbe0-db03eb319cad"
    /dev/sdc4: UUID="701AE4631AE427B4" TYPE="ntfs" PARTUUID="1e337754-b45d-45a5-a971-b8cdcae8a002"
    /dev/sdc5: UUID="ad60d57b-f7b9-4a83-8ce0-74382d2e3281" TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="3a259867-656d-41ed-9931-cf15a3bd0148"
    /dev/sdc6: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="5312b771-0835-4957-80a6-9a8a7107f24a"
    /dev/sdc7: LABEL="Xenial" UUID="4c61d35a-0e87-463e-b98b-f196bb4b8082" TYPE="ext4" PARTLABEL="Xenial_Xerus" PARTUUID="57075798-adb7-4590-ae23-6a75d976c3c1"
    /dev/sdc8: LABEL="Bionic" UUID="21cf477b-a314-4691-85f6-256e6209d5d9" TYPE="ext4" PARTLABEL="Bionic_Beaver" PARTUUID="c4e0fdc9-7eac-4661-a7c6-c5a00c9a46fc"
    /dev/sdc9: LABEL="Spare" UUID="f716b510-b16b-4fd0-b89f-ea86e90c2533" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="ac30cd57-1b77-4924-ba8c-7bc94c8f961b"
    This time I press escape and am looking at the grub screen on Arch Linux!

    So, I am lost.
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Creating a Custom Maintenance Free GRUB2 Screen on Arch Linux
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series

  6. #506
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    The address is a hex address of the error.

    A search says it could be memory errors, grub errors, or you have one install as 32 bit and one 64 bit?
    I have had totally different versions of grub2 from Ubuntu, but not sure then if you are using versions of grub2 from other distributions and there may just be enough difference to cause issues?
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  7. #507
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by oldfred View Post
    The address is a hex address of the error.

    A search says it could be memory errors, grub errors, or you have one install as 32 bit and one 64 bit?
    I have had totally different versions of grub2 from Ubuntu, but not sure then if you are using versions of grub2 from other distributions and there may just be enough difference to cause issues?
    I make sure I download the 64 bit ISO and everything on my computers have always been 64 bit.
    Grub version on Ubuntu (the ones being currently maintained) are mostly the same with a few exceptions (that this semi-knowledgeable person can see) but, then there is Arch Linux...

    It is different. Like I mentioned Ubuntu does not add the /initramfs-linux.img to the bottom boot line like it should.
    This is what it puts:
    Code:
    initrd    /intel-ucode.img
    Which will put you in grub rescue.
    This is what is required:
    Code:
    initrd    /intel-ucode.img /initramfs-linux.img
    When grub is installed on Ubuntu I can only use the fallback kernel, using this:
    Code:
    initrd    /initramfs-linux-fallback.img
    Although it boots Xenial, where it is installed without a single message, error or info.

    I installed grub back on Arch and just the default seems to work OK. Windows 10 is the 3rd option so, I have that as default.
    The picture, font colors, and default option are all in /etc/default/grub. There is no /etc/grub.d/05_debian_theme file in Arch.
    I purge the lts kernel as I didn't realize that it becomes the default option. I've never had a need for it anyway.

    /etc/grub.d/30_os-prober is only there if you explicitly install it.
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Creating a Custom Maintenance Free GRUB2 Screen on Arch Linux
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series

  8. #508
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Just did another 18.04 install to flash drive. First one was extremely slow. Not sure if flash drive or because not final version.
    But new install overwrote (as expected) my /EFI/ubuntu in sda, my main working install which I now set to 18.04 (may not be permanent).
    But my 18.04, I had changed grub_distributor to my name.
    #GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_DISTRIBUTOR='Bionic_18_04'

    Then when I did this, it created a new UEFI boot entry, and changed menu entries in grub.
    sudo grub-install /dev/sda
    Boot0004* bionic_18_04 HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\BIONIC_18_04\SHIMX64.EFI)
    But even though /EFI/bionic_18_04 folder had its own grub.cfg, it used /boot/efi/EFI/ubuntu/grub.cfg # or entry from flash drive.
    So I had to do this:
    sudo grub-install --bootloader-id ubuntu /dev/sda #and set that as default boot in UEFI.

    I guess I am now so used to speed of SSD, that flash drive seems slow. But this install a lot quicker than my first flash drive install. Still not sure why.
    I only have flash drive install for emergency use.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #509
    Join Date
    Aug 2009
    Beans
    Hidden!

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by oldfred View Post
    Just did another 18.04 install to flash drive. First one was extremely slow. Not sure if flash drive or because not final version.
    But new install overwrote (as expected) my /EFI/ubuntu in sda, my main working install which I now set to 18.04 (may not be permanent).
    But my 18.04, I had changed grub_distributor to my name.
    #GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_DISTRIBUTOR='Bionic_18_04'

    Then when I did this, it created a new UEFI boot entry, and changed menu entries in grub.
    sudo grub-install /dev/sda
    Boot0004* bionic_18_04 HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\BIONIC_18_04\SHIMX64.EFI)
    But even though /EFI/bionic_18_04 folder had its own grub.cfg, it used /boot/efi/EFI/ubuntu/grub.cfg # or entry from flash drive.
    So I had to do this:
    sudo grub-install --bootloader-id ubuntu /dev/sda #and set that as default boot in UEFI.

    I guess I am now so used to speed of SSD, that flash drive seems slow. But this install a lot quicker than my first flash drive install. Still not sure why.
    I only have flash drive install for emergency use.
    I'm not sure I'm following you. You installed 18.04 from a USB flash drive, Then changed /etc/default/grub like this?
    Code:
    #GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_DISTRIBUTOR='Bionic_18_04'
    Then you entered sudo grub-install /dev/sda and it gave the output of:
    Code:
    Boot0004* bionic_18_04 HD(1,GPT,c371fe4e-a6db-4c46-b056-a4eea609f81d,0x800,0x639c000)/File(\EFI\BIONIC_18_04\SHIMX64.EFI)
    But, that did not work correctly? Because it put the grub in \EFI\BIONIC_18_04\ ?
    So, then you did the
    Code:
    sudo grub-install --bootloader-id ubuntu /dev/sda
    because the default grub was in /EFI/bionic_18_04 ?

    And that fixed the problem?

    This EFI stuff is not getting much clearer to me. I have yet to have a custom entry work and I doubt I could incorporate EFI grub customization with the legacy MBR grub that I am familiar with in this wiki.
    Creating a Custom Maintenance Free GRUB2 Screen Community Wiki
    Creating a Custom Maintenance Free GRUB2 Screen on Arch Linux
    Intel Core i7-4770K, NVIDIA GeForce GTX 980 Ti, Mobo: ASUSTeK, model: Z87-K, Mem: 16GB, Sound Blaster Audigy Series

  10. #510
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    I wanted a unique entry in UEFI and boot menu description.
    And the install of grub created both.
    But grub is somewhere hard coded to only use /EFI/ubuntu/grub.cfg in the ESP to find the full install. Or it does not work.
    There now is a grub.cfg in my /EFI/bionic_18_04 folder, but it is not used. Before it did not even have a grub.cfg.

    So I did another grub install just to see if using the ubuntu description would work, and it did. More because you asked if grub-install worked.
    But I normally just manually edit /EFI/ubuntu/grub.cfg to have correct UUID & drive/partition of my default boot.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Page 51 of 54 FirstFirst ... 414950515253 ... LastLast

Tags for this Thread

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
  •