You are not logged in.
hi,
Installing Arch Linux was really fun & I really enjoyed it a lot. Reading the manual and then implement it was great. Well one thing that is confusing me is that at the start of Arch Linux installation the prompt was
[root@archiso ~] #
during installation we switch the regular prompt by using "arch-chroot"
[root@archiso ~] # arch-chroot /mnt
now prompt is
[root@archiso /]#
The thing which I want to clear is that why we use "arch-chroot" for the further installation process? Do we want to isolate the installation process? Is it just like chroot "jail" What is the logic behind it in Arch Linux installation?
Thanks in advance.
Last edited by gardenair (2021-09-25 13:43:19)
Offline
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Short answer: During installation you're (still) booted into the archiso (installation medium).
Last edited by dogknowsnx (2021-09-24 08:46:00)
Offline
very simple but powerful answer .Yes first we use Arch iso prompt then eventually we switch into "arch-chroot". s the Arch wiki tell that
"The bash script arch-chroot is part of the arch-install-scripts package. Before it runs /usr/bin/chroot, the script mounts API filesystems like /proc and makes /etc/resolv.conf available from the chroot. "
Can someone elaborate it in more more simple way ?
Last edited by gardenair (2021-09-24 09:49:35)
Offline
You need to chroot into the new install to do things like install a bootloader. That can not be done without a chroot first.
Offline
Try doing what you'd do within the chroot without it and observe the results. Take a special look at symlinks, locale-gen and other things that assume your / to be the one of your future system and not that of the installer.
Offline
Well, I try to install Arch Linux and this time I do not switch into
arch-chroot @ /mnt.
I continue my installation using the archiso prompt i.e
root@archiso ~ #
It gave me an error when I write the command for grub installation.
root@archiso ~ #grub-install /dev/sda
installing for i386-pc platform.
grub-install:error:failed to get canonical path of 'airootfs'
It stopped at grub due to the non-availability of the correct installation path for /dev/sda. It was all due to not switching into
# arch-chroot /mnt
which was just an experiment that why Arch Linux use "arch-chroot.
Yes, it is a bash script that works in the background & loads stuff for the users to help the installation process.
https://ibb.co/JR33wYh
Offline
The grub installation may have been the first step that produced an error message, but several other steps failed to do what was intended, and even if grub installed correctly, the newly installed system would not likely boot and would be broken from the start.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline