You are not logged in.

#1 2023-10-06 13:55:58

Nico792
Member
Registered: 2023-09-24
Posts: 18

[SOLVED] mkinitcpio cannot write

Hi, I am installing arch for the second time but now on a different device. I had ubuntu on this device before, but I accidentally bricked it and am now overriding it with arch. I want to dual boot windows and arch.
I got things running fine I thought, now I am almost done with the install and I try to run "mkinitcpio -P" which starts off running fine but then at the end errors with

...
==> Creating zstd-compressed initcpio image: '/boot/initramfs-linux-zen-fallback.img'
zstd: error 70: Write error: cannot write block : No space left on device
bsdtar: Write error
bsdtar: Write error
==> ERROR: Image generation FAILED: 'bsdtar (step 1) reported an error)'

I think this may be related to a problem I had earlier with my EFI partition being full (I ended up deleting /ubuntu in there, because I wasn't planning on using ubuntu anymore), but I am not sure and then still I do not know where to look for what to do next.
Any help is much appreciated!

Last edited by Nico792 (2023-10-06 14:48:59)

Offline

#2 2023-10-06 14:00:38

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

Re: [SOLVED] mkinitcpio cannot write

The error seems pretty self explanatory, "No space left on device". What's the question?

Offline

#3 2023-10-06 14:02:48

Nico792
Member
Registered: 2023-09-24
Posts: 18

Re: [SOLVED] mkinitcpio cannot write

well I understand the error, the question is regarding, how do I fix it. I don't want to brick my machine by deleting random things in EFI, and things work find on my laptop, so what should I change/ do/ delete so that it can fit

Last edited by Nico792 (2023-10-06 14:03:21)

Offline

#4 2023-10-06 14:02:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] mkinitcpio cannot write

Well the error is pretty clear. You do not have enough space on your ESP. What do you want to do, how big is your ESP? I see a zen kernel, is that the only kernel or do you intend to have multiple?

I'd personally reccommend you don't mount the ESP to /boot but e.g. /efi or so, so that the kernel images generated by mkinitcpio land in /boot on your (bigger sized) root partition and then use a bootloader like GRUB or refind that can read kernel images from there without the need for them being on your ESP directly. If you opt for that you can remove vmlinuz-linux and all initramfs-* files from arch from the ESP and will only have the bootloaders files on there, which are likely to be just a couple of MBs

If you need more advice, mention/post your partition layout/sizes and  what you intend to do with said partitions.

Last edited by V1del (2023-10-06 14:04:47)

Offline

#5 2023-10-06 14:09:08

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

Re: [SOLVED] mkinitcpio cannot write

Nico792 wrote:

well I understand the error, the question is regarding, how do I fix it. I don't want to brick my machine by deleting random things in EFI, and things work find on my laptop, so what should I change/ do/ delete so that it can fit

We would need some basic info to answer that, such as how big the partition is and what's on it now.

Offline

#6 2023-10-06 14:13:21

Nico792
Member
Registered: 2023-09-24
Posts: 18

Re: [SOLVED] mkinitcpio cannot write

V1del wrote:

I see a zen kernel, is that the only kernel or do you intend to have multiple?

Yes, that is the only kernel I plan to be using

V1del wrote:

I'd personally reccommend you don't mount the ESP to /boot but e.g. /efi or so, so that the kernel images generated by mkinitcpio land in /boot on your (bigger sized) root partition and then use a bootloader like GRUB or refind that can read kernel images from there without the need for them being on your ESP directly.

Alright, I'm gonna try to reword that in my own words (tell me if I get things wrong) and then I'll try to answer. Mounting ESP to /boot would put my kernel in a small partition (is this EFI?), mouting it in /eft would put it in my root partition which is where my main linux will run (couple hunderd gigs in my case). Then have GRUB go through my disk to find where the kernel is and load it that way.

From what I understand that sounds like a good plan, biggest problem is I don't really know how to. I can guess the first part doing "mount --mkdir /dev/sda2 /mnt/efi" instead of "mount --mkdir /dev/sda2 /mnt/boot"

The second part I don't immediately understand how I should do, is that a relatively simple process during grub configuration or do I have to do more complicated things (if so what).

One additional question, to remount sda2 to /mnt/efi, do I have to restart the install or can I do something to remount it?

Offline

#7 2023-10-06 14:15:27

Nico792
Member
Registered: 2023-09-24
Posts: 18

Re: [SOLVED] mkinitcpio cannot write

Scimmia wrote:

We would need some basic info to answer that, such as how big the partition is and what's on it now.

I followed the install guide which told me to mount /dev/sda2 (my EFI partition) to /mnt/boot. This one was autogenerated by windows (I assume) and is 100 MB. My root partition is ~300GB, I mounted this (/dev/sda5) to /mnt

Offline

#8 2023-10-06 14:24:46

Nico792
Member
Registered: 2023-09-24
Posts: 18

Re: [SOLVED] mkinitcpio cannot write

V1del wrote:

If you need more advice, mention/post your partition layout/sizes and  what you intend to do with said partitions.

Current full layout is the following:
Device:     |  size     | type
/dev/sda1 |  499M  | Windows recovery enironment // intend to leave be
/dev/sda2 |  100M  | EFI System // If I am to believe the install guide I want my bootloader here
/dev/sda3 | 16M     | Microsoft reserved // intend to leave be
/dev/sda4 | ~600G | Microsoft basic data // intend to leave be
/dev/sda5 | ~300G | Microsoft basic data // intend to make my root
/dev/sda6 |  679M  | Windows recovery environment // intend to leave be

For context I have already formatted sda5 into ext4, dunno why it still says Microsoft

Offline

#9 2023-10-06 14:48:30

Nico792
Member
Registered: 2023-09-24
Posts: 18

Re: [SOLVED] mkinitcpio cannot write

I found the unmount command, unmounted and remounted /dev/sda2 a couple times, redid pacstrap and now it just works. I have no clue what did it, but thank you both anyway for taking time to help me!

Offline

#10 2023-10-06 15:00:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,232

Re: [SOLVED] mkinitcpio cannot write

If you've mounted sda2 away from /boot and to /efi instead, your "/boot" will now be a path on the actual disk having actual free space.

Offline

#11 2024-01-15 15:06:17

wondertx
Member
Registered: 2018-08-10
Posts: 9

Re: [SOLVED] mkinitcpio cannot write

Found that `initramfs-linux-fallback.img` size increases from 70MB to 190MB when upgrading to `linux 6.7.arch3-1`

Offline

#12 2024-01-15 15:07:01

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED] mkinitcpio cannot write

wondertx wrote:

Found that `initramfs-linux-fallback.img` size increases from 70MB to 190MB when upgrading to `linux 6.7.arch3-1`

https://bbs.archlinux.org/viewtopic.php?id=291900


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

Board footer

Powered by FluxBB