LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-14-2024, 06:34 AM   #1
ivery
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Rep: Reputation: 0
installed Kubuntu 24.04 on USB, grub needs USB inserted


I thought I'd try kubuntu 24.04 from USB before partitioning/installing on my Windows 11 Nuc.
I booted from a live USB and installed on a second USB drive.
All good to that point.

I hadn't realised that Grub would be installed on the system HD boot partition.
That in itself is not a problem as I can still boot Kubuntu or Windows from there.

But, Grub requires the Kubuntu USB drive to be plugged in, otherwise it doesn't display the boot menu.
Instead, it shows a grub command prompt with a message saying
"minimal bash-like editing is supported . . . ."
Grub is V2.12

I'd like to keep the grub-based boot sequence but not have the dependency on having the USB drive plugged in.
Now that I'm happy with using Kubuntu, I plan on installing it on the Nuc.

I installed grub customiser and could successfully re-order the entries.
Is it save to remove the current USB Kubuntu entries from grub using this application?
I'm fairly new to all of this so please also let me know what other important stuff I'm overlooking.
 
Old 05-14-2024, 07:08 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,564

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Did you install Kubuntu to a flash drive or an external hard drive?
Is Kubuntu an EFI install? I expect windows is, correct?
If so, did you create a separate EFI partition for Kubuntu on the drive on which you installed it during the install process?

When you say the USB needs to be plugged in to see a boot menu, which USB drive are you referring to? The one you installed to or the one you installed from? If you created an EFI partition on the USB drive to which you installed Kubuntu and installed the EFI Grub on that drive, you would simply set that drive to first boot in the BIOS for it to work.

I'd suggest booting Kubuntu to get some information by running the following commands and posting them with their output here:

Quote:
sudo fdisk -l
sudo efibootmgr -v
sudo ls /boot/efi/EFI
Quote:
Is it save to remove the current USB Kubuntu entries from grub using this application?
Which entries? You said you installed Kubuntu to a USB so you need to clarify what you are referring to. One thing Grub Customizer does is rename some files and users have had problems with it for this and other reasons. I've not used it so have no suggestion in regard to that software.
 
Old 05-14-2024, 07:58 AM   #3
ivery
LQ Newbie
 
Registered: Jun 2004
Posts: 7

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yancek View Post
Did you install Kubuntu to a flash drive or an external hard drive?
Is Kubuntu an EFI install? I expect windows is, correct?
If so, did you create a separate EFI partition for Kubuntu on the drive on which you installed it during the install process?

When you say the USB needs to be plugged in to see a boot menu, which USB drive are you referring to? The one you installed to or the one you installed from? If you created an EFI partition on the USB drive to which you installed Kubuntu and installed the EFI Grub on that drive, you would simply set that drive to first boot in the BIOS for it to work.

I'd suggest booting Kubuntu to get some information by running the following commands and posting them with their output here:

Which entries? You said you installed Kubuntu to a USB so you need to clarify what you are referring to. One thing Grub Customizer does is rename some files and users have had problems with it for this and other reasons. I've not used it so have no suggestion in regard to that software.
Thanks yancek for your response, and sorry for my lack of specifics.
I installed Kubuntu to a 128GB sandisk USB (3.2 gen1) flash drive.
I believe that it is EFI install, but not 100% sure.
I did not create any partitions on the target drive when installing.
It is the target USB flash drive that needs to be plugged in at boot time, i.e. the one that Kubuntu was installed on to.
The entries I was referring to are the ones that are displayed in the Grub boot menu (when booting with the Kubuntu flash drive plugged in).

Below is the output of the commands that you suggested:

sudo fdisk -l
Disk /dev/loop0: 74.24 MiB, 77844480 bytes, 152040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 4 KiB, 4096 bytes, 8 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 269.63 MiB, 282722304 bytes, 552192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 10.72 MiB, 11239424 bytes, 21952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop4: 505.09 MiB, 529625088 bytes, 1034424 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop5: 91.69 MiB, 96141312 bytes, 187776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop6: 443.99 MiB, 465559552 bytes, 909296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop7: 437.62 MiB, 458878976 bytes, 896248 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/nvme0n1: 931.51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: CT1000P2SSD8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: EE99054E-C223-44AD-94DD-A186711A576D

Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 206847 204800 100M EFI System
/dev/nvme0n1p2 206848 239615 32768 16M Microsoft reserved
/dev/nvme0n1p3 239616 417925119 417685504 199.2G Microsoft basic data
/dev/nvme0n1p4 417925120 419667967 1742848 851M Windows recovery environment
/dev/nvme0n1p5 419670016 1952481279 1532811264 730.9G Microsoft basic data
/dev/nvme0n1p6 1952481280 1953521663 1040384 508M Windows recovery environment


Disk /dev/sda: 114.6 GiB, 123048296448 bytes, 240328704 sectors
Disk model: SanDisk 3.2Gen1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x009b4e7b

Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 240316334 240314287 114.6G 83 Linux


Disk /dev/loop8: 99.58 MiB, 104415232 bytes, 203936 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop9: 38.73 MiB, 40615936 bytes, 79328 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop10: 137.29 MiB, 143962112 bytes, 281176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

sudo efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0000,0005,0002,0003
Boot0000* Windows Boot Manager HD(1,GPT,8cfcf72d-6ae4-4296-a368-f89d3ba3a273,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)57494e444f5753000100000088000000780000004200430044004f0042004a 004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061 006300630031002d006600330032006200330034003400640034003700390035007d0000002c000100000010000000040000 007fff0400
dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 03 00 00 00 00 00 2d f7 fc 8c e4 6a 96 42 a3 68 f8 9d 3b a3 a2 73 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 49 00 43 00 52 00 4f 00 53 00 4f 00 46 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 5c 00 42 00 4f 00 4f 00 54 00 4d 00 47 00 46 00 57 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 2c 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00
Boot0001* Ubuntu HD(1,GPT,8cfcf72d-6ae4-4296-a368-f89d3ba3a273,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 20 03 00 00 00 00 00 2d f7 fc 8c e4 6a 96 42 a3 68 f8 9d 3b a3 a2 73 02 02 / 04 04 34 00 5c 00 45 00 46 00 49 00 5c 00 55 00 42 00 55 00 4e 00 54 00 55 00 5c 00 53 00 48 00 49 00 4d 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00
Boot0002* UEFI: PXE IPv4 Intel(R) Ethernet Controller (3) I225-V PciRoot(0x0)/Pci(0x1c,0x6)/Pci(0x0,0x0)/MAC(1c697aa7c1a5,1)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 06 1c / 01 01 06 00 00 00 / 03 0b 25 00 1c 69 7a a7 c1 a5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
data: 00 00 42 4f
Boot0003* UEFI: PXE IPv6 Intel(R) Ethernet Controller (3) I225-V PciRoot(0x0)/Pci(0x1c,0x6)/Pci(0x0,0x0)/MAC(1c697aa7c1a5,1)/IPv6([::]:<->[::]:,0,0)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 06 1c / 01 01 06 00 00 00 / 03 0b 25 00 1c 69 7a a7 c1 a5 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
data: 00 00 42 4f
Boot0005* UEFI: Generic USB SD Reader 1.00, Partition 1 PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/USB(1,0)/HD(1,MBR,0x0,0x800,0xecd800)0000424f
dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 14 / 03 05 06 00 01 00 / 03 05 06 00 01 00 / 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 d8 ec 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 / 7f ff 04 00
data: 00 00 42 4f

sudo ls /boot/efi/EFI
Boot Microsoft ubuntu
 
Old 05-21-2024, 06:41 AM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,388

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
The problem is the ubuntu bootloader is installed to the internal drive efi partition and there is no efi partition on the usb.
Quote:
I did not create any partitions on the target drive when installing.
What partition method did you use during installation: replace partition, erase disk, manual partitioning?

Last edited by colorpurple21859; 05-21-2024 at 12:57 PM.
 
Old 05-21-2024, 03:14 PM   #5
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,742

Rep: Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982Reputation: 7982
Quote:
Originally Posted by hunterm2 View Post
It sounds like the GRUB bootloader is installed on the USB drive rather than the internal hard drive. This can happen if the installation process was not configured properly. To fix this issue and make your system bootable without the USB drive inserted, you'll need to reinstall GRUB on the internal hard drive. Here's a general outline of the steps you can take:

Boot from Live USB: Insert your Kubuntu Live USB and boot your computer from it. <**SPAM LINK REMOVED**>
Mount the Internal Hard Drive: Open a terminal and use commands like lsblk or fdisk -l to identify the device name of your internal hard drive (e.g., /dev/sda).

Chroot into the Installed System: Mount your Kubuntu root partition (e.g., /dev/sda1) and then chroot into it:
Reinstall GRUB: Once you're inside the chroot environment, reinstall GRUB to the internal hard drive:

bash
Copy code
grub-install /dev/sda
update-grub
Exit Chroot and Reboot: After reinstalling GRUB, exit the chroot environment and unmount the partitions:

bash
Copy code
exit
sudo umount /mnt/sys
sudo umount /mnt/proc
sudo umount /mnt/dev
sudo umount /mnt
Remove Live USB: Remove the Live USB and reboot your computer. It should now boot directly from the internal hard drive without needing the USB inserted.

These steps should help resolve the issue with GRUB being dependent on the USB drive. Make sure to replace /dev/sda1 with the correct partition for your Kubuntu installation. If you're unsure about any step, feel free to ask for clarification!
No, we're not going to ask a spammer for clarification on anything; reported, and OP, please don't heed the advice given in this particular post.
 
  


Reply

Tags
boot, grub, usb



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] centos 6 needs usb keydrive inserted in machine all the time zeshanuk CentOS 1 03-30-2015 08:59 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] installed kubuntu desktop. Now computer grub and all IS kubuntu swright007 Linux - Desktop 8 10-25-2011 04:58 PM
USB pendrive opens only after booted w USB inserted mwaxenberg Linux - Hardware 2 04-17-2011 08:10 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration