Fedora 39 boot configuration to start directly from the hard disk without depending on the USB

How did you remove it? A new empty gpt partition table created then installation of fedora should have wiped out all remenants of windows.

Also, since you state that you seem to require a usb to boot, what is the boot order set in bios?
To boot from the hdd that device should be first. If the usb is first then having a bootable usb device plugged in will always boot the usb device and not the hard disk.

What is this?

In the end it got installed with WSL from windows … and he removed Windows 11 … so it might is this the problem?

I formatted the hard drive that Windows was on. I thought that if I installed Fedora the files from the previous OS would still remain and that’s why I did it, I wanted it to be empty so that there is enough space available to install fedora.

I checked the boot order and it is currently this:

UEFI Boot Sources
USB Hard Drive
USB Floppy/CD
ATAPI CD/DVD Drive

Arrival Boot Sources
USB Floppy/CD
Hard Drive
SATA0
Generic Flash Disk 8.07
ATAPI CD/DVD Drive

While Jeff usually knows more than I do, I think that is all barking up the wrong tree. What you did to remove Windows 11 was fine and the problem is very unlikely to be in the BIOS boot data (and if it were, that view of it isn’t specific enough).

I hope my post above (about sda1 the EFI partition being bad) didn’t get overlooked in the volume of side topics.

But there may be another reason (not rebooting too soon as I guessed above) for that step of the original install (setting up the efi partition) to have failed.

So you might have the same problem again if you just redo the whole install waiting longer before reboot. So you may need the instructions for “Fedora repair efi” that you can find several version of with a google search. Unfortunately, I didn’t spot any of those that are easy for a beginner to follow.

Please explain the “formatted the hard drive” part of that.
Windows, by default, seems to have 4 partitions with a normal efi boot installation. Formatting only works on a file system (one partition) so I do not understand what you did.

Did you select to wipe out the existing system and use the entire drive from within the fedora installer? Or did you do something else? Details are important.

If I want an empty drive when it already has an os installed I usually use either gdisk or gparted and create a new empty gpt partition table on the drive then proceed with the installation. The installer does the same when the user selects to replace the current os by wiping the drive and using the entire drive for the installation.

That is the boot device generated by Rufus. It is mounted on /run/initramfs/live.

1 Like

I overlooked that detail (the size of sda1) earlier.

So I guess Jeff is correct that something seems to have gone wrong while deleting Windows. Maybe while or after deleting windows that tiny partition was left where the efi should be. Then Anaconda was explicitly told to use that as its efi (rather than its default behavior of creating a second efi when the first one is bad), but then it failed to use it because it is too small.

So the easiest path forward is to delete all three partitions and rerun Anaconda and let it create a sane EFI partition.

How about getting the listing from efibootmgr. It is also nice to know if the USB device was created for BIOS boot or for UEFI boot. With Rufus, you have to make that choice.

1 Like

This could also just be checked, if he opens gparted and sets the boot flag for the sdb1 disk.

An other thing is the vfat partition it is not a common boot partition, right?

Also make a proper boot medium with the Fedora Media Writer. Fedora needs to boot allready the live system as an EFI, otherwise it will create a bios/legacy install.

When booted in the live USB of Fedora, you can give the command
ls /sys/firmware/efi

If that lists contents, you are in UEFI mode. If it says the directory doesn’t exist, then you are in legacy mode.

If you are in legacy mode, you most likely do want to change to UEFI mode, which is most simply done by recreating the USB media as suggested:

That is a lot of trouble (from the current situation of having only that live USB of Fedora bootable. So check whether you need to (with the command I gave above) and even then, there are other solutions you might find if you don’t have a second spare USB stick (I wouldn’t risk overwriting the current one if it is your only bootable Fedora).

If the BIOS had booted the USB in legacy mode (because of some compatibility setting) and then the new install was legacy, why won’t the BIOS boot the new install in legacy. That set of things is possible, but doesn’t feel likely.

Some USBs are bootable either UEFI, or legacy. I don’t know if a Fedora install USB is. The BIOS ought to choose UEFI if set to auto select legacy vs. UEFI. But some auto select legacy. So if the above test says the USB is booted in legacy mode, maybe go into the BIOS and set it to boot UEFI only, then see whether/how that USB boots (obviously if nothing then boots, temporarily set the BIOS back to being able to boot legacy).

The fedora workstation iso image is hybrid and can be booted either legacy or uefi. If the bios is set to CSM mode the user must select which boot mode to use for booting, (and thus install). If the bios is set to disable csm mode then the machine will only boot in uefi mode and there is never confusion. Note that @vekruse noted in his post above that rufus requires the user to select the boot mode when creating the usb device. I think rufus has the option to write the usb in iso mode (copy the image exactly) or do something different. I don’t remember exactly as it has been quite some time since I played with rufus.

I always use fedora mediawriter or dd for burning the iso onto the usb.

The system booted properly from the USB stick, and the system was installed, probably also properly. It just doesn’t boot. And using MediaWriter instead of Rufus would not change a thing either way.

We still need to output from efibootmgr as that gives important information about the UEFI boot configuration. The list given in message 32 doesn’t give enough information.

Running efibootmgr

BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0002
Boot0001* Fedora        HD(1,GPT,4c4142d9-4e81-476a-93b5-dbdad8bb5f5a,0x800,0x400000)/File(\EFI\FEDORA\SHIMX64.EFI)0000424f
Boot0002* memtest       HD(1,GPT,4c4142d9-4e81-476a-93b5-dbdad8bb5f5a,0x800,0x400000)/File(\EFI\MEMTST\MEMTEST64.EFI)

Running lsblk -p -o+PARTUUID

NAME             MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS                     PARTUUID
/dev/nvme0n1     259:0    0 476,9G  0 disk                                 
├─/dev/nvme0n1p1 259:1    0     2G  0 part /boot/efi                       4c4142d9-4e81-476a-93b5-dbdad8bb5f5a
├─/dev/nvme0n1p2 259:2    0 320,2G  0 part /home                           9fce4793-957e-41b2-99ec-c2c541f34d80
├─/dev/nvme0n1p3 259:3    0 137,8G  0 part /var/lib/snapd/snap             1396d646-58d0-4618-8592-93a1a2857577
│                                          /                               
└─/dev/nvme0n1p4 259:4    0    16G  0 part [SWAP]                          e27acb57-ac9a-42b2-b800-108ae60c3f62

Shows booting from 4c4142d9-4e81-476a-93b5-dbdad8bb5f5a as the boot device and partition.

1 Like

The efi partition is always vfat by default

Correct, fedora will install in whichever mode it is booted. If booted legacy it will install legacy and if booted uefi it will install uefi.

This is from a VM installed in uefi mode

$ efibootmgr
BootCurrent: 0003
Timeout: 0 seconds
BootOrder: 0003,0002,0000
Boot0000* UiApp	FvVol(7cb8bdc9-f8eb-4f34-aaea-3ee4af6516a1)/FvFile(462caa21-7614-4503-836e-8ab6f4662331)
Boot0002* UEFI Misc Device	PciRoot(0x0)/Pci(0x2,0x3)/Pci(0x0,0x0){auto_created_boot_option}
Boot0003* Fedora	HD(1,GPT,1e00914a-647e-4fd6-a307-daa930695cb9,0x800,0x12c000)/File(\EFI\fedora\shimx64.efi)



$ lsblk -fp
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
/dev/sr0                                                                            
/dev/zram0                                                                          [SWAP]
/dev/vda                                                                            
├─/dev/vda1 vfat   FAT32        1879-5F54                             581.4M     3% /boot/efi
├─/dev/vda2 ext4   1.0          cc7a0826-6f46-4016-9b5d-d4a0fe52938e    615M    30% /boot
└─/dev/vda3 btrfs        fedora cc672c16-525d-4da7-89ba-9ce023e77b31   43.1G    10% /home

and this is from a vm installed in legacy mode

$ efibootmgr
EFI variables are not supported on this system.

$ lsblk -fp
NAME        FSTYPE FSVER LABEL  UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
/dev/sr0                                                                            
/dev/zram0                                                                          [SWAP]
/dev/vda                                                                            
├─/dev/vda1                                                                         
├─/dev/vda2 ext4   1.0          cdee63c0-8b0c-4883-b1bf-ade8718f5610    643M    27% /boot
└─/dev/vda3 btrfs        fedora 08ee2868-c517-4f2c-be93-c1faf7850a28   13.1G    27% /home
                                                                                    /

I (and maybe most of us) had forgotten what an install in legacy mode looked like.

So I believe you have confirmed that @gejxjhdbes had installed in legacy mode (notice sda1 in the information he posted).

I still don’t see any explanation of why his BIOS is willing to boot the USB in legacy mode but not willing to boot the SATA in legacy mode. But even with such an explanation, the best path forward is to reinstall in UEFI mode.

Based on what you said in other posts, I think we should expect that the original USB he used could boot in UEFI mode, so he doesn’t need to create new install media for Fedora.

I’ve never seen that behavior, but BIOS’s vary. In my experience CSM mode causes the BIOS to just decide (not ask) how to boot hybrid media. Different BIOSs make different decisions. I needed to turn off CSM in the BIOS (meaning legacy media can’t boot at all unless I turn it back on) in order to get my Easy2boot USB into UEFI mode on some machines. But on others the same media booted into UEFI despite CSM being enabled (and in zero cases did it ever ask).

So, if @gejxjhdbes is still paying attention to any of this, I think he should:
Switch the BIOS to UEFI boot instead of CSM
Reboot the Fedora install media
Use a command such as file /sys/firmware/efi to really verify the mode (it is reported as a directory if in UEFI mode and as nonexistent otherwise).
Use gparted to wipe out everything on the SATA drive.
Reinstall Fedora.

Yes. IME the user has the choice if they use the bios boot menu and select the uefi mode. If they just boot it usually does the legacy boot.

Mine is fat32 so that is why I asked.
(default layout of a auto created Workstation)

Uefi bios does not care about vfat vs fat32. It even will work with fat, though depending upon the drive size or where on the drive it is located fat may not be usable (I have not used fat for many years so am only guessing with this comment)

What I posted above was created with an automatic partitioned install.

I apologize for the delay in responding. I recently had an internet outage so I’m just now able to carry out the suggested steps.

Following the recommendation from John Fine, I formatted the hard disk using the Disks application that comes with the live operating system. For the formatting settings, I selected:

  • Erase Mode: Overwrite existing data with zeroes (slow method)
  • Partitioning: No partitioning, leaving the disks empty

I’m attaching an image of the Disks application just in case:

I will now execute out some commands that I have not tried before, as well as some commands that I have used previously, just to check if anything has changed.

Executing lsblk -fp results in the following output:

NAME                    FSTYPE          FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
/dev/loop0              squashfs        4.0                                                                   
/dev/loop1              ext4            1.0   Anaconda    be85788b-98c7-47df-afaf-45dc8fdefb15                
├─/dev/mapper/live-rw   ext4            1.0   Anaconda    be85788b-98c7-47df-afaf-45dc8fdefb15    1.5G    79% /
└─/dev/mapper/live-base ext4            1.0   Anaconda    be85788b-98c7-47df-afaf-45dc8fdefb15                
/dev/loop2              DM_snapshot_cow                                                                       
└─/dev/mapper/live-rw   ext4            1.0   Anaconda    be85788b-98c7-47df-afaf-45dc8fdefb15    1.5G    79% /
/dev/sda                                                                                                      
/dev/sdb                                                                                                      
└─/dev/sdb1             vfat            FAT32 FEDORA-WS-L D8F6-C3ED                              27.5G     7% /run/initramfs/live
/dev/sdc                                                                                                      
/dev/sr0                                                                                                      
/dev/zram0                                                                                                    [SWAP]

Executing lsblk -p -o+PARTUUID results in the following output:

NAME                    MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS         PARTUUID
/dev/loop0                7:0    0   1.9G  1 loop                     
/dev/loop1                7:1    0   7.6G  1 loop                     
├─/dev/mapper/live-rw   253:0    0   7.6G  0 dm   /                   
└─/dev/mapper/live-base 253:1    0   7.6G  1 dm                       
/dev/loop2                7:2    0    32G  0 loop                     
└─/dev/mapper/live-rw   253:0    0   7.6G  0 dm   /                   
/dev/sda                  8:0    0 931.5G  0 disk                     
/dev/sdb                  8:16   1  29.5G  0 disk                     
└─/dev/sdb1               8:17   1  29.5G  0 part /run/initramfs/live 231cc406-01
/dev/sdc                  8:32   1     0B  0 disk                     
/dev/sr0                 11:0    1  1024M  0 rom                      
/dev/zram0              252:0    0   3.2G  0 disk [SWAP]              

Executing lspci results in the following output:

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Root Complex
00:01.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Mullins [Radeon R3 Graphics] (rev 45)
00:01.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Kabini HDMI/DP Audio
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Host Bridge
00:02.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1
00:02.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1
00:08.0 Encryption controller: Advanced Micro Devices, Inc. [AMD] Kabini/Mullins PSP-Platform Security Processor
00:10.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller (rev 11)
00:11.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 39)
00:12.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
00:13.0 USB controller: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller (rev 39)
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 42)
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD] FCH Azalia Controller (rev 02)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 11)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 16h (Models 30h-3fh) Processor Function 5
01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)

Executing inxi -Fzxx results in the following output:

System:
  Kernel: 6.5.6-300.fc39.x86_64 arch: x86_64 bits: 64 compiler: gcc
    v: 2.40-13.fc39 Desktop: GNOME v: 45.0 tk: GTK v: 3.24.38 wm: gnome-shell
    dm: GDM Distro: Fedora release 39 (Thirty Nine)
Machine:
  Type: Desktop System: HP product: 20-c206la v: N/A
    serial: <superuser required> Chassis: type: 13 serial: <superuser required>
  Mobo: HP model: 8245 v: 001 serial: <superuser required> BIOS: AMI v: F.43
    date: 07/26/2018
CPU:
  Info: quad core model: AMD A4-7210 APU with AMD Radeon R3 Graphics bits: 64
    type: MCP arch: Puma rev: 1 cache: L1: 256 KiB L2: 2 MiB
  Speed (MHz): avg: 999 high: 1000 min/max: 1000/1800 boost: enabled cores:
    1: 1000 2: 1000 3: 1000 4: 998 bogomips: 14373
  Flags: avx ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
  Device-1: AMD Mullins [Radeon R3 Graphics] vendor: Hewlett-Packard
    driver: radeon v: kernel arch: GCN-2 ports: active: eDP-1 empty: HDMI-A-1
    bus-ID: 00:01.0 chip-ID: 1002:9850
  Device-2: Quanta HP Integrated Webcam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 bus-ID: 4-1.2:3 chip-ID: 0408:50a0
  Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 23.2.1
    compositor: gnome-shell driver: gpu: radeon display-ID: 0
  Monitor-1: eDP-1 model: HP ALL-in-One res: 1600x900 dpi: 94
    diag: 494mm (19.5")
  API: OpenGL v: 4.5 vendor: amd mesa v: 23.2.1 glx-v: 1.4 es-v: 3.2
    direct-render: yes renderer: KABINI ( LLVM 16.0.6 DRM 2.50
    6.5.6-300.fc39.x86_64) device-ID: 1002:9850 display-ID: :0.0
  API: EGL Message: EGL data requires eglinfo. Check --recommends.
Audio:
  Device-1: AMD Kabini HDMI/DP Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel bus-ID: 00:01.1 chip-ID: 1002:9840
  Device-2: AMD FCH Azalia vendor: Hewlett-Packard driver: snd_hda_intel
    v: kernel bus-ID: 00:14.2 chip-ID: 1022:780d
  API: ALSA v: k6.5.6-300.fc39.x86_64 status: kernel-api
  Server-1: JACK v: 1.9.22 status: off
  Server-2: PipeWire v: 0.3.80 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
Network:
  Device-1: Realtek RTL8723BE PCIe Wireless Network Adapter
    vendor: Hewlett-Packard driver: rtl8723be v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: e000 bus-ID: 01:00.0 chip-ID: 10ec:b723
  IF: wlp1s0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8169 v: kernel pcie: speed: 2.5 GT/s
    lanes: 1 port: d000 bus-ID: 02:00.0 chip-ID: 10ec:8168
  IF: enp2s0 state: down mac: <filter>
Bluetooth:
  Device-1: Realtek Bluetooth Radio driver: btusb v: 0.8 type: USB rev: 2.1
    speed: 12 Mb/s lanes: 1 bus-ID: 2-1.3:5 chip-ID: 0bda:b008
  Report: btmgmt ID: hci0 rfk-id: 0 state: up address: <filter> bt-v: 4.0
    lmp-v: 6
Drives:
  Local Storage: total: 961.01 GiB used: 8.07 GiB (0.8%)
  ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-60WN4A0
    size: 931.51 GiB speed: 6.0 Gb/s serial: <filter>
  ID-2: /dev/sdb vendor: Generic model: Flash Disk size: 29.49 GiB type: USB
    rev: 2.0 spd: 480 Mb/s lanes: 1 serial: <filter>
Partition:
  ID-1: / size: 7.36 GiB used: 6.09 GiB (82.8%) fs: ext4 dev: /dev/dm-0
    mapped: live-rw
Swap:
  ID-1: swap-1 type: zram size: 3.23 GiB used: 891.5 MiB (27.0%) priority: 100
    dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 57.6 C mobo: N/A gpu: radeon temp: 61.0 C
  Fan Speeds (rpm): N/A
Info:
  Processes: 255 Uptime: 1h 28m Memory: total: 4 GiB note: est.
  available: 3.23 GiB used: 2.93 GiB (90.6%) Init: systemd v: 254
  target: graphical (5) default: graphical Compilers: N/A Packages: pm: rpm
  pkgs: N/A note: see --rpm Shell: Bash v: 5.2.15 running-in: gnome-terminal
  inxi: 3.3.31

Executing ls /sys/firmware/efi results in the following output:

ls: cannot access '/sys/firmware/efi': No such file or directory

(John Fine mentioned to me that I should run the command to verify if I’m in UEFI or Legacy, so it seems that I’m in Legacy.)

Here are some commands that didn’t work:
efibootmgr (EFI variables are not supported on this system)
journalctl (It seems like an exaggerated amount of information)
gparted (Command not found)

Meanwhile, on another computer I redownloaded the latest Fedora 39 x86_64 ISO image, which is the version for Intel and AMD computers. And I used a different 16GB USB flash drive.
Additionally, instead of using Rufus, I used the Fedora Media Writer application.

I think it best if I hold off taking any action for now, until you - who are more familiar with this topic - can provide guidance on the next steps I should take.

By the way, thank you all so much. I had never used Linux before, and I truly appreciate your help.

Now you should reboot from the usb, confirming it boots to uefi mode, then do the installation to sda. If everything goes as expected the system will properly boot from the internal drive after the install is complete.