You are not logged in.
I made another post a couple of days ago (which no one responded to, unfortunately
) where I asked why trying to generate images for installed kernels resulted in a "no space left on device" error. Well, I found that there actually wasn't any space left on my /boot partition. I deleted one of the kernels, and manually removed an image, which led `dracut` to rebuild successfully. I followed this reddit post and now I'm just waiting for a new kernel to be released so that I can see if it rebuilds everything properly.
I used the `archinstall` script when I installed Arch and chose `systemd-boot` and, since Arch uses `mkinitcpio` as the default initramfs, it has created system images using `mkinitcpio`, so my question is what can I safely remove from /boot?
This is the result of `tree /boot`:
/boot
├── amd-ucode.img
├── EFI
│ ├── BOOT
│ │ └── BOOTX64.EFI
│ ├── Linux
│ │ ├── linux-6.0.9-arch1-1-6cbacb3c969c4299bfa70572a86032d6-rolling.efi
│ │ └── linux-6.0.9-zen1-1-zen-6cbacb3c969c4299bfa70572a86032d6-rolling.efi
│ └── systemd
│ └── systemd-bootx64.efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── initramfs-linux-lts-fallback.img
├── initramfs-linux-lts.img
├── initramfs-linux-zen-fallback.img
├── initramfs-linux-zen.img
├── loader
│ ├── entries
│ │ ├── 2022-11-13_19-12-22_linux.conf
│ │ └── 2022-11-13_19-12-22_linux-lts.conf
│ ├── entries.srel
│ ├── loader.conf
│ └── random-seed
├── vmlinuz-linux
├── vmlinuz-linux-lts
└── vmlinuz-linux-zenThis is the result of `# sbctl verify`:
✓ /boot/EFI/BOOT/BOOTX64.EFI is signed
✓ /boot/EFI/Linux/linux-6.0.9-arch1-1-6cbacb3c969c4299bfa70572a86032d6-rolling.efi is signed
✓ /boot/EFI/systemd/systemd-bootx64.efi is signed
✓ /boot/vmlinuz-linux is signed
✓ /boot/vmlinuz-linux-lts is signed
✓ /boot/vmlinuz-linux-zen is signed
✓ /boot/EFI/Linux/linux-6.0.9-zen1-1-zen-6cbacb3c969c4299bfa70572a86032d6-rolling.efi is signedThis is the result of `# df -h /dev/nvme0n1p1`:
Filesystem Size Used Avail Use% Mounted on
/dev/nvme0n1p1 510M 426M 85M 84% /bootI have uninstalled `mkinitcpio`, since the images created by `dracut` work as they should, so I'd like to remove the unneeded images created by the former in a safe manner.
- Cheers
"Concern should drive us to action and not into depression."
-- Pythagoras
Offline
The brave trail:
1. Create an Arch installer on a USB stick.
2. Backup "/boot" as a tarball to that Arch installer stick.
3. Purge everything that isn't microcode and bootloader.
4. Run the dracut commands according to the wiki (or whatever you've been cooking)
5. Restore boot from your tarball via the Arch installer USB stick in case you killed it.
The still-brave-but-not-as-whack trail:
1. Mount something empty (a ram-disk?) over /boot and run your dracut commands and see what it generates.
I call this one "the lazy scholar":
1. Read the dracut wiki article COMPLETELY.
2. There is a "/usr/local/bin/dracut-install.sh" mentioned in the article with some simple rm commands.
Offline
Which files are okay to remove from /boot when switching to dracut?
None of them.
Both mkinitcpio and dracut create files with the same names, they just use different methods to do so.
Offline
The brave trail:
The still-brave-but-not-as-whack trail:
1. Mount something empty (a ram-disk?) over /boot and run your dracut commands and see what it generates.
I have now created a `tmpfs` by doing `# mount -t tmpfs -o size=2g /boot /mnt/tmp` but running `# dracut --force --uefi` does not create any files inside `/mnt/tmp/` - how can I make it create files in the given dir?
"Concern should drive us to action and not into depression."
-- Pythagoras
Offline
None of them.
Both mkinitcpio and dracut create files with the same names, they just use different methods to do so.
Hmmm... so, basically, I cannot have more than two kernels installed at the same time, unless I expand the size of the /boot partition?
Last edited by telometto (2022-11-21 10:04:58)
"Concern should drive us to action and not into depression."
-- Pythagoras
Offline
That is correct. Some bootloaders support reading from ext4 or btrfs. In those scenarios, you could have your kernel on your root partition in a folder called /boot and mount the ESP elsewhere.
Refer to this article for an overview: Arch_boot_process#Boot_loader
Refer to this article's 4.1 for more about ESP mount points: EFI_system_partition#Mount_the_partition
Last edited by Awebb (2022-11-21 10:26:09)
Offline
Hmmm... so, basically, I cannot have more than two kernels installed at the same time, unless I expand the size of the /boot partition?
It depends. In general, a partition of that size could accommodate more than two kernels. But it obviously depends on the sizes of things, what other files you want and so on. Since I'm using 178M for two kernels, I could certainly install an additional kernel (or two) without exceeding 512M. So it is certainly possible, but whether it is possible for you with your particular needs is obviously a different question.
CLI Paste | How To Ask Questions
Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L
Offline