Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
7
rated 0 times [  7] [ 0]  / answers: 1 / hits: 2459  / 2 Years ago, tue, december 14, 2021, 9:20:38

I have two partitions on my PC, each with Ubuntu 20.04 installed (separately). One of them has gone south, something related to graphics drivers and maybe also the bootloader. Is it possible to change things for the malfunctioning version from the one that still works? Such as uninstalling certain things, or changing the graphics driver? (I do not seem able to enter recovery mode, maybe because this is an old Macbook Air.)


I'm relatively new to Ubuntu so would appreciate baby step style guidance.


[UPDATE: the first answer below is exactly what I was looking for. I don't think the other answer that has been suggested as a "duplicate" is helpful. It's tangential, that's all.]


More From » grub2

 Answers
4

If you're able to boot to another Ubuntu system, you can chroot to your root partition.


Check which partition you're using for your broken installation. I'll use /dev/sdb3 in this example. Replace the value of the root variable below:


root=/dev/sdb3
cd /
sudo mkdir /mnt/repair
sudo mount "$root" /mnt/repair
sudo mount -t proc proc /mnt/repair/proc
sudo mount -t sysfs sys /mnt/repair/sys
sudo mount -o bind /dev /mnt/repair/dev

You may need to mount /boot and /boot/efi. Simply use sudo mount /dev/sdb2 /mnt/repair/boot where /dev/sdb2 is the boot partition.


Now, to chroot, use this:


sudo chroot /mnt/repair

You're now logged in as root in your broken Ubuntu installation.
You can now do anything you want to repair your system.


Once you're done, use the following commands to clean up:


# Make sure there are no processes running in your chroot session
# Then, exit
exit
sudo umount /mnt/repair/{proc,sys,dev}
sudo umount /mnt/repair

Reference


[#2015] Wednesday, December 15, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
bblerest

Total Points: 240
Total Questions: 119
Total Answers: 113

Location: Wallis and Futuna
Member since Mon, May 18, 2020
4 Years ago
bblerest questions
Sun, Apr 16, 23, 13:50, 1 Year ago
Fri, Nov 4, 22, 06:21, 2 Years ago
Tue, Sep 27, 22, 12:22, 2 Years ago
;