twiikker Posted July 9, 2019 Share Posted July 9, 2019 (edited) Hello. Here is my commands which i've now used multiple times to install archlinux as VM inside Unraid with EFI. Currently on unraid version: 6.9.0-beta25 and on AMD system. Tell me if there is any problems with it. NEW: There is nowdays guided install script in latest arch isos. So you can also run archinstall and it is much simpler method. Tested it with I440fx-5.1/Q35-5.1 and systemd-boot on archlinux-2021.10.01-x86_64.iso Add VM --> Select Arch Machine: I440fx-5.1 or Q35-5.1 BIOS: OVMF Select OS Install ISO Primary vDisk Size: 20G Select keyboard layout! CREATE Connect to VM NEW: At this point you can run command: archinstall guided installation method. You can install minimal desktop and do GUI installation step from guide to get same lxde desktop or choose another from desktop installation method. localectl list-keymaps #lists all keymaps loadkeys fi #your keymap fi/en/swe etc whatever you want ls /sys/firmware/efi/efivars #checks if efi is enabled ping google.com #check that you have connection timedatectl set-ntp true #sets ntp fdisk -l #lists disks gdisk /dev/vda #open gdisk on your virtual drive ------------- gdisk /dev/vda ------------------ n(enter) >> enter >> enter >> +550M(enter) >> EF00(enter) #efi partition n(enter) >> enter >> enter >> +18G(enter) >> enter #linux partition 18G for 20GB vDisk 28G for 30GB vDisk etc n(enter) >> enter >> enter >> enter >> 8200(enter) #swap partition, rest of disk as swap w+y #writes changes --------------------------------------------------------- mkfs.fat -F32 /dev/vda1 #formats efi partition mkfs.ext4 /dev/vda2 #formats linux parition e2label /dev/vda2 "arch_os" #labels vda2 as arch_os mkswap /dev/vda3 #formats swap partition swapon /dev/vda3 #sets swap partiton mount /dev/vda2 /mnt #mounts linux partition to /mnt mkdir /mnt/boot #makes boot folder inside /mnt mount /dev/vda1 /mnt/boot #mounts efi partition to /mnt/boot pacstrap /mnt base #installs arch to /mnt genfstab -U /mnt >> /mnt/etc/fstab #generated fstab arch-chroot /mnt #changes root location to /mnt aka where just installed arch timedatectl list-timezones #list available timezones timedatectl set-timezone Europe/Helsinki #set your zone as default hwclock --systohc #sets hardware clock pacman -S nano #installs nano text editor nano /etc/locale.gen #remove comment mark (#) infront of your preferred language locale-gen #generates locales nano /etc/vconsole.conf #open/create file ------- /etc/vconsole.conf ---------- KEYMAP=fi #sets keyboard layout, CTRL+X >> y >> enter --------------------------------------------------- nano /etc/hostname #open/create file -------- /etc/hostname --------------- archlinux #sets hostname for your machine, CTRL+X >> y >> enter -------------------------------------------------- nano /etc/hosts #open/create file ------ /etc/hosts ----------------------- 127.0.0.1 localhost ::1 localhost 127.0.1.1 archlinux.workgroup archlinux #CTRL+X >> y >> enter ------------------------------------------------- pacman -S linux linux-firmware dhcpcd #installs linux package, press 1 on question, linux-firmware and dhcpcd pacman -S amd-ucode #intel-ucode for intel systems passwd #sets password for root bootctl install #installs efi bootmgr nano /boot/loader/loader.conf #bootloader config ------ /boot/loader/loader.conf ----------------- default arch.conf timeout 4 console-mode max editor no #CTRL+X >> y >> enter ------------------------------------------------- nano /boot/loader/entries/arch.conf #boot options for arch ------ /boot/loader/entries/arch.conf ----------- title Arch Linux linux /vmlinuz-linux initrd /amd-ucode.img #/intel-ucode.img for intel systems initrd /initramfs-linux.img options root="LABEL=arch_os" rw #CTRL+X >> y >> enter ------------------------------------------------- exit #exits arch-chroot reboot #reboots system ip link #to find ethernet port dhcpcd ens1 #set dhcp up ping google.com #test connection -------------- GUI installation start --------------------- pacman -S lxde #installs lxde (you can install whatever GUI you want) #optional apps pacman -S firefox #installs firefox pacman -S transmission-gtk #installs transmission GUI systemctl enable lxdm #enables lxdm service nano /etc/lxdm/lxdm.conf #opens lxdm config session=/usr/bin/startlxde #edit session to match as following (uncomment it) reboot setxkbmap fi #inside gui enviroment sets your keymapping -------------- GUI installation end --------------------- dhcpcd ens1 #if you dont have network systemctl enable dhcpcd@ens1 #creates startup service for ens3 pacman -Syy #update package list pacman -Su #install updates #optional: user creation for sudoing useradd -m -s /bin/bash arch #creater new user, arch is username passwd arch #sets password for arch pacman -S sudo #installs sudo package EDITOR=nano visudo #edit sudo config arch ALL=(ALL) ALL #add this line with your username under root ALL=(ALL) ALL and CTRL+X >> y >> enter reboot #reboot DONE twiikker Edited October 14, 2021 by twiikker 2 3 Quote Link to comment
hkgnp Posted December 28, 2019 Share Posted December 28, 2019 Thanks mate! Will try this tonight. Quote Link to comment
bphillips330 Posted February 13, 2020 Share Posted February 13, 2020 I tried this install. Stil having the same errors I have had. I have installed arch a million time on a physical box. But the issue I am having via unraid. I reboot the vm and I come to a grub: prompt. Can't do anything. if I type exit, i get the EFI bios screen. can't get vm to boot. Any advice? Quote Link to comment
juan11perez Posted February 13, 2020 Share Posted February 13, 2020 (edited) Perhaps you'd like to take a look at the archlabs xfce iso. The final product has no bloatware and it just works! Edited February 13, 2020 by juan11perez Quote Link to comment
twiikker Posted February 14, 2020 Author Share Posted February 14, 2020 Nothing comes to my mind. I have passed grub screen by waiting it out succesfully every time. Quote Link to comment
twiikker Posted February 14, 2020 Author Share Posted February 14, 2020 Seems that this guide is not working on latest archlinux iso anymore... I'll see if i can figure it out. Quote Link to comment
twiikker Posted February 14, 2020 Author Share Posted February 14, 2020 Updated guide to work with latest arch build. Quote Link to comment
tknx Posted February 29, 2020 Share Posted February 29, 2020 I got stuck on the grub prompt when I rebooted. Quote Link to comment
twiikker Posted February 29, 2020 Author Share Posted February 29, 2020 (edited) You wrote those updated commands without UPDATE: ? Edited February 29, 2020 by twiikker Quote Link to comment
tknx Posted February 29, 2020 Share Posted February 29, 2020 Yes - I excluded the UPDATE lines... Also the initial command on keymaps doesn't seem to work for 02.01. ls /usr/share/kbd/keymaps/**/*.map.gz #lists all keymaps Anyway, just did it again and it seems to work! 1 Quote Link to comment
twiikker Posted February 29, 2020 Author Share Posted February 29, 2020 Glad that it worked. Maybe you missed something from list. "mkinitcpio -p linux" didnt work without "pacman -S linux" on latest builds and brought me on grub promt also. I'll just remove those update notes from commands that they won't lead people to skip those. Have to take look on that initial command. Quote Link to comment
tknx Posted February 29, 2020 Share Posted February 29, 2020 Another slight modification: Replace: [root@archlinux]# hwclock --systohc #sets hardware clock [root@archlinux]# locale-gen #generates locales With the following: [root@archlinux]# hwclock --systohc #sets hardware clock [root@archlinux]# nano etc/locale.gen #edit locale gen file remove comment on relevant locale line (e.g., en-US UTF-8) [root@archlinux]# locale-gen #generates locales Quote Link to comment
twiikker Posted March 2, 2020 Author Share Posted March 2, 2020 Thanks for input. Found new command as initial command and that locale thing is nicer way to set them Quote Link to comment
tknx Posted July 7, 2020 Share Posted July 7, 2020 Another change I found when installing. a new fresh arch VM grub-install --target=x86_64-efi --efi-directory=/mnt/boot --boot-directory=/mnt/boot --bootloader-id=grub #installs grub arch-chroot /mnt #back to /mnt root pacman -S grub #installs grub package to installation the grub-install command won't be found. You need to install grub first. Quote Link to comment
juan11perez Posted July 8, 2020 Share Posted July 8, 2020 sharing an installation script i put together. basic installation with options to install xfce and plasma. https://github.com/juan11perez/Arch-Installer download and run the download.sh script. Quote Link to comment
lasagnacrab Posted July 9, 2020 Share Posted July 9, 2020 Great guide, thanks! Just got mine up and running using this. 1 Quote Link to comment
twiikker Posted July 9, 2020 Author Share Posted July 9, 2020 On 7/7/2020 at 9:13 PM, tknx said: Another change I found when installing. a new fresh arch VM grub-install --target=x86_64-efi --efi-directory=/mnt/boot --boot-directory=/mnt/boot --bootloader-id=grub #installs grub arch-chroot /mnt #back to /mnt root pacman -S grub #installs grub package to installation the grub-install command won't be found. You need to install grub first. Gonna take a look on this after i get my server upgrade up and running. Still waiting some extra parts Quote Link to comment
twiikker Posted July 20, 2020 Author Share Posted July 20, 2020 Updated this now. Seems like they are ripping more tools from install media so we need to install them. Quote Link to comment
twiikker Posted August 20, 2020 Author Share Posted August 20, 2020 Updated this to use Q35-5.0 and systemd-boot Quote Link to comment
BiGBaLLA Posted August 25, 2020 Share Posted August 25, 2020 Thanks for keeping this updated! I really appreciate it. I feel like I'm adding a different vm every month or so. Only note, you may want to update the two comments for the intel options that are pointing to amd. #/intel-ucode.img for amd systems Quote Link to comment
twiikker Posted August 25, 2020 Author Share Posted August 25, 2020 1 hour ago, BiGBaLLA said: Thanks for keeping this updated! I really appreciate it. I feel like I'm adding a different vm every month or so. Only note, you may want to update the two comments for the intel options that are pointing to amd. #/intel-ucode.img for amd systems Thanks! Had those ucode thigys other way around and missed rest of comment Quote Link to comment
SavageAUS Posted September 28, 2020 Share Posted September 28, 2020 I've tried installing the xf86-video-qxl to improve graphics in the vm i created but when i install that package i boot to a black screen. Any suggestions? Quote Link to comment
twiikker Posted September 28, 2020 Author Share Posted September 28, 2020 14 minutes ago, SavageAUS said: I've tried installing the xf86-video-qxl to improve graphics in the vm i created but when i install that package i boot to a black screen. Any suggestions? I think that qxl in unraid and qxl inside VM are completely separate thing. Like qxl in unraid connects straight to KVM engine and not to the OS. And when you installed that package inside VM it distrupted the connection somehow. For fixing it you could try to boot into install media mount disks like in guide, chroot to /mnt and remove that qxl package. Quote Link to comment
SavageAUS Posted September 28, 2020 Share Posted September 28, 2020 I already did that, I was hoping for suggestions to improve performance. Sent from my iPhone using Tapatalk Quote Link to comment
twiikker Posted September 28, 2020 Author Share Posted September 28, 2020 I haven't had need to improve vnc performance as it is better than what i would even need so i don't have anything on that, sorry. 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.