1 line
3.8 KiB
Plaintext
1 line
3.8 KiB
Plaintext
<!-- SC_OFF --><div class="md"><p><code>grub-mkconfig: line 261: /boot/grub/grub.cfg.new: no such file or directory</code></p> <p>I do not understand this problem, here is my script:</p> <p><code>echo This is a script to install Arch automatically, make sure to have booted into an efi vm</code></p> <p><code>echo Also please make sure to have partitioned the disks using tools such as cfdisk -tui- or fdisk -commandline-</code></p> <p><code>#make the file systems</code></p> <p><code>mkfs.ext4 /dev/sda3</code></p> <p><code>mkswap /dev/sda2</code></p> <p><code>mkfs.fat -F 32 /dev/sda1</code></p> <p>​</p> <p><code>#mount root and swap</code></p> <p><code>mount /dev/sda3 /mnt</code></p> <p><code>swapon /dev/sda2</code></p> <p>​</p> <p><code>#install needed packages in new install</code></p> <p><code>pacstrap /mnt base linux linux-firmware linux-headers vim networkmanager sudo git grub os-prober efibootmgr xdg-user-dirs</code></p> <p><code>#mount efi</code></p> <p><code>mkdir /mnt/boot/efi</code></p> <p><code>mount /dev/sda1 /mnt/boot/efi</code></p> <p><code>#generate the fstab</code></p> <p><code>genfstab -U /mnt >> /mnt/etc/fstab</code></p> <p><code>#all things in chroot (cant add comments in code)</code></p> <p>​</p> <p><code>cat << EOF | sudo arch-chroot /mnt</code></p> <p><code>ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime</code></p> <p><code>hwclock --systohc</code></p> <p><code>sed -i "s/#en_GB/en_GB/g; s/#en_US.UTF-8/en_US.UTF-8/g" /etc/locale.gen</code></p> <p><code>echo "LANG=en_GB.UTF-8" > /etc/locale.conf</code></p> <p><code>locale-gen</code></p> <p><code>echo -e "arch" > /etc/hostname</code></p> <p><code>echo -e "</code><a href="https://127.0.0.1"><code>127.0.0.1</code></a><code>\tlocalhost" >> /etc/hosts</code></p> <p><code>echo -e "::1\t\tlocalhost" >> /etc/hosts</code></p> <p><code>echo -e "</code><a href="https://127.0.1.1"><code>127.0.1.1</code></a><code>\tarch" >> /etc/hosts</code></p> <p><code>mkinitcpio -P</code></p> <p><code>systemctl enable NetworkManager</code></p> <p><code>useradd -m -g users -G wheel,games,power,optical,storage,scanner,lp,audio,video,input,adm,users -s /bin/bash max</code></p> <p><code>echo -en "12345\n12345" | passwd</code></p> <p><code>echo -en "12345\n12345" | passwd max</code></p> <p><code>sed -i "s/^# %wheel/%wheel/g" /etc/sudoers</code></p> <p><code>tee -a /etc/sudoers << END</code></p> <p><code>END</code></p> <p><code>mkdir -p /etc/X11/xorg.conf.d && tee <<'END' /etc/X11/xorg.conf.d/90-touchpad.conf 1> /dev/null</code></p> <p><code>Section "InputClass"</code></p> <p><code>Identifier "touchpad"</code></p> <p><code>MatchIsTouchpad "on"</code></p> <p><code>Driver "libinput"</code></p> <p><code>Option "Tapping" "on"</code></p> <p><code>EndSection</code></p> <p><code>END</code></p> <p><code>os-prober</code></p> <p><code>grub-mkconfig -o /boot/grub/grub.cfg</code></p> <p><code>grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB</code></p> <p><code>su max</code></p> <p><code>cd</code></p> <p><code>xdg-user-dirs-update</code></p> <p><code>EOF</code></p> <p><code>#chroot exited</code></p> <p><code>#unmount all partitions</code></p> <p><code>umount -a</code></p> <p>​</p> <p>​</p> <p>​</p> <p>Any help appreciated!</p> </div><!-- SC_ON -->   submitted by   <a href="https://www.reddit.com/user/max12mx13"> /u/max12mx13 </a> <br/> <span><a href="https://www.reddit.com/r/archlinux/comments/q8most/problem_with_grub_in_autoinstall_script_that_i/">[link]</a></span>   <span><a href="https://www.reddit.com/r/archlinux/comments/q8most/problem_with_grub_in_autoinstall_script_that_i/">[comments]</a></span> |