You are not logged in.

#1 2015-09-29 03:54:03

Ocypheum
Member
Registered: 2015-09-26
Posts: 58

[Solved] bootctl install error: file system has wrong type

I'm at the part of the beginners' guide where it describes how to set up the boot loader:

Here, the installation drive is assumed to be GPT-partioned, and have the EFI System Partition (gdisk type EF00, formatted with FAT32) mounted at /boot.

bootctl is part of systemd, and as such part of the base installation.

# bootctl install

However bootctl install fails with the error:

File system "/boot" has wrong type for an EFI System Partition (ESP).

I'm definitely in UEFI mode as evidenced by the output of efivar -l. My EFI partition is mounted at /boot and it is FAT32 format. The structure of the partition is as follows:

EFI/
    Boot/
        BOOTX64.EFI
initramfs-linux-fallback.img
initramfs-linux.img
intel-ucode.img
loader/
    entries/
        arch.conf
    loader.conf
vmlinuz-linux

Here's the output from gdisk:

GPT fdisk (gdisk) version 1.0.0

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 2594D192-6FF5-7B43-9C56-06C9C4346AC3
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3132 sectors (1.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1050623   512.0 MiB   0700  
   2         1050624       968750000   461.4 GiB   0700  
   3       968751104       976773119   3.8 GiB     8200  

I think the problem is the 0700 code for the first partition, which should be EF00. How can I fix?

Last edited by Ocypheum (2015-10-03 17:52:11)

Offline

#2 2015-09-29 04:30:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,741

Re: [Solved] bootctl install error: file system has wrong type

Is the boot partition mounted on /boot?


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#3 2015-09-29 05:13:38

Ocypheum
Member
Registered: 2015-09-26
Posts: 58

Re: [Solved] bootctl install error: file system has wrong type

ewaller wrote:

Is the boot partition mounted on /boot?

It was. I'm looking at the partition in TestDisk now. I had deleted /boot/EFI/ubuntu/ and /boot/EFI/systemd/ because I thought I didn't need the first and the second would be recreated during the Arch install. Restoring the files in systemd didn't make a difference unfortunately.

Here's what the disk looks like in TestDisk:

     Partition                  Start        End    Size in sectors
> 1 P MS Data                     2048    1050623    1048576 [NO NAME]
  2 P MS Data                  1050624  968750000  967699377
  3 P Linux Swap             968751104  976773119    8022016

And here it is in parted:

Number  Start   End    Size    File system     Name  Flags
 1      1049kB  538MB  537MB   fat32                 msftdata
 2      538MB   496GB  495GB   ext4                  msftdata
 3      496GB   500GB  4107MB  linux-swap(v1)

Is it weird that the first partition doesn't start at the very beginning of the disk?

Edit: I just realized I'm missing a boot flag... how did that happen yikes

Edit 2: Yeah, that was the problem.

Last edited by Ocypheum (2015-09-29 06:00:26)

Offline

#4 2015-09-29 05:47:49

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

Re: [Solved] bootctl install error: file system has wrong type

0700 is Microsoft Basic Data. Chroot in and use gdisk to change it to EF00 (EFI System).


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2015-09-29 06:04:35

Ocypheum
Member
Registered: 2015-09-26
Posts: 58

Re: [Solved] bootctl install error: file system has wrong type

jasonwryan wrote:

0700 is Microsoft Basic Data. Chroot in and use gdisk to change it to EF00 (EFI System).

Now that I am actually booted into the system and not the live image, it looks fine. Would setting the boot/esp flag on that partition change the code?

Offline

#6 2015-09-29 06:14:59

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

Re: [Solved] bootctl install error: file system has wrong type

You'll need to set the correct code: that is the equivalent of the "boot flag" in parted.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2015-09-29 10:16:44

pekkaRo
Member
Registered: 2013-11-11
Posts: 2

Re: [Solved] bootctl install error: file system has wrong type

Ocypheum wrote:

...

Edit 2: Yeah, that was the problem.

Is it solved now?

Just to add confusion:

I had to fix my ESP too, and it really wasn't one of the easiest things to do. After you make the change to the partition type and flags, it seems that you need to regenerate the file system with

mkfs.fat -F32 /dev/<PARTITION>

After you make this, all data on /boot is naturally lost. So, reinstall kernel, run makeinitcpio, if you have intel processor, remember to reinstall intel-ucode.  Now you can generate EFI.

BTW, when mounting the eps without file system,  the error message about read only can be a bit misleading for a simple person like me.

My root cause was (perhaps?) that initramfs and kernel had gotten out of sync during update. Which was trivial to fix after I realized what had happened.

Offline

#8 2017-02-07 17:17:40

lpt
Member
Registered: 2017-02-07
Posts: 4

Re: [Solved] bootctl install error: file system has wrong type

jasonwryan wrote:

0700 is Microsoft Basic Data. Chroot in and use gdisk to change it to EF00 (EFI System).

i'm having the same problem. I keep running down the entire installation guide, but it's the same every time.
i typed pacman -S gdisk, and then arch-chroot /mnt, and then gdisk (followed by m, t, 1, EF00)
and got:
Type of partition 1 is unchanged: Microsoft basic data
and then:
File system "/boot" has wrong type for and EFI System Partition (ESP)
again.

i only synched gdisk after i read your post, this is the first time using it, where am i going wrong?

(edit: i am synching gparted now. i'm thinking setting the partitions up with parted was my mistake
so after pacman /mnt base base-devel, UEFI users always need to pacman -S gdisk or gparted?)

Last edited by lpt (2017-02-07 17:29:26)

Offline

#9 2017-02-07 17:38:39

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [Solved] bootctl install error: file system has wrong type

Looks like you failed to read the link Trilby directed you to, or else you would know not to necrobump. Consider this your final warning. Read and follow the Code of Conduct or you will find yourself temporarilly banned from these forums.

Closing.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB