Grub problems on Windows dual boot system

Hi,

I am trying to reinstall garuda dragonized kde on my system, and am running into some issues with it installing grub.

I have tried manual partitioning, replace partition, as well as install alongside and ran into the same error at the end of install, to which I am greeted with the grub recovery screen upon reboot.

The bootloader could not be installed. The installation command <pre>grub-install --target=i386-pc --recheck --force /dev/nvme0n1</pre> returned error code 1.

My output from inxi

CPU: 6-core AMD Ryzen 5 2600X (-MT MCP-) speed/min/max: 2096/2200/3600 MHz
Kernel: 5.15.12-zen1-1-zen x86_64 Up: 55m Mem: 5715.2/32028.7 MiB (17.8%)
Storage: 1.48 TiB (0.5% used) Procs: 304 Shell: fish inxi: 3.3.11

My output from fdisk -L (for the drive windows and garuda should be installed on)

Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 970 EVO 500GB               
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: 1673D03E-0608-46BE-86D1-DE7F888796B0

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 500654807 500415192 238.6G Microsoft basic data
/dev/nvme0n1p4 500654808 976773134 476118327   227G EFI System

This system uses EFI boot and this drive uses GPT as its partition table

Any point in the right direction would be appreciated, I have looked at the garuda boot repair option but can't seem to find a forum post that explains it for my use case.

Please post full

garuda-inxi
blkid
lsblk -f

as text, please.

Use 260 MB for /boot/efi
But if you use nvme0n1p4 in calamares the installer do the rest. IIRC :thinking:

garuda-inxi isnt showing up as a command on the live iso, after updating the pkgfiles and trying to install from garuda-common-settings(-git) somethings broke there too :sweat_smile:
output from normal inxi

CPU: 6-core AMD Ryzen 5 2600X (-MT MCP-) speed/min/max: 2107/2200/3600 MHz
Kernel: 5.15.12-zen1-1-zen x86_64 Up: 1h 46m Mem: 7301.4/32028.7 MiB (22.8%)
Storage: 1.48 TiB (0.5% used) Procs: 306 Shell: fish inxi: 3.3.11

output from blkid

/dev/zram0: LABEL="zram0" UUID="5cfaa821-149e-4393-b9a9-251e385eefec" TYPE="swap"
/dev/nvme0n1p1: UUID="6A07-3A93" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="8b0ae
235-93b4-4023-99ce-c62648c1656f"
/dev/nvme0n1p3: BLOCK_SIZE="512" UUID="B43E096E3E092AC6" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID
="5ce976cb-dfe9-42f4-95b6-ad941514b673"
/dev/sda1: LABEL="HardDrive" BLOCK_SIZE="512" UUID="528A81FF8A81DFB9" TYPE="ntfs" PARTUUID="ea127145-01"
/dev/sda2: LABEL="HardDrive" UUID="dc584d02-58c5-4447-81b1-7f3be2a94018" BLOCK_SIZE="4096" TYPE="ext4" PARTUUI
D="ea127145-02"
/dev/sdb1: LABEL="SD120" BLOCK_SIZE="512" UUID="78E278C0E2788462" TYPE="ntfs" PARTLABEL="Basic data partition"
PARTUUID="9d065a73-64e6-49c5-bc7c-7c0b9e7f5546"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop0: TYPE="squashfs"
/dev/sdc2: SEC_TYPE="msdos" LABEL_FATBOOT="MISO_EFI" LABEL="MISO_EFI" UUID="8F07-F0C9" BLOCK_SIZE="512" TYPE="
vfat"
/dev/sdc1: BLOCK_SIZE="2048" UUID="2022-01-01-17-14-19-00" LABEL="GARUDA_DR460NIZED_WHITETAILEDEAG" TYPE="iso9
660"
/dev/loop3: TYPE="squashfs"

Output from lsblk -f

NAME FSTYPE FSVER LABEL            UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0
squash 4.0                                                               0   100% /run/miso/sfs/livefs
loop1
squash 4.0                                                               0   100% /run/miso/sfs/mhwdfs
loop2
squash 4.0                                                               0   100% /run/miso/sfs/desktopfs
loop3
squash 4.0                                                               0   100% /run/miso/sfs/rootfs
sda                                                                                    
├─sda1
│    ntfs         HardDrive        528A81FF8A81DFB9                                    
└─sda2
ext4   1.0   HardDrive        dc584d02-58c5-4447-81b1-7f3be2a94018                
sdb                                                                                    
└─sdb1
ntfs         SD120            78E278C0E2788462                                    
sdc  iso966 Jolie GARUDA_DR460NIZED_WHITETAILEDEAG
│                                  2022-01-01-17-14-19-00                     0   100% /run/miso/bootmnt
├─sdc1
│    iso966 Jolie GARUDA_DR460NIZED_WHITETAILEDEAG
│                                  2022-01-01-17-14-19-00                              
└─sdc2
vfat   FAT12 MISO_EFI         8F07-F0C9                                           
sr0                                                                                    
zram0
[SWAP]
nvme0n1
│
├─nvme0n1p1
│    vfat   FAT32                  6A07-3A93
├─nvme0n1p2
│
├─nvme0n1p3
│    ntfs                          B43E096E3E092AC6
└─nvme0n1p4
crypto 1                      c6ebad11-6f8b-41ba-b4de-a61935d49b1b
└─luks-c6ebad11-6f8b-41ba-b4de-a61935d49b1b
btrfs                         daeb4a90-bb2f-437c-9024-8d11456868a2  217.6G     3% /tmp/calamares-root-ydn_qmxk/var/tmp
/tmp/calamares-root-ydn_qmxk/var/log
/tmp/calamares-root-ydn_qmxk/var/cache
/tmp/calamares-root-ydn_qmxk/srv
/tmp/calamares-root-ydn_qmxk/root
/tmp/calamares-root-ydn_qmxk/home
/tmp/calamares-root-ydn
_qmxk

the efi thats set right now is from the installer, not quite positive why it is showing that entire partition as an efi system rather then dividing a smaller efi like it was when I did it manually.

Can you clarify a little on the last sentence? I am a little lost at

But if you use nvme0n1p4 in calamares the installer do the rest. IIRC

Since it has always worked automatically for me, I'm not sure, so wait for more opinions.

Which one you use?
Full ISO name, please.

is

inxi -Faz

Start the installer, use nvme0n1p4 for /boot/efi and the partition nvme0n1p4 to install.

One distinctly odd piece of your output is the filesystem of nvme0n1p4 is marked as EFI, even though that should be the root filesystem. I don't know if that is enough to throw off grub, but it is definitely not what you want.

When you are in the manual partition part of the installer, you should be mounting two partitions. One mounted at /boot/efi and not formatted (the EFI partition, at nvme0n1p1), and the second at / formatted btrfs at nvme0n1p4.

Which one you use?
Full ISO name, please.

garuda-dr460nized-linux-zen-220131.iso

Sorry, here is the full output from inxi -Faz

System:
Kernel: 5.15.12-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
parameters: BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=us tz=UTC
misobasedir=garuda misolabel=GARUDA_DR460NIZED_WHITETAILEDEAG quiet
systemd.show_status=1 driver=nonfree nouveau.modeset=0 i915.modeset=1
radeon.modeset=1
Desktop: KDE Plasma 5.23.4 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11
vt: 1 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
Type: Desktop Mobo: ASRock model: B450M Pro4 serial: <superuser required>
UEFI-[Legacy]: American Megatrends v: P4.20 date: 07/07/2020
Battery:
Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 2S
serial: <filter> charge: 100% (should be ignored) rechargeable: yes
status: Discharging
CPU:
Info: model: AMD Ryzen 5 2600X bits: 64 type: MT MCP arch: Zen+
family: 0x17 (23) model-id: 8 stepping: 2 microcode: 0x800820D
Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
L3: 16 MiB desc: 2x8 MiB
Speed (MHz): avg: 2247 high: 3778 min/max: 2200/3600 boost: enabled
scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 3778 2: 1962
3: 2037 4: 2051 5: 2195 6: 2117 7: 2743 8: 1714 9: 2144 10: 1945 11: 2196
12: 2090 bogomips: 86239
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Vulnerabilities:
Type: itlb_multihit status: Not affected
Type: l1tf status: Not affected
Type: mds status: Not affected
Type: meltdown status: Not affected
Type: spec_store_bypass
mitigation: Speculative Store Bypass disabled via prctl
Type: spectre_v1
mitigation: usercopy/swapgs barriers and __user pointer sanitization
Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional,
STIBP: disabled, RSB filling
Type: srbds status: Not affected
Type: tsx_async_abort status: Not affected
Graphics:
Device-1: NVIDIA GP104 [GeForce GTX 1080] vendor: eVga.com. driver: nvidia
v: 495.46 alternate: nouveau,nvidia_drm bus-ID: 07:00.0 chip-ID: 10de:1b80
class-ID: 0300
Display: x11 server: X.Org 1.21.1.2 compositor: kwin_x11 driver:
loaded: nvidia unloaded: modesetting alternate: fbdev,nouveau,nv,vesa
display-ID: :0 screens: 1
Screen-1: 0 s-res: 4920x1920 s-dpi: 91 s-size: 1371x535mm (54.0x21.1")
s-diag: 1472mm (57.9")
Monitor-1: HDMI-0 res: 1080x1920 hz: 60
Monitor-2: DP-3 res: 1920x1080 hz: 60 dpi: 82
size: 598x336mm (23.5x13.2") diag: 686mm (27")
Monitor-3: DP-4 res: 1920x1080 hz: 60 dpi: 92
size: 531x299mm (20.9x11.8") diag: 609mm (24")
Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
Device-1: NVIDIA GP104 High Definition Audio vendor: eVga.com.
driver: snd_hda_intel v: kernel bus-ID: 07:00.1 chip-ID: 10de:10f0
class-ID: 0403
Device-2: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel
v: kernel bus-ID: 09:00.3 chip-ID: 1022:1457 class-ID: 0403
Device-3: C-Media Audio Adapter (Unitek Y-247A) type: USB
driver: cmedia_hs100b,snd-usb-audio,usbhid bus-ID: 3-4:2 chip-ID: 0d8c:0014
class-ID: 0300
Sound Server-1: ALSA v: k5.15.12-zen1-1-zen running: yes
Sound Server-2: JACK v: 1.9.19 running: no
Sound Server-3: PulseAudio v: 15.0 running: no
Sound Server-4: PipeWire v: 0.3.42 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASRock driver: r8169 v: kernel port: f000 bus-ID: 05:00.0
chip-ID: 10ec:8168 class-ID: 0200
IF: enp5s0 state: up speed: 100 Mbps duplex: full mac: <filter>
Device-2: ASUSTek 802.11ac NIC type: USB driver: N/A bus-ID: 1-4.3:6
chip-ID: 0b05:184c class-ID: 0000 serial: <filter>
Drives:
Local Storage: total: 1.48 TiB used: 7.81 GiB (0.5%)
SMART Message: Unable to run smartctl. Root privileges required.
ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
model: SSD 970 EVO 500GB size: 465.76 GiB block-size: physical: 512 B
logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
rev: 2B2QEXE7 temp: 27.9 C scheme: GPT
ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000DM010-2EP102
size: 931.51 GiB block-size: physical: 4096 B logical: 512 B
speed: 6.0 Gb/s type: HDD rpm: 7200 serial: <filter> rev: CC43
scheme: MBR
ID-3: /dev/sdb maj-min: 8:16 vendor: Western Digital
model: WDS120G2G0A-00JH30 size: 111.8 GiB block-size: physical: 512 B
logical: 512 B speed: 6.0 Gb/s type: SSD serial: <filter> rev: 0000
scheme: GPT
ID-4: /dev/sdc maj-min: 8:32 type: USB vendor: SanDisk
model: U3 Cruzer Micro size: 7.48 GiB block-size: physical: 512 B
logical: 512 B type: N/A serial: <filter> rev: 8.02 scheme: MBR
SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Swap:
Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
ID-1: swap-1 type: zram size: 31.28 GiB used: 0 KiB (0.0%) priority: 100
dev: /dev/zram0
Sensors:
System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 31 C
Fan Speeds (RPM): N/A gpu: nvidia fan: 0%
Info:
Processes: 307 Uptime: 3h 1m wakeups: 15 Memory: 31.28 GiB
used: 7.08 GiB (22.6%) Init: systemd v: 250 tool: systemctl Compilers:
gcc: 11.1.0 Packages: pacman: 1192 lib: 282 Shell: fish v: 3.3.1
default: Bash v: 5.1.12 running-in: konsole inxi: 3.3.11~~~

When I did the manual partitoning, I used what I found on this post for uefi systems

specifically this

For uefi
You need to create one 300 mb fat32 partition and mount it as >/boot/efi and flag it with esp and boot
And one btrfs partition mount it as /

One odd thing however is my install shows /boot as a mount point but not /boot/efi. I tried installing with just /boot and I ran into the same grub issue.

The whole it flagging the entire partition as an EFI system is recent, that only happened after I tried to install by "replacing a partition"

I apologize, I should have put /boot/efi, that is correct for this system. I edited my post above.

There is a lot going on in that post you linked! :face_with_spiral_eyes:

You don't need to create any FAT32 partition. You already have the EFI partition that Windows made. There is plenty of space and multiple systems can "piggyback" on the same EFI drive as long as it is on the same physical drive.

Make sure you select p1 (your EFI partition) in the manual partition process (click the "edit" button or whatever), choose to mount it at /boot/efi, but do not format because you want to preserve the data that is already on there.

Then, you should also select p4, choose "format", and if it doesn't default to btrfs then change it to btrfs. Choose / for the mount point on the dropdown menu. If you want to give the FS a label (Garuda, for example) feel free but it is not required. Don't select any of the flag boxes for p4.

Does that sound like something you have already tried?

2 Likes

I haven't tried piggybacking off the windows efi system, I believe I was creating a second one when I was manually partitioning . (Which may have been my issue in the first place)

Do i need to set the bios-grub flag for that efi partition as well? Right now it is just flagged as boot.

I might be wrong about this, but I don't think those flags are that important unless you are booting legacy. Grub doesn't care about the flags and is able to find what it needs other ways, and an EFI partition is defined by its special GUID type (not by any flags). I have never bothered to manipulate those flags myself--I would just leave them as they come up by default.

1 Like

Just tried your solution, ran into the same error code unfortunately, :confused:

The bootloader could not be installed. 
The installation command 
<pre>grub-install --target=i386-pc --recheck --force /dev/nvme0n1</pre> returned error code 1.~~~

I didn't notice this before. You may have to turn off legacy boot in your BIOS menu. Do you run Windows 10? You shouldn't need it anyway.

1 Like

I do run windows 10 for my university applications. (Vpn wont allow linux machines :laughing:)

Let me go into bios and make sure its off then attempt to reinstall.

1 Like

After checking, legacy boot is disabled on everything in bios. I tried disabling CCM as well but that made be unable to boot the live iso anymore (install media is mbr maybe?)

At this point I am starting to think I may be better of chrooting into the system and manually installing grub, if thats even a viable option.

Hmm, you definitely shouldn't have to do that. Maybe try a re-do on the flash drive. How did you set it up?

Ventoy is very popular here. It has been quite reliable for Garuda installs.

3 Likes

Ill try that out, I just set it up the same way as I have all my other boots. Download the iso, pass it to etcher and go from there. I'll boot back onto windows and redo the boot media.

1 Like

That ended up being the solution!
Thank you so much for the help! Everything is installed and booting properly.

For later readers of this post,
I disabled CSM to force all things to be efi, then used Ventoy to set up the live boot media to use GPT partitions, rather then the MBR that was set on it from Etcher.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.