Manjaro32 cannot be installed on low memory (RAM 512M) devices even with the CLI system.

sudo setup

Total Download Size:    360.97 MiB
Total Installed Size:  1435.62 MiB

:: Proceed with installation? [Y/n] error: Partition / too full: 96614 blocks needed, 77729 blocks free
error: failed to commit transaction (not enough free disk space)

Errors occurred, no packages were upgraded.
==> ERROR: Failed to install packages to new root

I am using manjaro32 on the VPS. The error report seems to be that the memory disk is exhausted. Will swap be useful?
Can I pre-download the package to /var/cache/pacman/pkg/ of the ISO image when compiling the ISO image?
It seems that setting up a local source does not help.
My VPS instance has been discontinued, and VPS instances of similar specifications are twice as expensive.

That doesn't look like it is saying you memory is full, it looks like your disk is nearly full. What does df -h show you?

 df -h
Filesystem      Size  Used Avail Use% Mounted on
dev             196M     0  196M   0% /dev
run             214M   85M  130M  40% /run
/dev/sr0        1.8G  1.8G     0 100% /run/miso/bootmnt
cowspace        256M     0  256M   0% /run/miso/cowspace
overlay_root    321M   17M  304M   6% /run/miso/overlay_root
/dev/loop0       81M   81M     0 100% /run/miso/sfs/livefs
/dev/loop1      110M  110M     0 100% /run/miso/sfs/mhwdfs
/dev/loop2     1004M 1004M     0 100% /run/miso/sfs/desktopfs
/dev/loop3      492M  492M     0 100% /run/miso/sfs/rootfs
overlay         321M   17M  304M   6% /
tmpfs           214M     0  214M   0% /dev/shm
tmpfs           214M     0  214M   0% /sys/fs/cgroup
tmpfs           214M  232K  214M   1% /tmp
tmpfs           214M  5.8M  208M   3% /etc/pacman.d/gnupg
tmpfs            43M     0   43M   0% /run/user/1000
/dev/vda2        20G   25M   19G   1% /mnt
/dev/vda2        20G   25M   19G   1% /mnt/home

It seems that just tmpfs is not enough.

That look weird - you have mounted /dev/vda2 on both root and home.

After I formatted the file system and mounted it, the manjaro installation failed……
So the mount point becomes like this.:joy:
I found that the installer will download the package to the ramdisk instead of the already mounted hard drive... this is awful.:joy:
I don't have enough memory to store the package.:sob:
Perhaps this is a defect of pacman.:thinking:

Pacman is called by the architect installer script which - if you prepared the disk correctly - will download the packages to the mounted device in e.g. the device is mounted in /mnt then pacman will download packages to /mnt/var/cache/pacman/pkg.

When all packages are downloaded they will be checked and installed to their system locations.

So I do not think it is an issue with neither architect nor pacman but more that you did not mount it so you are installing to the iso.

This is too strange. When I mount the second hard drive to /var/cache/pacman/pkg/ I can continue to install it. I think I should confirm where the package was downloaded during the installation.

cat /usr/bin/manjaro-architect
if [[ -e /run/miso/bootmnt ]]; then
        hostcache=false
        cachepath="/mnt/var/cache/pacman/pkg/"
else
        hostcache=true
        cachepath="/var/cache/pacman/pkg/"
fi
main_menu

This is very interesting, I just assign the variable hostcache to false and the installer will download the package to the hard disk?
It doesn't look like this, but I just need to delete some statements, I can complete the installation, right?:stuck_out_tongue_winking_eye:

Modifying /usr/bin/manjaro-architect doesn't seem to work, 11 Choose pacman cache doesn't seem to control hostcache.

See here

In fact, I was not told that I did not meet the installation requirements.

Manjaro can easily run a raspberry pi with 512MB RAM this is no problem.

Using Calamares installer can pose a problem if the system does not have 1GB memory. This can be changed by editing the corresponding module before running the installer.

As I understand - you are installing to a VPS - but why are you using 32-bit?

All cloudproviders is 64-bit - at least I have no knowledge of anyone providing 32-bit - so you should be able to use the default architect iso.

It seems to me you are complicating the installing - but that may just be me - not understanding what is going on.

You also mention a second harddrive? I can only see the cd drive, the miso mounts and one vda partition namely vda2.

The hostcache is only a flag to architect installer whether to draw the initial packages from the ISO or download them all on install.

With an online system I prefer to disable the hostcache.

My VPS can add additional storage instances (such as the second hard drive), I use manjaro32 because the 32-bit system has lower memory overhead (although I know the x86-64 instruction set is faster), I don't know how to disable the hostcache, and no matter how I try, the installer will download the package to the ramdisk.:sob:

This is an option in the architect installer during installation preparation. This option is automatically set or unset based on installation type.

I can install the 64bit version with ease on a 512MB - 1 CPU virtual machine with 10GB disk so unless you have a very specific goal it is a vaste of time to experiment with 32-bit.

CORRECTION: normally - but there is an issue with the architect installer throwing an error about not enough diskspace.

UPDATE: I can no longer install Manjaro on a system with less than 1GB RAM.

UPDATE2: I can install a base Arch system with 512MB RAM.

UPDATE3: Architect works if I up the memory to 1GB

1 Like

It seems to be a malfunction of the Architect installer.:thinking:

Before launching the architect installer edit the script

/usr/bin/basestrap

Locate the line with ${hostcache} && and change it

if [[ ${hostcache} == "false" ]]; then
    pacman_args+=(--cachedir="$newroot/var/cache/pacman/pkg")
fi

Then you can run your installer.

2 Likes
$ sudo setup
/usr/bin/basestrap: line 99: 16416 Killed                  pacman -r "$newroot" -Sy "${pacman_args[@]}"
==> ERROR: Failed to install packages to new root

There seems to be some problems.

I have verified the solution on a 32-bit VM with 1 CPU 512MB RAM, 8GB disk where 512MB is used for swapfile.

As setup will install an update to manjaro-tools-base package - you should run the setup at least once before editing the basestrap script.

I used the xfce image from manjaro32 on osdn.

  • edit grub commandline to boot to CLI (3)
  • run setup once and let it update the installer and exit installer
  • update the keyrings
sudo pacman -Syy archlinux-keyring manjaro-keyring
sudo pacman-key --populate archlinux manjaro
  • edit the basestrap script
    • the easy way is to add a exclamation mark at the beginning of the hostcache line
! ${hostcache} && pacman_args+=(--cachedir="$newroot/var/cache/pacman/pkg")
  • Rerun the installer

Logs:

1 Like

Great, this change is right!

However, I have a problem, manjaro-architect will not configure the network for the target system? I got a warning when I configured the network with manjaro-architect, but the warning was too fast for me to see, and it didn't seem to be recorded in /var/log/m-a.log.

cat /var/log/m-a.log 

    :: manjaro-architect 0.9.29-1 ::

09/06/19 12:41:17 system: BIOS, init: systemd nw-client: nmtui 

    :: manjaro-architect 0.9.29-1 ::

09/06/19 12:41:33 system: BIOS, init: systemd nw-client: nmtui 

    :: manjaro-architect 0.9.29-1 ::

09/06/19 12:45:04 system: BIOS, init: systemd nw-client: nmtui 
09/06/19 12:45:05 set LANG=en_US.UTF-8
09/06/19 12:45:05 set font ter-116n 
09/06/19 12:45:05 loadkeys us 
09/06/19 12:45:19 refresh database 
09/06/19 12:45:28 loadkeys us 
09/06/19 12:45:33 rm 2 on /dev/vda 
09/06/19 12:45:33 rm 1 on /dev/vda 
09/06/19 12:45:33 /dev/vda is 
09/06/19 12:45:33 /dev/vda mklabel msdos 
09/06/19 12:45:33 create ext3 513MiB on /dev/vda 
09/06/19 12:45:33 set boot flag for /dev/vda 
09/06/19 12:45:33 create ext3 100% on /dev/vda 
09/06/19 12:45:39 --------- [lsblk] ------------
09/06/19 12:45:39 /dev/vda1 512M
09/06/19 12:45:39 /dev/vda2 19.5G
09/06/19 12:45:39 /dev/vdb1 20G
09/06/19 12:45:39 already mounted: sr0
09/06/19 12:45:39 ignore crypted: 
09/06/19 12:45:42 mount /dev/vda2 as mkfs.btrfs -f. 
09/06/19 12:45:42 create mountpoint /mnt 
09/06/19 12:45:45 mount /dev/vda2 autodefrag,noatime,nossd
09/06/19 12:45:51 already mounted: sr0
vda2
09/06/19 12:49:26 refresh pacman-keys
09/06/19 12:50:19 clone profiles repo Cloning into '/usr/share/manjaro-architect/profiles'...
09/06/19 12:50:21 selected: linux419
09/06/19 12:50:22 filter_packages 
09/06/19 12:50:22 packages to install: acpi acpid amd-ucode archlinux32-keyring b43-fwcutter bash btrfs-progs bzip2 coreutils cpupower crda cronie cryptsetup device-mapper dhclient dhcpcd diffutils dmraid dnsmasq dosfstools e2fsprogs ecryptfs-utils efibootmgr exfat-utils f2fs-tools file filesystem findutils gawk gcc-libs gettext glibc grep gzip haveged inetutils intel-ucode iproute2 iptables iputils ipw2100-fw ipw2200-fw jfsutils less licenses linux419 linux-firmware logrotate lsb-release lvm2 man-db manjaro-firmware manjaro-release manjaro-system man-pages mdadm memtest86+ mhwd mhwd-db mkinitcpio-openswap nano nfs-utils nilfs-utils ntfs-3g os-prober pacman pciutils perl procps-ng psmisc reiserfsprogs rsync sed shadow s-nail spectre-meltdown-checker sudo sysfsutils systemd-fsck-silent systemd-sysvcompat tar texinfo tlp usbutils util-linux vi wget which wpa_supplicant xfsprogs zsh 
09/06/19 12:51:53 install basepkgs 
09/06/19 12:51:53 configure vconsole
09/06/19 12:51:54 root on btrfs volume. Amend mkinitcpio.
09/06/19 12:52:03 re-run mkinitcpio 
09/06/19 12:52:03 base installed succesfully.
09/06/19 13:03:54 setup_network_drivers free 
09/06/19 13:04:07 pull profiles repo 
09/06/19 13:04:12 selected: "yay + base-devel" linux419
09/06/19 13:04:12 filter_packages 
09/06/19 13:04:13 packages to install: acpi acpid amd-ucode archlinux32-keyring b43-fwcutter base-devel bash btrfs-progs bzip2 coreutils cpupower crda cronie cryptsetup device-mapper dhclient dhcpcd diffutils dmraid dnsmasq dosfstools e2fsprogs ecryptfs-utils efibootmgr exfat-utils f2fs-tools file filesystem findutils gawk gcc-libs gettext glibc grep gzip haveged inetutils intel-ucode iproute2 iptables iputils ipw2100-fw ipw2200-fw jfsutils less licenses linux419 linux-firmware logrotate lsb-release lvm2 man-db manjaro-firmware manjaro-release manjaro-system man-pages mdadm memtest86+ mhwd mhwd-db mkinitcpio-openswap nano nfs-utils nilfs-utils ntfs-3g os-prober pacman pciutils perl procps-ng psmisc reiserfsprogs rsync sed shadow s-nail spectre-meltdown-checker sudo sysfsutils systemd-fsck-silent systemd-sysvcompat tar texinfo tlp usbutils util-linux vi wget which wpa_supplicant xfsprogs yay zsh 
09/06/19 13:05:10 install basepkgs 
09/06/19 13:05:10 configure vconsole
09/06/19 13:05:10 root on btrfs volume. Amend mkinitcpio.
09/06/19 13:05:20 re-run mkinitcpio 
09/06/19 13:05:20 base installed succesfully.
09/06/19 13:13:49 setup_network_drivers free 
09/06/19 13:13:54 bios_bootloader
09/06/19 13:14:40 grub-install --target=i386-pc warning: os-prober-1.76-2 is up to date -- skipping
09/06/19 13:14:40 bios_bootloader grub
09/06/19 13:16:38 generate_fstab 
09/06/19 13:16:40 set_hostname 
09/06/19 13:16:50 set_locale 
09/06/19 13:17:00 set_timezone Asia/Shanghai 
09/06/19 13:17:02 set_hw_clock 
09/06/19 13:17:12 set_root_password New password: Retype new password: passwd: password updated successfully
09/06/19 13:17:20 default shell: [/usr/bin/zsh]
09/06/19 13:17:30 add user to groups 
09/06/19 13:17:31 create user pwd New password: Retype new password: passwd: password updated successfully
09/06/19 13:18:27 install_cust_pkgs vim ==> Creating install root at /mnt
09/06/19 13:18:42 install_cust_pkgs openssh ==> Creating install root at /mnt
09/06/19 13:19:22 setup_network_drivers free 
09/06/19 13:19:39 Auto-install free drivers 
09/06/19 13:19:42 setup_network_drivers free 
09/06/19 13:19:47 Auto-install free drivers 
09/06/19 13:19:54 setup_network_drivers free 
09/06/19 13:20:11 exit installer.
09/06/19 13:20:13 unmount /mnt/home 
09/06/19 13:20:13 unmount /mnt

As you were able to install - your network must have been recognized at some point.

That is outside what I can test.

Forum kindly sponsored by Bytemark