Article Title: creating a perfect Linux system: solutions to intractable diseases. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
If anyone says that his Linux has never encountered a "difficult problem", I think it is untrusted. Even the most friendly Window XP on the operating interface often encounters various problems, some problems can be solved only by replacing the hardware! Linux is also like this, and its freedom is also increasing the frequency of problems. Of course, it is also because of the open source features of Linux. No matter what the problem occurs, you can find the crux of the problem at the source code level. This is the charm of Linux.
1. Get the root permission without logging on
If the GRUB Password is not set, we can use the simplest method. First, start the computer and wait for the GRUB menu. If the GRUB menu is hidden, Press Esc to bring it up and select Ubuntu, kernel 2.6.12-* (recovery mode), that is, "recovery mode", Press Enter to start.
Another method is to use the Ubuntu installation disk to obtain the root permission and start the computer with the Ubuntu installation disk. When "boot:" is displayed, enter "rescue"
Boot: rescue
Follow the on-screen prompts.
2. Get the root permission by changing the kernel startup parameters
Start the computer and wait for the GRUB menu. If the GRUB menu is hidden, Press Esc to call it up. If the GRUB Password is set, press p to unlock it. For example, if we select Ubuntu, kernel 2.6.12-8-386, press e to edit startup parameters before startup, select kernel/boot/vmlinuz-2.6.12-8-386 root =/dev/hda2 ro quiet splash, press e to edit the selected Start Menu item, and add rw init =/bin/bash at the end of the parameter, that is, change it to the following command line:
Grub edit> kernel/boot/vmlinuz-2.6.12-8-386 root =/dev/hda2 ro quiet splash rw init =/bin/bash
Start by B.
3. the root user/Master user password is missing.
Follow the first item: if you do not log on, after obtaining the root permission, enter the following command in the command line:
Passwd root
Follow the prompts and enter the password twice to set the root user password, as shown in figure 1.
To change the primary user password:
Passwd system_main_username
Follow the prompts and enter the password twice.
4. Forgot the GRUB menu password.
Enter
Grub
After the prompt changes to grub>, enter:
Md5crypt
This is the md5 value of the calculated Password, that is, the encryption value. Then, after prompted Password:, enter the new Password:
Password: ***** (ubuntu)
The system calculates the encryption value:
Encrypted: $1 $ ZWnke0 $1fzDBVjUcT1Mpdd4u/T961
Exit by quit, as shown in Figure 2:
Quit
Then back up and edit the File menu. lst:
Sudo cp/boot/grub/menu. lst/boot/grub/menu. lst_backup
Sudo gedit/boot/grub/menu. lst
Find
...
Password -- md5 $1 $ gLhU0/$ aw78khk11_v3p2b2znuoe/
...
Replace
Password -- md5 $1 $ ZWnke0 $1fzDBVjUcT1Mpdd4u/T961 (this is the encryption value calculated above)
Save the file.
5. Restore the GRUB Startup Menu after installing Windows
It is often the case that we want to reinstall the windows system, but the windows system will overwrite the menu to start Linux. This is a headache. We can solve it as follows:
First, follow the first item to use the Ubuntu installation disk to obtain the root permission. We assume that/dev/hda is the partition where/boot is located, and then input at the prompt:
# Grub-install/dev/hda
In this way, the grub-install program will install the grub menu for us.
6. Read Linux partitions (ext2, ext3) in Windows)
We can use the software Ext2fs to read Linux partitions in Windows. The official homepage of the software is as follows:
7. Some services are too slow to start at startup.
For example, grouping network interfaces... and Synchronizing clock to ntp.w.tulinux.org... it may take a long time to start. For these services, we can use Ctrl + C to temporarily skip the startup of some services.
You can also run the service settings: system> System Management> service, clear and check services such as "Clock Synchronization Service (ntpdate)", and then confirm. 4:
8. Change the system time from UTC (GMT ).
If you enable UTC (GMT) when installing the linux system, the system time is always N hours different from the local time when the Windows partition is restarted. I solve this problem in Ubuntu.
Edit the/etc/default/rcS file and enter the following command in the command line:
Sudo cp/etc/default/rcS/etc/default/rcS_backup
Sudo gedit/etc/default/rcS
Find
...
UTC = yes
...
Replace
UTC = no
Save the file and set it to the correct date and time in system> System Management> date and time, as shown in Figure 5:
Enter the following command restart time in the command line:
Sudo/etc/init. d/hwclock. sh restart
9. Configure sound for Flash
If you play Flash without sound, enter the following command in the command line:
Sudo ln-fs/usr/lib/libesd. so.0/usr/lib/libesd. so.1
10. Forcibly clear the recycle bin
If you have cleared the recycle bin, but there is still garbage, you can run the following command:
Sudo rm-fr $ HOME/. Trash/
The recycle bin of Ubuntu Linux is a hidden folder. Under. Trash/in the main directory, the rm-fr command indicates forced and recursive deletion.
11. Clear repeated items in the GNOME menu
If there are repeated items in the Menu, you cannot delete them directly like in windows. To start the Applications Menu Editor: Application> System Tools> Applications Menu Editor, delete repeated items one by one. 6: