Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GETTING CHROOT on arch linux.
- Mostly use this:
- https://forum.artixlinux.org/index.php/topic,103.0.html
- Text with my updates:
- #-------------------------------#
- # Standard chroot #
- #-------------------------------#
- First, I used an old LiveDVD/CD from 2019. This is 2020. It works just fine.
- This command manually Identify and Prepare the Installed Partition(s)
- 1. Open your terminal and start a root session: su
- 2. List all your partitions: lsblk -f (commandlinekid update: was /sda3)
- 3. Mount your system partition. The syntax to mount the system partition is: mount /dev/[partition_to_mount] /mnt
- Example: if the system partition is /dev/sda3, this will be mounted using the following command: mount /dev/sda3 /mnt if a separate partition /dev/sda1 has been used for the GRUB, mount it with the following command: mount /dev/sda1 /mnt/boot
- 4. Change to the root directory of your mounted partitions: cd /mnt
- To complete the operation, and to mount completely the file system, it will be necessary to enter a series of commands in the following order:
- mount -t proc proc /mnt/proc
- mount -t sysfs sys /mnt/sys
- mount -o bind /dev /mnt/dev
- mount -o bind /run /mnt/run
- mount -t devpts pts /mnt/dev/pts/
- cp /etc/resolv.conf /mnt/etc/resolv.conf
- chroot /mnt
- DONE and now you are positioned on the chroot-ed file system, where all your command will act.
- #---------------------------------#
- # LUKS Partition chroot #
- #---------------------------------#
- 1) Boot with a liveUSB
- 2) Open a Terminal session
- 3) Identify the hd partition: lsblk
- In this example I suppose that:
- /dev/sda1 is the /boot partition
- /dev/sda2 is the LUKS encrypted partition
- NOTE: replace sda1 or sda2 with the partition name that you get with the lsblk command
- $ su
- $ cryptsetup open --type luks /dev/sda2 root # where sda2 is the encrypted device
- $ mount /dev/mapper/root /mnt
- $ mount /dev/sda1 /mnt/boot # mount here the boot partition
- $ mount -t proc proc /mnt/proc
- $ mount -t sysfs sys /mnt/sys
- $ mount -o bind /dev /mnt/dev
- $ mount -o bind /run /mnt/run
- $ mount -t devpts pts /mnt/dev/pts
- $ cp /etc/resolv.conf /mnt/etc/resolv.conf
- $ chroot /mnt
- commandlinekid update (chroot DID work, but if not, try arch-chroot)
- commandlinekid update (if chroot /mnt doesn't work, do this: chroot /mnt /bin/bash)
- THEN RUN THESE TWO COMMANDS:
- pacman Syu
- mkinitcpio -p linux
- Then reboot
- (second command I got from here: https://www.soimort.org/notes/170407/)
Add Comment
Please, Sign In to add comment