LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 11-15-2023, 09:04 PM   #1
murankar
Member
 
Registered: Jan 2008
Location: Cleveland Ohio
Distribution: Current CentOS 5.6
Posts: 118

Rep: Reputation: 20
Install of Arch 2023-11-01 not building right


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

Last edited by murankar; 11-15-2023 at 09:41 PM.
 
Old 11-19-2023, 10:40 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,363

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
The problem is etc is on a sub-volume and attempting to read the fstab before the etc sub-volume is mounted. I don't know if there is way to mount a sub-volume with a kernel option in the grub menu.

A work around, from live iso mount /dev/vda1 to /mnt and copy the /mnt/@etc/fstab to /mnt/@/etc/fstab. The other option would be a reinstall and don't create a sub-volume for etc

Maybe someone will chime in with a better solution.

Last edited by colorpurple21859; 11-22-2023 at 09:37 AM.
 
Old 11-22-2023, 08:56 AM   #3
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,558
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
You kinda want to limit subvolumes to the basics like /(root), /home, and maybe /var. Basically, it's very similar to the setup of an Arch on ZFS install.

Going with too many datasets and subvolumes can cause some weirdness with mounting which is why I actually avoid Btrfs anymore and stuck to JFS for my main system, and will until for the foreseeable future.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bitwarden 2023.9.2 - Problem after upgrade from 2023 9 0 MDKDIO Slackware 10 10-21-2023 06:21 AM
LXer: Arch Linux’s October 2023 ISO Release Brings Linux 6.5, Installer Improvements LXer Syndicated Linux News 0 10-15-2023 03:53 AM
LXer: Arch Linux 2023.08.01 Released with Linux Kernel 6.4 and Archinstall 2.6 LXer Syndicated Linux News 0 08-01-2023 11:12 PM
LXer: Arch Linux’s First ISO Release in 2023 Is Out and It's Powered by Linux Kernel 6.1 LXer Syndicated Linux News 0 01-01-2023 09:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 01:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration