Ubuntu 22.04.1 related: User permissions, ACPI Error, system disk installation, Boot-Repair


I. Introduction

Recently, because an experiment required the Ubuntu environment, I reinstalled it and encountered many unexpected problems. These problems and corresponding solutions are now recorded as follows.

Original environment: Ubuntu 20.04.3
Target environment: Ubuntu 22.04.1


Two, the text

1. Permission issues

After creating a new user, granting administrator rights fails. The granting method [1] is as follows:

sudo usermod -aG sudo userName

After granting permissions, an error occurred that the user was not in the sudoers directory, so I looked for another way to grant permissions [2]:

sudo vim /etc/sudoers

Add the paragraph at the position shown:

sudo vim /etc/sudoers


2. ACPI Error: Needed type [Reference]

When the author updated gdb (Tsinghua mirror source, time 2022/10/27)

apt-get install gdb # GNU debugger

The system issued an error report. Since similar situations have occurred before, I did not pay attention to it. When the installation was complete and restarted, it was found that the system could not be started, and the following error occurred:

[     0.077414] x86/cpu: VMX (outside TXT) disabled by BIOS
[     0.109098] ACPI Error: Needed type [Reference], found [Integer] 000000003136b36 (0201113/exresop-66)
[     0.109137] ACPI Error: AE_AML_OPERAND_TYPE, while resolving operands for [Store] (20201113/dswexec-431)
[     0.109189] Aborting method  \.PR.CPU0._PDC due to previous error(AE_AML_OPERAND_TYPE) (20201113/psparse-529)

So based on the principle of STFW, I went to Google the problem and successfully found a similar post on the Manjaro Linux Forum [3]. The answer in the post gave the solution as shown in the screenshot below [3]. In addition, other answers under this post also explained that the problem may be caused by the BIOS version, and the solution is only to forcefully ignore the error, but cannot eradicate it.
PS: In fact, this solution did not solve my problem, but it made me understand the cause of the error.
Insert image description here


3. Make system disk

After going through question 2, the solution I got can only avoid (ignore) the error and make the system run normally, rather than actually solving the error, so I decided to use open source Ubuntu resources and existing hardware resources (U disk) to make a homemade system disk. To reinstall the system, follow the steps [4].
PS: In fact, I should have made my own system installation disk when I first came into contact with Linux, but since my roommate had a ready-made installation disk, I skipped this step and now go back to making it.

Step 1: Download the Ubuntu22.04.1 image file.
Step 2: Use U disk and ultraISO tool to create system disk [5].
Steo 3: Insert the prepared system disk into the target device and load the system.

Since there are many tutorials on this topic on the Internet, I won’t go into details here.


4. symbol ‘grub_calloc’ not found && grub/i386-pc/normal.mod not found

As mentioned, unknown errors will always cause a series of errors, especially errors that cannot be completely solved by oneself.

After making the boot disk and inserting it, I expected to be able to reinstall the system smoothly, but I didn’t expect that the first error occurred after entering the system installation disk:

symbol 'grub_calloc' not found

After Google, I found that this was another error that I couldn't understand, but at least there was a solution [6]. In the process, I hoped to solve the problem without using tools, so I made modifications according to the steps on the web page. Unexpectedly, it appeared after the operation. Got another error:

grub/i386-pc/normal.mod not found

I can't even get into the command line interface at this point. After that, I also continued STFW and found a solution [7], but it was not applicable to my situation, and I also found more errors [8].

At this point, in order to quickly move to the next step, I can only use the tool Boot-Repair recommended by many answers to solve the problem. Proceed as follows:

Step1: First, you need to prepare a USB flash drive and write the tool to the USB flash drive. The process is the same as the above-mentioned process of making a boot disk, so I won’t go into details here.

Step2: Start the target device to enter the BIOS interface, use the prepared U disk as the boot disk to start the system, you will see the interface as shown below (the picture comes from an answer in [6]): Press the enter key to select the

first options

Step3: Select No in the first window after entering. You do not need to get the latest version here, and then you will enter the following window. Generally, select the first option to start the repair.
PS: If an error occurs: please disable bios-compatibility/csm/legacy mode , please see the supplementary section below.

Insert image description here

Step 4: After the repair is completed, you can restart and use the Ubuntu system disk created before to perform the installation operation.

For more operational details, please refer to the original website [9]


4.Supplement

If you encounter the error please disable bios-compatibility/csm/legacy mode during the repair process , the solution is as follows (take Lenovo T540p as an example, please find the corresponding item by yourself if the brand is different):

Step1: Press F12 when booting to enter the BIOS interface, and enter the Setup interface in the App Menu

Insert image description here

Step2: Find the UEFI/Legacy Boot option under the Startup column, as shown in the figure below, press "+" to change the default option to UEFI Only.

Insert image description here
Insert image description here

Step3: Change the default option of subordinates' CSM Support to No.

Insert image description here

Step4: Enter the Restart column and select Exit Saving Changes, save all changes and exit.

Insert image description here
After completing the above steps, run the Boot-Repair tool again to repair it correctly.


3. Reference catalog

  1. linux add users and set the home directory, shell and grant permissions (take fedora and ubuntu as examples)
  2. Ubuntu adds users and sets super administrator permissions
  3. [4.14][4.15] ACPI Error: Needed type [Reference], found [Integer] ASUS K55VM MOBO
  4. Ubuntu 22.04 installation (clear disk and install) tutorial
  5. Complete tutorial on creating a USB bootable disk using UltraISO (Software Disk Pass)
  6. How to fix a grub boot error : "symbol ‘grub_calloc’ not found
  7. How to fix grub/i386-pc/normal.mod not found
  8. grub filesystem is fat
  9. Boot-Repair

Guess you like

Origin blog.csdn.net/weixin_45704680/article/details/127558152