Install of Arch 2023-11-01 not building right
by murankar from LinuxQuestions.org on (#6GDKY)
Following this post are the steps I am following to install Arch with btrfs on MBR/Bios install. doing a single partition setup. The ultimate goal is to get a manageable base system for a Panasonic cf52 toughbook. I joind the Arch forum and was met with basic rudeness. Not here to bash that community I know when I am not welcome. Anyhow my issue is that after the system is rebooted after arch-chroot and I unmount the system and reboot. Grub boots the system just fine from what I can tell. Once the system is booted and just before I log in I am asked to set locale and root password (this is not normal behavior for Arch). Then it asked me to log in. I do and I get the following prompt
-bash-5.2#
I have a limited set of tools to use and pacman is not one of them. my user account is not there and my fstab is empty. I check fstab prior to leaving arch-chroot and the file was there as it should.
This is my first attempt at btrfs and I am still not sure what i am doing wrong. It appears the file system is not mounting correctly or only partially. Hopefully I can get more help here than I did earlier. I am practicing this build on a vm before taking it to the laptop. I want to make sure my steps correct for what I am trying to do before going live.
I am not running this as a script. Its for copy and paste. I have done this to many times with failure and got tired of typing.
#test network
ip add
ping -c 5 8.8.8.8
#update system clock
timedatectl
#Update mirrorlist
reflector --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
#Test for UEFI
#Output of 32 or 64 indicates UEFI is active
cat /sys/firmware/efi/fw_platform_size
#List Storrage devices
lsblk
#MBR/Bios
cfdisk /dev/vda
#GPT UEFI
gdisk /dev/vda
#partion the disk as needed using GPT
#Build the file system
mkfs.btrfs -f -L / /dev/vda1
#mount the root file system
mount /dev/vda1 /mnt
#Create btrfs subvolumes
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@etc
btrfs subvolume create /mnt/@opt
btrfs subvolume create /mnt/@var
btrfs subvolume create /mnt/@logs
btrfs subvolume create /mnt/@snapshots
#Unmount sda
umount /mnt
#Remount vda with subvolumes
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ /dev/vda1 /mnt
#create the directories that will use the subvolumes created earlier
mkdir -p /mnt/{home,var,etc,opt,logs,.snapshots}
#mount subvolumes to their directories
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home /dev/vda1 /mnt/home
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@etc /dev/vda1 /mnt/etc
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@opt /dev/vda1 /mnt/opt
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@var /dev/vda1 /mnt/var
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@var /dev/vda1 /mnt/logs
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@snapshots /dev/vda1 /mnt/.snapshots
mount /dev/sda1 /mnt/boot
#Install the bare base system
pacstrap -K /mnt base linux linux-headers linux-firmware git nano vim
genfstab -L /mnt >> /mnt/etc/fstab
arch-chroot /mnt
cat /etc/fstab
nano /etc/mkinitcpio.conf
#update modules section with MODULES=(btrfs,amdgpu)
mkinitcpio -P linux
mkinitcpio -P linux-lts
#base install
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
sed -i '171s/.//' /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "arch-vm" >> /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 arch.localdomain arch-vm" >> /etc/hosts
echo root:PASSWORD | chpasswd
# You can add xorg to the installation packages, I usually add it at the DE or WM install script
# You can remove the tlp package if you are installing on a desktop or vm
pacman -S --noconfirm grub-btrfs networkmanager network-manager-applet xdg-user-dirs dialog wpa_supplicant mtools dosfstools reflector base-devel bison curl linux-headers avahi xdg-user-dirs xdg-utils gvfs gvfs-smb nfs-utils inetutils dnsutils bluez bluez-utils cups hplip alsa-utils pulseaudio bash-completion openssh rsync reflector acpi acpi_call tlp ufw edk2-ovmf bridge-utils dnsmasq vde2 openbsd-netcat ipset nss-mdns acpid os-prober ntfs-3g terminus-font man-db
# pacman -S --noconfirm xf86-video-amdgpu
# pacman -S --noconfirm nvidia nvidia-utils nvidia-settings
grub-install --target=i386-pc /dev/vda # replace sdx with your disk name, not the partition
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable cups.service
systemctl enable sshd
systemctl enable avahi-daemon
systemctl enable tlp # You can comment this command out if you didn't install tlp, see above
systemctl enable reflector.timer
systemctl enable fstrim.timer
#systemctl enable libvirtd
#systemctl enable firewalld
systemctl enable acpid
systemctl enable grub-btrfsd
useradd -m matt
echo matt:PASSWORD | chpasswd
usermod -aG wheel matt
#uncomment %wheel with visudo
-bash-5.2#
I have a limited set of tools to use and pacman is not one of them. my user account is not there and my fstab is empty. I check fstab prior to leaving arch-chroot and the file was there as it should.
This is my first attempt at btrfs and I am still not sure what i am doing wrong. It appears the file system is not mounting correctly or only partially. Hopefully I can get more help here than I did earlier. I am practicing this build on a vm before taking it to the laptop. I want to make sure my steps correct for what I am trying to do before going live.
I am not running this as a script. Its for copy and paste. I have done this to many times with failure and got tired of typing.
#test network
ip add
ping -c 5 8.8.8.8
#update system clock
timedatectl
#Update mirrorlist
reflector --latest 10 --sort rate --save /etc/pacman.d/mirrorlist
#Test for UEFI
#Output of 32 or 64 indicates UEFI is active
cat /sys/firmware/efi/fw_platform_size
#List Storrage devices
lsblk
#MBR/Bios
cfdisk /dev/vda
#GPT UEFI
gdisk /dev/vda
#partion the disk as needed using GPT
#Build the file system
mkfs.btrfs -f -L / /dev/vda1
#mount the root file system
mount /dev/vda1 /mnt
#Create btrfs subvolumes
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@etc
btrfs subvolume create /mnt/@opt
btrfs subvolume create /mnt/@var
btrfs subvolume create /mnt/@logs
btrfs subvolume create /mnt/@snapshots
#Unmount sda
umount /mnt
#Remount vda with subvolumes
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@ /dev/vda1 /mnt
#create the directories that will use the subvolumes created earlier
mkdir -p /mnt/{home,var,etc,opt,logs,.snapshots}
#mount subvolumes to their directories
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@home /dev/vda1 /mnt/home
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@etc /dev/vda1 /mnt/etc
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@opt /dev/vda1 /mnt/opt
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@var /dev/vda1 /mnt/var
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@var /dev/vda1 /mnt/logs
mount -o noatime,space_cache=v2,compress=zstd,ssd,discard=async,subvol=@snapshots /dev/vda1 /mnt/.snapshots
mount /dev/sda1 /mnt/boot
#Install the bare base system
pacstrap -K /mnt base linux linux-headers linux-firmware git nano vim
genfstab -L /mnt >> /mnt/etc/fstab
arch-chroot /mnt
cat /etc/fstab
nano /etc/mkinitcpio.conf
#update modules section with MODULES=(btrfs,amdgpu)
mkinitcpio -P linux
mkinitcpio -P linux-lts
#base install
ln -sf /usr/share/zoneinfo/America/New_York /etc/localtime
sed -i '171s/.//' /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" >> /etc/locale.conf
echo "arch-vm" >> /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 arch.localdomain arch-vm" >> /etc/hosts
echo root:PASSWORD | chpasswd
# You can add xorg to the installation packages, I usually add it at the DE or WM install script
# You can remove the tlp package if you are installing on a desktop or vm
pacman -S --noconfirm grub-btrfs networkmanager network-manager-applet xdg-user-dirs dialog wpa_supplicant mtools dosfstools reflector base-devel bison curl linux-headers avahi xdg-user-dirs xdg-utils gvfs gvfs-smb nfs-utils inetutils dnsutils bluez bluez-utils cups hplip alsa-utils pulseaudio bash-completion openssh rsync reflector acpi acpi_call tlp ufw edk2-ovmf bridge-utils dnsmasq vde2 openbsd-netcat ipset nss-mdns acpid os-prober ntfs-3g terminus-font man-db
# pacman -S --noconfirm xf86-video-amdgpu
# pacman -S --noconfirm nvidia nvidia-utils nvidia-settings
grub-install --target=i386-pc /dev/vda # replace sdx with your disk name, not the partition
grub-mkconfig -o /boot/grub/grub.cfg
systemctl enable NetworkManager
systemctl enable bluetooth
systemctl enable cups.service
systemctl enable sshd
systemctl enable avahi-daemon
systemctl enable tlp # You can comment this command out if you didn't install tlp, see above
systemctl enable reflector.timer
systemctl enable fstrim.timer
#systemctl enable libvirtd
#systemctl enable firewalld
systemctl enable acpid
systemctl enable grub-btrfsd
useradd -m matt
echo matt:PASSWORD | chpasswd
usermod -aG wheel matt
#uncomment %wheel with visudo