You are not logged in.

#1 2024-08-22 22:56:46

mercad
Member
Registered: 2024-01-08
Posts: 4

[SOLVED] unable to arch-chroot

I recently had a problem with my laptop's grub and I wanted to reconfigure it via chroot, but no matter what I do, it doesn't work. I tried to get into the chroot space via an arch linux bootable usb. Here are my disk specs:

❯ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0 465.8G  0 disk
├─sda1   8:1    0   512M  0 part /boot
├─sda2   8:2    0   100G  0 part /
├─sda3   8:3    0 265.3G  0 part /home
└─sda4   8:4    0   100G  0 part
sdb      8:16   1   7.4G  0 disk
├─sdb1   8:17   1   7.3G  0 part
└─sdb2   8:18   1    32M  0 part
zram0  254:0    0   3.8G  0 disk [SWAP]

As it is known, the EFI partition is sda1, the root partition is sda2, and the home partition is sda3. I entered the following commands:

mount /dev/sda2 /mnt
mount /dev/sda1 /mnt/boot
mount /dev/sda3 /mnt/home

then

arch-chroot /mnt

but the terminal shows this:

[root@archiso /]#_

so it means I'm still on my archiso
Then I also added these commands:

mount -t proc /proc /mnt/proc
mount --rbind /sys /mnt/sys
mount --rbind /dev /mnt/dev

But the problem is still there.
I also tried the normal chroot and it didn't work.

chroot /mnt /bin/bash

Meanwhile, my Arch ISO is the latest version and is healthy. Because I installed Arch on another laptop a few minutes ago
Please help. I have important files!

Last edited by mercad (2024-08-23 20:50:55)

Offline

#2 2024-08-23 07:10:12

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] unable to arch-chroot

No it does not mean that. I just verified this with my own computer, arch-chroot will show exactly what you've seen. Instead on relying on the hostname, you should look around the file system.

Offline

#3 2024-08-23 07:15:25

mercad
Member
Registered: 2024-01-08
Posts: 4

Re: [SOLVED] unable to arch-chroot

Awebb wrote:

No it does not mean that. I just verified this with my own computer, arch-chroot will show exactly what you've seen. Instead on relying on the hostname, you should look around the file system.

So, if the chroot was done correctly, I should have been able to access my system information and files. But none of them are available. I also couldn't install grub as usual.

Offline

#4 2024-08-23 07:38:12

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: [SOLVED] unable to arch-chroot

You made it look like you saw "archiso" as the hostname in the chroot and gave up. Do you have actual error messages indicating that something isn't right?

You don't need the chroot to back up your files. Mounting the drive should be enough.

Offline

#5 2024-08-23 08:11:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,828

Re: [SOLVED] unable to arch-chroot

The lsblk Output suggests tha sda2 ist the current root Partition, so either this is from a successful chroot or you Just booted into the installed system?

Offline

#6 2024-08-23 20:48:59

mercad
Member
Registered: 2024-01-08
Posts: 4

Re: [SOLVED] unable to arch-chroot

Solved thanks!

Offline

#7 2024-08-23 20:50:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,828

Re: [SOLVED] unable to arch-chroot

Solved how?
https://wiki.archlinux.org/title/Genera … way_street

Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

Board footer

Powered by FluxBB