User Tools

Site Tools


linux:troubleshoot:chroot_from_live_system

**This is an old revision of the document!**

Chroot from Live System

Manjaro

pamac install manjaro-tools-base
manjaro-chroot -a
#grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
#grub-probe: error: cannot find a GRUB drive for /dev/sdb1.  Check your device.map.
#==> Mounting (ManjaroLinux) [/dev/nvme0n1p5]
# --> mount: [/mnt]
# --> mount: [/mnt/boot/efi]
# Changed to installed system
pacman -Syu grub
#[...]
#Packages (1) install-grub-2:2.12-3
#
#Total Download Size:   0.01 MiB
#Total Installed Size:  0.01 MiB
#
#:: Proceed with installation? [Y/n] y
#[...]
# EFI system
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
#Installing for x86_64-efi platform.
#Installation finished. No error reported.
grub-mkconfig -o /boot/grub/grub.cfg
#Generating grub configuration file ...
#Found theme: /usr/share/grub/themes/manjaro/theme.txt
#Found linux image: /boot/vmlinuz-6.6-x86_64
#Found initrd image: /boot/amd-ucode.img /boot/initramfs-6.6-x86_64.img
#[...]

Other Linux Systems

Find the system.

sudo wipefs /dev/nvme0n1p5
# DEVICE    OFFSET TYPE UUID                                 LABEL
# nvme0n1p5 0x438  ext4 3899a753-aaaa-46e0-b034-cccccccccccc 
sudo mount /dev/nvme0n1p5 /mnt

Mount special filesystems:

sudo mount -t proc proc /mnt/proc
sudo mount -t sysfs /sys /mnt/sys
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts

Change into the installed system:

chroot /mnt

Unmount the installed system:

sudo umount -r /mnt/dev
sudo umount -r /mnt/dev/pts
sudo umount -r /mnt/proc
sudo umount -r /mnt/sys
sudo umount -r /mnt
linux/troubleshoot/chroot_from_live_system.1735837435.txt.gz · Last modified: by admin