logo
banner banner

Blog Details

Created with Pixso. Home Created with Pixso. Blog Created with Pixso.

Tackling Ubuntu's Common Maintenance Technicalities

Tackling Ubuntu's Common Maintenance Technicalities

2025-01-10

When the Ubuntu installation CD is booted, the trial desktop and the graphical installation interface do not appear. 

Ubuntu is released in two forms: Desktop CD and Alternate CD, which are the graphical interface installation CD and the text-based interface installation CD respectively. The former not only provides the trial function before installing the desktop version of Ubuntu but also offers a graphical installation wizard interface.

This installation is similar to the system restoration process of ghost software, with a relatively fast installation speed. The latter is a standard and authentic installation CD, targeting users with higher and more professional customization requirements for installation.

Therefore, if the user is using the second type of CD, the trial desktop and the graphical installation interface will not show up.

 

After installing Windows, Ubuntu, which was installed prior to Windows, fails to boot.

When installing a dual-boot system of Ubuntu and Windows, Windows should be installed first, followed by Ubuntu. Because when installing two operating systems on a single hard drive, a bootloader like Grub is generally required to let the user choose which operating system to boot at startup.

The Windows installation program does not provide a bootloader such as Grub, while the Ubuntu installation program does. Thus, by installing Ubuntu later, Grub can be correctly written into the master boot record of the hard drive, enabling the correct booting of the dual-boot system.

 

Upon startup, the Ubuntu system directly enters the command-line login interface instead of the graphical login interface.

The Linux system can be started with either a graphical login interface or a command-line login interface, which can be achieved by modifying the text file /etc/inittab.

To start with the graphical login interface, the modification method is as follows: Enter "vi /etc/inittab" in the command-line interface to open the file /etc/inittab, and then change the line "id:3:initdefault" to "id:5:initdefault".

 

On the Ubuntu desktop, when clicking the close button at the upper right corner of the application window, the program does not stop.

Generally, after clicking the close button multiple times, a dialog box will pop up on the desktop, prompting the user that the program has stopped responding and asking whether the user wants to close it. At this point, the user can choose to close the program.

If this prompt dialog box does not pop up after multiple clicks, the user can press the Alt+F2 keys, then enter the "xkill" command and press Enter. At this time, the mouse cursor will turn into the shape of a small skull, and the user can click on the software window to be closed.

 

In the Ubuntu system, the CRT monitor experiences black screen or flickering issues.

A low refresh rate setting of the CRT monitor can cause flickering, making the user's eyes fatigued. On the other hand, if the refresh rate is too high, the monitor will stop working, resulting in a black screen or even damage to the monitor. Under normal circumstances, it is more appropriate to set the refresh rate of the CRT monitor to 85Hz, and it should not be lower than 75Hz.

The setting method is as follows: Enter the "gtf" command in the Linux command-line interface, with parameters for the expected resolution and refresh rate.

For example, if the resolution is 1024×768 and the refresh rate is 85Hz, you can enter the command "gtf 1024 768 85", and then restart the X-Window interface to see the effect.

 

The root password of the Ubuntu system has been forgotten by the user.

If the user has another username with root privileges, they can log in with that username and execute the command "passwd root" to change the superuser password, and then enter the new password according to the on-screen prompts.

If the user does not have any other username with root privileges, the problem can be solved in three steps by booting the system from the installation CD to the single-user mode:

  • First, execute the "vi /etc/passwd" command in the command-line interface to open the /etc/passwd file, and remove the "!" after "root:" in the file;
  • Second, execute the "vi /etc/security/passwd" command in the command-line interface to open the /etc/security/passwd file, and delete the information such as "password=AmMwUe2EQ491U", "lastupdate=1054106568", and "flags=" under "root:";
  • Third, restart the computer and enter the new "passwd root" command to reset the root password.

 

It is impossible to install.rpm software packages in the Ubuntu system.

Software packages with the.rpm extension are supported by Red Hat and its derivative Linux systems. To install a software package named package.rpm in the Ubuntu system, it is necessary to first convert the rpm package to a deb package with the same name using the alien tool.

The specific steps are as follows:

  • First, enter the "sudo apt-get install alien" command in the Ubuntu command-line interface to install the alien tool;
  • Second, enter the "sudo alien package.rpm" command. After completion, a package.deb file will be generated;
  • Third, enter the "sudo dpkg -i package.deb" command to install the converted software package using the dpkg tool.

 

The network card code eth0 is not recognized by the Ubuntu system, and the user cannot access the Internet.

Eth0 is the code for the first network card on the computer. If there are multiple network cards on a computer, the system will use eth0, eth1, eth2, etc. to distinguish different network cards. Under normal circumstances, using the ifconfig command in the command-line interface can display the configuration information of network cards such as eth0.

If the configuration information of eth0 does not show up, it means that the network card has not been recognized by the system. To address this, you can enter the "dhclient eth0" command in the command-line interface to make the system recognize the network card.

 

After mounting a hard drive partition in Ubuntu, the original contents in the mount point directory cannot be found.

Suppose there are two subdirectories, /home/user and /home/ubuntu, originally in the /home directory, and you want to mount the hard drive partition /dev/hda2 to the /home directory.

After mounting, the contents of the partition /dev/hda2 will be displayed in /home, while the original user and ubuntu subdirectories in /home will be temporarily hidden. Once the partition /dev/hda2 is unmounted from the /home directory position, the original user and ubuntu subdirectories in /home will reappear.

 

Unmounting a hard drive partition in Ubuntu fails, and the system prompts that the device is busy.

The reason for the unmounting failure is that a certain process is using a file on the partition, or a certain directory on the partition is open. Usually, closing related programs such as the Shell or changing the relevant directories in use can solve the problem. When there are many users logged into the system, it is sometimes difficult to find the user that is keeping the partition busy.

If you are not in a hurry to unmount the partition, you can try a slow unmount process, that is, enter the "umount -l /whatever" command in the command-line interface. This unmounting method can separate /whatever from the directory tree structure, but all references to the file system can only be cleared when the file system is not busy.

If you are eager to unmount the partition, you can use the "umount -f /whatever" command to force the unmount, but this may cause data loss in the opened files.

 

Hard drive files in Ubuntu have been accidentally deleted, and the user does not know how to recover them.

The Ext3 file system will clear the inode pointers pointing to the deleted files, so it is difficult to retrieve the deleted files. For the Ext2 file system, as long as the file has not been overwritten by new files and the blocks occupied by the deleted file are contiguous, it is possible to recover the deleted file. Suppose the deleted file is /home/chris/myfile.txt, and /home is a separate partition /dev/hda5.

The following steps can be taken to recover the file:

  • Unmount the /home partition by entering the "umount /dev/hda5" command in the command-line interface.
  • Enter the "debugfs /dev/hda5" command to run the debugfs command on this partition.
  • Enter the "ls -ld /home/chris" command at the debugfs prompt to list the deleted files in the directory.

Between the less-than and greater-than signs in front of the file myfile.txt in the list, if the number shown is greater than 0 (such as 115), it indicates that this number is the inode number of the file.

  • Enter the "dump /tmp/myfiledumped.txt" command at the debugfs prompt to restore the deleted file to the /tmp directory and rename it to myfiledumped.txt.
  • Enter the "mount /home" command in the command-line interface to remount the file system, and then you can copy the newly recovered file in the /tmp directory to its original position.

 

In conclusion, for the common maintenance technical problems of Ubuntu in aspects such as system installation, user login, software installation, program operation, and device operation, users can solve them according to the above analysis. For more maintenance methods, users can visit the Ubuntu community website for inquiries.

banner
Blog Details
Created with Pixso. Home Created with Pixso. Blog Created with Pixso.

Tackling Ubuntu's Common Maintenance Technicalities

Tackling Ubuntu's Common Maintenance Technicalities

When the Ubuntu installation CD is booted, the trial desktop and the graphical installation interface do not appear. 

Ubuntu is released in two forms: Desktop CD and Alternate CD, which are the graphical interface installation CD and the text-based interface installation CD respectively. The former not only provides the trial function before installing the desktop version of Ubuntu but also offers a graphical installation wizard interface.

This installation is similar to the system restoration process of ghost software, with a relatively fast installation speed. The latter is a standard and authentic installation CD, targeting users with higher and more professional customization requirements for installation.

Therefore, if the user is using the second type of CD, the trial desktop and the graphical installation interface will not show up.

 

After installing Windows, Ubuntu, which was installed prior to Windows, fails to boot.

When installing a dual-boot system of Ubuntu and Windows, Windows should be installed first, followed by Ubuntu. Because when installing two operating systems on a single hard drive, a bootloader like Grub is generally required to let the user choose which operating system to boot at startup.

The Windows installation program does not provide a bootloader such as Grub, while the Ubuntu installation program does. Thus, by installing Ubuntu later, Grub can be correctly written into the master boot record of the hard drive, enabling the correct booting of the dual-boot system.

 

Upon startup, the Ubuntu system directly enters the command-line login interface instead of the graphical login interface.

The Linux system can be started with either a graphical login interface or a command-line login interface, which can be achieved by modifying the text file /etc/inittab.

To start with the graphical login interface, the modification method is as follows: Enter "vi /etc/inittab" in the command-line interface to open the file /etc/inittab, and then change the line "id:3:initdefault" to "id:5:initdefault".

 

On the Ubuntu desktop, when clicking the close button at the upper right corner of the application window, the program does not stop.

Generally, after clicking the close button multiple times, a dialog box will pop up on the desktop, prompting the user that the program has stopped responding and asking whether the user wants to close it. At this point, the user can choose to close the program.

If this prompt dialog box does not pop up after multiple clicks, the user can press the Alt+F2 keys, then enter the "xkill" command and press Enter. At this time, the mouse cursor will turn into the shape of a small skull, and the user can click on the software window to be closed.

 

In the Ubuntu system, the CRT monitor experiences black screen or flickering issues.

A low refresh rate setting of the CRT monitor can cause flickering, making the user's eyes fatigued. On the other hand, if the refresh rate is too high, the monitor will stop working, resulting in a black screen or even damage to the monitor. Under normal circumstances, it is more appropriate to set the refresh rate of the CRT monitor to 85Hz, and it should not be lower than 75Hz.

The setting method is as follows: Enter the "gtf" command in the Linux command-line interface, with parameters for the expected resolution and refresh rate.

For example, if the resolution is 1024×768 and the refresh rate is 85Hz, you can enter the command "gtf 1024 768 85", and then restart the X-Window interface to see the effect.

 

The root password of the Ubuntu system has been forgotten by the user.

If the user has another username with root privileges, they can log in with that username and execute the command "passwd root" to change the superuser password, and then enter the new password according to the on-screen prompts.

If the user does not have any other username with root privileges, the problem can be solved in three steps by booting the system from the installation CD to the single-user mode:

  • First, execute the "vi /etc/passwd" command in the command-line interface to open the /etc/passwd file, and remove the "!" after "root:" in the file;
  • Second, execute the "vi /etc/security/passwd" command in the command-line interface to open the /etc/security/passwd file, and delete the information such as "password=AmMwUe2EQ491U", "lastupdate=1054106568", and "flags=" under "root:";
  • Third, restart the computer and enter the new "passwd root" command to reset the root password.

 

It is impossible to install.rpm software packages in the Ubuntu system.

Software packages with the.rpm extension are supported by Red Hat and its derivative Linux systems. To install a software package named package.rpm in the Ubuntu system, it is necessary to first convert the rpm package to a deb package with the same name using the alien tool.

The specific steps are as follows:

  • First, enter the "sudo apt-get install alien" command in the Ubuntu command-line interface to install the alien tool;
  • Second, enter the "sudo alien package.rpm" command. After completion, a package.deb file will be generated;
  • Third, enter the "sudo dpkg -i package.deb" command to install the converted software package using the dpkg tool.

 

The network card code eth0 is not recognized by the Ubuntu system, and the user cannot access the Internet.

Eth0 is the code for the first network card on the computer. If there are multiple network cards on a computer, the system will use eth0, eth1, eth2, etc. to distinguish different network cards. Under normal circumstances, using the ifconfig command in the command-line interface can display the configuration information of network cards such as eth0.

If the configuration information of eth0 does not show up, it means that the network card has not been recognized by the system. To address this, you can enter the "dhclient eth0" command in the command-line interface to make the system recognize the network card.

 

After mounting a hard drive partition in Ubuntu, the original contents in the mount point directory cannot be found.

Suppose there are two subdirectories, /home/user and /home/ubuntu, originally in the /home directory, and you want to mount the hard drive partition /dev/hda2 to the /home directory.

After mounting, the contents of the partition /dev/hda2 will be displayed in /home, while the original user and ubuntu subdirectories in /home will be temporarily hidden. Once the partition /dev/hda2 is unmounted from the /home directory position, the original user and ubuntu subdirectories in /home will reappear.

 

Unmounting a hard drive partition in Ubuntu fails, and the system prompts that the device is busy.

The reason for the unmounting failure is that a certain process is using a file on the partition, or a certain directory on the partition is open. Usually, closing related programs such as the Shell or changing the relevant directories in use can solve the problem. When there are many users logged into the system, it is sometimes difficult to find the user that is keeping the partition busy.

If you are not in a hurry to unmount the partition, you can try a slow unmount process, that is, enter the "umount -l /whatever" command in the command-line interface. This unmounting method can separate /whatever from the directory tree structure, but all references to the file system can only be cleared when the file system is not busy.

If you are eager to unmount the partition, you can use the "umount -f /whatever" command to force the unmount, but this may cause data loss in the opened files.

 

Hard drive files in Ubuntu have been accidentally deleted, and the user does not know how to recover them.

The Ext3 file system will clear the inode pointers pointing to the deleted files, so it is difficult to retrieve the deleted files. For the Ext2 file system, as long as the file has not been overwritten by new files and the blocks occupied by the deleted file are contiguous, it is possible to recover the deleted file. Suppose the deleted file is /home/chris/myfile.txt, and /home is a separate partition /dev/hda5.

The following steps can be taken to recover the file:

  • Unmount the /home partition by entering the "umount /dev/hda5" command in the command-line interface.
  • Enter the "debugfs /dev/hda5" command to run the debugfs command on this partition.
  • Enter the "ls -ld /home/chris" command at the debugfs prompt to list the deleted files in the directory.

Between the less-than and greater-than signs in front of the file myfile.txt in the list, if the number shown is greater than 0 (such as 115), it indicates that this number is the inode number of the file.

  • Enter the "dump /tmp/myfiledumped.txt" command at the debugfs prompt to restore the deleted file to the /tmp directory and rename it to myfiledumped.txt.
  • Enter the "mount /home" command in the command-line interface to remount the file system, and then you can copy the newly recovered file in the /tmp directory to its original position.

 

In conclusion, for the common maintenance technical problems of Ubuntu in aspects such as system installation, user login, software installation, program operation, and device operation, users can solve them according to the above analysis. For more maintenance methods, users can visit the Ubuntu community website for inquiries.