You are not logged in.

#1 2019-06-09 16:32:19

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Systemd-boot magically installs Grub2

Edit: This is basically what happens but i didn't installed Grub nor it is installed

Edit: Maybe i should stick with Grub2, it can also boot ?

Hello everyone, i'm a newbie to Arch Linux (actually to Linux scene but used a few other distros like Ubuntu, Mint, Pardus) and today done installing. Decided that i want to use systemd-boot as the bootloader this time (i was using Grub2 in other distros) but something weird is happening.

I'm trying to dualboot Win10 and Arch (my computer has a recovery partition and i don't want to lose it), Win10 came pre-installed and i have installed Arch via booting it with Grub2 (not installed to system nor esp partition, i have another usb with Android x86_64) since my computer doesn't support x86 efi and bios modes. Installation went fine (other then waiting for device error which i have used archisolabel) and i have also installed systemd-boot but when i restart my computer Grub2 shows up magically even though it isn't installed.

How does it happen ? How am i supposed to solve that ?

Maybe this outputs might help

pacman -Qs grub

Nothing shows up

At esp partition

ls
BOOT EFI loader

and a few other.REC files

In EFI

ls
Boot Microsoft systemd

In systemd

ls
systemd-bootx64.efi

My loader.conf from loader folder

timeout 5
console-mode max
default arch
editor no

And entry called arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options root=PARTUUID=[em]same partuuid with root partition[/em] rw

Not sure how does it happen.

Last edited by WhoLMA (2019-06-11 20:43:54)

Offline

#2 2019-06-09 18:08:40

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: Systemd-boot magically installs Grub2

What, exactly, does "Grub2 shows up magically" mean? How did you install Arch: what media/guide did you use?


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-06-09 18:29:15

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Systemd-boot magically installs Grub2

Can we please see the output of

bootctl list --no-p
efibootmgr -v

And please use code tags rather than quote tags when posting terminal output, thanks!


Jin, Jîyan, Azadî

Offline

#4 2019-06-09 19:38:38

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

bootctl list --no-p
Boot Loader Entries:
title: Arch Linux (default)
type: conf
id: arch
linux: /vmlinuz-linux
initrd: /intel-ucode.img /initramfs-linux.img
options: root=PARTUUID=02f9d788-3df0-754b-b02f-6c01730241e4 rw
efibootmgr -v
bash: efibootmgr: commmand not found

Offline

#5 2019-06-09 19:41:46

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

jasonwryan wrote:

What, exactly, does "Grub2 shows up magically" mean? How did you install Arch: what media/guide did you use?


Moving to NC...

Media is from Official download page, labeled as ARCH_201906
Guide is from Arch wiki installation guide page for installing system
systemd-boot

About Grub2 magic, before installing Arch there was only Windows boot loader after installing Arch there is Grub2 and Windows boot loader even though i didn't installed Grub2 but systemd-boot

Last edited by WhoLMA (2019-06-09 19:45:29)

Offline

#6 2019-06-09 19:47:34

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: Systemd-boot magically installs Grub2

WhoLMA wrote:

i have installed Arch via booting it with Grub2 (not installed to system nor esp partition

What commands did you use to achieve this?

Offline

#7 2019-06-09 19:50:12

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

loqs wrote:
WhoLMA wrote:

i have installed Arch via booting it with Grub2 (not installed to system nor esp partition

What commands did you use to achieve this?

Booted into the Andro usb, pressed c for Grub2 command line then

linux (hd0)/arch/boot/x86_64/vmlinuz archisolabel=ARCH_201906
initrd (hd0)/arch/boot/x86_64/archiso.img
boot

then followed wiki's installation guide

Last edited by WhoLMA (2019-06-09 19:56:59)

Offline

#8 2019-06-09 19:55:52

loqs
Member
Registered: 2014-03-06
Posts: 19,101

Re: Systemd-boot magically installs Grub2

When you boot the system without any removable present grub2 is being used if I understand correctly.
What is the output of the following

# blkid
# parted -l

Last edited by loqs (2019-06-09 19:57:38)

Offline

#9 2019-06-09 20:22:40

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

loqs wrote:

When you boot the system without any removeable present grub2 is being used if I understand correctly.

Yes, weird thing is i didn't even installed Grub2

# blkid
/dev/sda1: LABEL="WINRE_DRV" UUID="3A..." TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="4f.."
/dev/sda2: LABEL="SYSTEM_DRV" UUID="5AD4-1358 TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="fa75a586-576e-4957-ad3d-ac96fe990e8c"
/dev/sda3: PARTLABEL="Microsoft reserved partition" PARTUUID="d8.."
/dev/sda4: LABEL="Windows8_OS" UUID="E0.." TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="c0.."
/dev/sda5: UUID="30.." TYPE="ntfs" PARTUUID="ff.."
/dev/sda6: UUID="b7f1d077-c1f8-47e4-81e0-9277e2e08cc6" TYPE="ext4" PARTUUID="02f9d788-3df0-754b-b02f-6c01730241e4"
/dev/sda7: LABEL="PBR_DRV" UUID="7C.." TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="16.."
/dev/loop0: TYPE="squashfs"

sda6 is the installation part, sda2 is esp

# parted -l
[em]info about disk[/em]
Disk Flags:

Number     Start     End     Size     File system     Name                                         Flags
1              start and end and size  ntfs                 Basic partition data                      hidden, diag
2              start and end and size  fat32               EFI system partition                     boot, esp
3              start and end and size                        Microsoft reserved partition            msftres
4              start and end and size  ntfs                 Basic partition data                      msftdata
5              start and end and size  ntfs                                                                   hidden, diag
6              start and end and size  ext4
7              start and end and size  ntfs                 Basic partition data                      hidden, diag

Parted isn't a part of base group by the way

Offline

#10 2019-06-09 20:25:50

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: Systemd-boot magically installs Grub2

WhoLMA wrote:
efibootmgr -v
bash: efibootmgr: commmand not found

Install the efibootmgr package and try that again please.


Jin, Jîyan, Azadî

Offline

#11 2019-06-09 20:34:48

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

Head_on_a_Stick wrote:
WhoLMA wrote:
efibootmgr -v
bash: efibootmgr: commmand not found

Install the efibootmgr package and try that again please.

[root@archiso /]# efibootmgr -v
BootCurrent: 0002
Timeout: 0 seconds
BootOrder: 0002,0001,2001,2002,2003
Boot0001* Windows Boot Manager      [em]some weird info[/em]
Boot0002* Linux Boot Manager      HD(2,GPT,fa75a586-576e-4957-ad3d-ac96fe990e8c,0x1f4800,0x82000)/File(\EFI\systemd\systemd-bootx64.efi)
Boot2001* EFI USB Device    RC
Boot2002* EFI DVD/CDROM     RC
Boot2003* EFI Network     RC

Also both WBM and LBM shows same thing from HD to /File, i assume it is the partition then efi file

Offline

#12 2019-06-09 21:00:02

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: Systemd-boot magically installs Grub2

Sounds like your firmware is just being really, really stupid and calling anything it doesn't recognize "grub2"

Offline

#13 2019-06-10 07:31:42

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

Scimmia wrote:

Sounds like your firmware is just being really, really stupid and calling anything it doesn't recognize "grub2"

It doesn't call anything as Grub2, when i select LBM Grub2 greets me

Offline

#14 2019-06-10 08:43:20

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,509

Re: Systemd-boot magically installs Grub2

i was using Grub2 in other distros

Which is likely the "magic" here.
- What do the relevant tiemstamps tell you about when grub was installed/updated?
- "pacman -Qs grub", is the *package* installed in arch at all?

Offline

#15 2019-06-10 08:46:56

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

seth wrote:

i was using Grub2 in other distros

Which is likely the "magic" here.
- What do the relevant tiemstamps tell you about when grub was installed/updated?
- "pacman -Qs grub", is the *package* installed in arch at all?

Currently not installed, i have wiped the disk from Windows recovery partition so there is just barebone Windows, and i have wanted to show that i didn't installed grub then systemd-boot because wiki says it isn't advised to do.

Grub2 which i booted the media isn't also installed but in another usb.

Last edited by WhoLMA (2019-06-10 08:47:58)

Offline

#16 2019-06-10 12:04:46

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,515

Re: Systemd-boot magically installs Grub2

Is this a GPT or MBR partitioned disk ?

The parted output lacks details, post fdisk -l /dev/sda please .

Last edited by Lone_Wolf (2019-06-10 12:05:02)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#17 2019-06-10 13:12:01

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

Lone_Wolf wrote:

Is this a GPT or MBR partitioned disk ?

The parted output lacks details, post fdisk -l /dev/sda please .

GPT

fdisk -l /dev/sda

Disk /dev/sda
...
Disklabel type: gpt

Device         ...     Type
/dev/sda1             Windows recovery environment
/dev/sda2             EFI System
/dev/sda3             Microsoft reserved
/dev/sda4             Microsoft basic data
/dev/sda5             Windows recovery environment
/dev/sda6             Linux filesystem
/dev/sda7             Windows recovery environment

Last edited by WhoLMA (2019-06-10 13:12:15)

Offline

#18 2019-06-10 13:31:55

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 15,515

Re: Systemd-boot magically installs Grub2

Nothing suspicious in that output.

Try to locate EFI\systemd\systemd-bootx64.efi and run "stat" on it.
(It's probably on /dev/sda2 ) .

Edit :
same for EFI/BOOT/BOOTX64.EFI

Last edited by Lone_Wolf (2019-06-10 13:33:18)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#19 2019-06-10 14:25:12

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

stat EFI\systemd\systemd-bootx64.efi

File: EFI/systemd/systemd-bootx64.efi
Size: 95586 Blocks: 192 IO Block:4096 normal file
Device: 802h/2050d Inode: 35 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: (0/ root)
Access: 2019-06-10 03:00:00:00.00000000 +0300
Modify: 2019-05-10 23:28:56:00.00000000 +0300
Change: 2019-06-10 16:04:42:69.00000000 +0300
Birth: -

stat EFI/BOOT/BOOTX64.EFI

File: EFI/Boot/BOOTX64.efi
Size: 95586 Blocks: 192 IO Block:4096 normal file
Device: 802h/2050d Inode: 35 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 0/ root) Gid: (0/ root)
Access: 2019-06-10 03:00:00:00.00000000 +0300
Modify: 2019-05-10 23:28:56:00.00000000 +0300
Change: 2019-06-10 16:04:42:69.00000000 +0300
Birth: -

I have tried uninstalling systemd-boot, reinstalling Arch from scratch but Grub2 appears again and again.

Last edited by WhoLMA (2019-06-10 14:26:07)

Offline

#20 2019-06-10 14:45:02

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: Systemd-boot magically installs Grub2

I have tried uninstalling systemd-boot, reinstalling Arch from scratch but Grub2 appears again and again.

Has your Arch partition been occupied by a former Linux distro? It could be a leftover from that distro where grub you're seeing resides on the first sectors that are not used by Arch installation that hasn't been properly erased. Perhaps a proper clean of the partition first like wipefs and reinstall? It's weird so I'm mainly speculating.

Offline

#21 2019-06-10 14:53:05

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

d_fajardo wrote:

I have tried uninstalling systemd-boot, reinstalling Arch from scratch but Grub2 appears again and again.

Has your Arch partition been occupied by a former Linux distro? It could be a leftover from that distro where grub you're seeing resides on the first sectors that are not used by Arch installation that hasn't been properly erased. Perhaps a proper clean of the partition first like wipefs and reinstall? It's weird so I'm mainly speculating.

When i was creating the partition fdisk warned me about that so i said delete the signature and re formatted as ext4 but before that yeah there was Ubuntu.

Offline

#22 2019-06-10 15:49:56

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: Systemd-boot magically installs Grub2

I'm beginning to suspect that your former Ubuntu installed grub at the beginning of the disk and not in the beginning of the Arch partition. This are the sectors used to be kept free for the old MBR. Was your former Ubuntu an MBR? Strange you have 2 Windows recovery partition - sda1 and sda7. If my suspicion is correct that the grub is stationed at the beginning of the disk instead of your Arch partition (which you nuked first before installation. Besides pacman -Q returns null.), then you can just dd those sectors clean. Again this is speculation and be careful with dd. I had to reinstall Arch once because of a bad dd command I issued. Perhaps check first which sector your sda1 starts?

Offline

#23 2019-06-10 18:15:08

WhoLMA
Member
Registered: 2019-06-09
Posts: 17

Re: Systemd-boot magically installs Grub2

d_fajardo wrote:

I'm beginning to suspect that your former Ubuntu installed grub at the beginning of the disk and not in the beginning of the Arch partition. This are the sectors used to be kept free for the old MBR. Was your former Ubuntu an MBR?

My computer doesn't support MBR

Strange you have 2 Windows recovery partition - sda1 and sda7. If my suspicion is correct that the grub is stationed at the beginning of the disk instead of your Arch partition (which you nuked first before installation. Besides pacman -Q returns null.), then you can just dd those sectors clean. Again this is speculation and be careful with dd. I had to reinstall Arch once because of a bad dd command I issued. Perhaps check first which sector your sda1 starts?

sda1 start from 2048, and totally 1000MB but sda7 is 10G. I think sda7 holds the recovery image meanwhile sda1 holds WinRE.

sda2 is EFI/esp partition sda3 is 128MB don't know what does it hold (can't mount it) but afaik Win MBR partition s like 100MBish (my computer doesn't have MBR mode but maybe there is a partition for it ?)
sda4 is Win / (C:), sda5 is 450MB also called recovery environment.

Edit : Both sda1 and sda5 has winre.wim and boot.sdi they are %99 Win8 WinRE and Win10 WinRE.

Last edited by WhoLMA (2019-06-10 18:17:38)

Offline

#24 2019-06-10 18:35:24

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: Systemd-boot magically installs Grub2

This page from Ubuntu Grub2 might shed some light. It does say that Grub embeds itself on the sector after the MBR. Your sda1 begins on the 2048MB sector so it is possible that the magical Grub2 is embedded in that 2MB sector from 0-2047. As I said you can clean that sector by dd but I'm not sure if that sector is used by Windows as well so there might be risks involved.

Edit: A safe way of doing it is to clone a disk first as backup i.e. clonezilla if you have that facility then try the operation.

Last edited by d_fajardo (2019-06-10 18:44:10)

Offline

#25 2019-06-11 08:04:01

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,689

Re: Systemd-boot magically installs Grub2

It might be possible to continue what you already have as a setup. When in Arch you can install grub2 first via pacman. If Arch install grub2 in the same sector as Ubuntu does, then it will overwrite the grub2 already existing there. Then you can use pacman again to delete grub2. It might work. If these thoughts of mine are correct what should have happened was to remove grub2 first in Ubuntu before overwriting the partition and installing Arch. I might still be all wrong however and your grub2 remains a mystery.

Offline

Board footer

Powered by FluxBB