Problem installing base and base-devel on Arch

9,383

Alright. Thanks to @immilesahead, it is finally working. Here's what I did:

(1) Restart the computer

(2) Format and erase partitions

(3) Recreate partitions root, home, and boot

(4) Execute:

mkfs.ext4 /dev/sdaX # root partition
mkfs.ext4 /dev/sdaX # home partition
mkfs.fat -F 32 /dev/sdaX # boot partition, UEFI only!

(5) Install the packages again without running pacman -Syy

(6) ???

(7) Profit

Share:
9,383

Related videos on Youtube

Aaron Esau
Author by

Aaron Esau

Updated on September 18, 2022

Comments

  • Aaron Esau
    Aaron Esau almost 2 years

    I recently decided to try out Arch Linux, but I am having problems installing the base and base-devel packages. First, here are my partitions:

    sda2 home 350GB (ext4)
    sda4 root 30GB (ext4)
    sda3 boot 7GB (fat32)
    

    I figured I didn't need a swap partition yet, cause I have 6GB of RAM, which I assume is enough to install Arch. The boot partition is larger than normal because I have ~35GB free space, and based on my research, some were saying that the boot partition was too small.

    Then, after setting the server mirror and mounting the partitions, I synchronized the package databases just to be sure:

    pacman -Syy
    

    And here is where I encountered the first problem. When executing pacstrap -i /mnt base base-devel and selecting all packages, I got these warnings:

    warning: skipping target: file
    warning: skipping target: fileutils
    warning: skipping target: gawk
    warning: skipping target: gettext
    warning: skipping target: grep
    warning: skipping target: gzip
    warning: skipping target: pacman
    warning: skipping target: sed
    warning: skipping target: texinfo
    warning: skipping target: util-linux
    warning: skipping target: which
    

    I thought it was odd, but I decided to proceed with the installation. Then, I got these errors. The first error actually prints about 50 times, but I snipped it to prevent spam:

    error: could not open file /mnt/var/cache/pacman/pkg/vi-1:070224-2-x86_64.pkg.tar.xz.part: Invalid argument
    warning: failed to retrieve some files
    error: failed to commit transaction (failed to retrieve some files)
    Errors occurred, no packages were upgraded.
    ==> ERROR: Failed to install packages to new root
    

    So naturally, I searched on the internet for the error, and a bunch of old forum posts came up. A couple said to make the boot partition larger, which is why it is 7GB instead of 500MB like it was before. Another one said to try changing the server mirror, remove the file /mnt/var/cache/pacman/pkg/vi-1:070224-2-x86_64.pkg.tar.xz.part, and try again. Still, no success.

    None of the solutions I have found work, and I am not sure how to continue. I have done the process a few times, but the problem seems to happen each time. Any help would be greatly appreciated. If you have any questions, feel free to comment!

    Edit: Yup, I do have internet connection.

    • jasonwryan
      jasonwryan almost 8 years
      100MB is sufficient for /boot (unless you are dual booting). Your initial error suggests that you hadn't mounted / on /mnt.
    • Aaron Esau
      Aaron Esau almost 8 years
      @jasonwryan Thanks for the reply! I'm not dual-booting. It should be mounted though. Just in case, here's the mount command I ran: mount /dev/sda4 /mnt. Oh, and ls /mnt suggests it is mounted.
    • maxf
      maxf almost 8 years
      You'll also want to format boot with something like ext4, in case you ever want to use symlinks for e.g. your current kernel. You normally do not synchronize the package database before installing Arch because that will put the database to /var while you want it to be in /mnt/var (except when using -c, but you don't do that during an initial install). Since / is a tmpfs and you put the package db there - how much is still free on it (df -h)?
    • Aaron Esau
      Aaron Esau almost 8 years
      @maxf It says / is airootfs, but there are some tmpfs ones: /dev/shm, /sys/fs/cgroup, /tmp, /etc/pacman.d. But there is 244MB free on /.
    • Aaron Esau
      Aaron Esau almost 8 years
      I just noticed /run/archiso/bootmnt (742MB) and /run/archiso/sfs/airootfs (321MB) are 100% used. Does that matter?