Welcome to the Linux Foundation Forum!

Need additional help with labs of lesson 36

Hello,

I need additional help to perform labs in lesson 36, system rescue.

First, as instructed in lab 36.1, I have downloaded an installation image "ubuntu-20.04.5-desktop-amd64.iso" from the "https://releases.ubuntu.com/focal/ubuntu-20.04.5-desktop-amd64.iso" link. Then I load the image into VM's "CD/DVD" drive, setting it up as the startup disk. Subsequently, I reboot the system while holding down the "shift" key, which eventually takes me to the following screen upon selecting options for system rescue.

In addition to the above, I have tried to boot from VM's hard disk while selecting recovery mode on system startup. As a result, the system booted into two different scenarios depending on corruption of the "/boot/grub/grub.cfg" file, as instructed in lab 36.2.

Scenario one, shown in the following screens, is with the corrupted "/boot/grub/grub.cfg" file.

Scenario two, shown in the following screens, is with the uncorrupted "/boot/grub/grub.cfg" file.

Please provide additional guidance to perform these labs.

Thank you,
Amar

Best Answer

  • luisviveropena
    luisviveropena Posts: 1,249
    Answer ✓

    Hi @cloud4amar and @zforero, I did the test with Ubuntu 20.04 and I found that I can boot the rescue image. The specific issue in this case, is that the rescue image doesn't have any text editor, so we are able to get to a terminal, but unable to edit file grub.cfg.

    So, I downloaded Gparted from https://gparted.org/ , used it as iso for booting the VM on Virtualbox, booted in to Gparted, mounted the associated partition where /boot/grub is, edited the file (as the distro has text editors), rebooted into Ubuntu and it worked :)

    I hope that helps.

    Regards,
    Luis.

Answers

  • Hi Amar, I think that in case one we're supposed to use an usb to recover GRUB. I'm not too sure if the VM will recognize the USB automatically as a boot media instead of using the image that you load into it as a CD/DVD.
    I will try also try to do the lab in a VM and will let you know the results.

  • Hello @luisviveropena.

    Thank you. With your explanation of the process, I completed all the exercises successfully using both Gparted and installation image "ubuntu-20.04.5-desktop-amd64.iso."

    However, I have one further clarification regarding "Lab 36.3 - Recovering from Password Failure."

    Anyone with system access can change the root user's password via rescue/recovery mode and chroot-ed environment. Isn't that a security concern?

    Thank you,
    Amar

  • coop
    coop Posts: 916

    Anyone with system access can change the root user's password via rescue/recovery mode and chroot-ed environment. Isn't that a security concern?

    Yes, once they have physical access the battle is pretty much lost unless you encrypt the filesystem. You can require a password with GRUB as well but that sometimes can be defeated as well as long as you can boot from media. This is why many folks are encrypting disks during install (it is hard to do later)

  • @coop, thank you for the clarification.

Categories

Upcoming Training