Solutions to common problems in Linux systems

  

1. Get root privileges without logging in.

If you don't set the GRUB password, we can use the easiest way to start the computer and wait for the GRUB menu. If the GRUB menu is hidden, you can press Esc is called, select Ubuntu, kernel 2.6.12-*-* (recovery mode), that is, "recovery mode", press Enter to start it.

Another way is to use the Ubuntu installation disk to obtain root privileges, use the Ubuntu installation disk to start the computer, when the display "ld:; boot:", enter "ldcure";

boot: rescue< Br>

Follow the on-screen instructions.

2, by changing the kernel boot parameters to obtain root permissions

Start the computer, wait for the GRUB menu, if the GRUB menu is hidden, you can press Esc to call out, if you set the GRUB password, press p to unlock For example, we chose Ubuntu, kernel 2.6.12-8-386, press e to edit the boot parameters before starting, select kernel /boot/vmlinuz-2.6.12-8-386 root=/dev/hda2 ro quiet splash, press e Edit the selected boot menu item, add rw init=/bin/bash at the end of the parameter, and change 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

Press b to start.

3, forgot the root user /primary user password

According to the first item: After not logging in, after obtaining root privileges, enter at the command line:

passwd Root Follow the prompts and enter the password twice to set the root password, as shown in Figure 1.




1 To change the master user password:

passwd system_main_username

Follow the prompts, enter the password twice That's it.

4, forgot the GRUB menu password

After the command line input

grub and other prompts become grub>, enter: md5crypt This is the md5 value of the calculation password. That is, the encrypted value, then after prompting Password:, enter the new password: Password: ****** (ubuntu) The system calculates the encrypted value: Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 Press quit to exit, as shown in Figure 2. shows: quit




FIG. 2

and 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

Found

... password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/...< Br>

Replace with

password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (this is the encrypted value we calculated above)

Save the file.

5, restore the GRUB boot menu after installing Windows

It is often the case that we want to reinstall the windows system, but reloading will flush the menu to start Linux, this is a The problem is awkward, let's solve it like this: First, according to the first item, use the Ubuntu installation disk to obtain root privileges. We assume that /dev/hda is the partition where /boot is located, and then type at the prompt:

# grub-install /dev/hda

This grub-install program will install the grub menu for us.

6, read the Linux partition in Windows (ext2, ext3) We can use the software Ext2fs to read the Linux partition in Windows, the official home page of the software:, the download address is: The program interface is shown in Figure 3:





FIG 3



7, boot Some services start too slow

For example, Configuring network interfaces... and Synchronizing clock to ntp.ubuntulinux.org... may take a long time to start. For these services, we can start with Ctrl+C. Temporarily skip the startup of some services

You can also run the service settings: System->System Management->Services, clear the check-out "Clock Synchronization Service (ntpdate)" and other services, and then confirm. As shown in FIG four:




FIG. 4

8, the system time change back from
UTC (GMT)

If you set up UTC (GMT) when you install Linux, then every time you reboot into my windws partition, the system time is always N hours of error with the local time. I solved this problem under Ubuntu.

Edit the file /etc/default/rcS and type it at the command line: sudo cp /etc/default/rcS /etc/default/rcS_backup sudo gedit /etc/default/rcS

find < Br>

... UTC=yes ...

Replace with

UTC=no

Save the file in System->System Management-> date and time, set to the correct date and time, as shown in FIG five:





FIG 5

Enter the following command at the command line to restart the time:

sudo /etc/init.d/hwclock.sh restart

9. Configure the sound for Flash

If you are playing Flash with no sound, type this command at the command line:

sudo ln -fs /usr/lib/libesd.so.0 /usr/lib/libesd.so.1

10. Force emptying the recycle bin

If you have emptied the recycle bin but still have garbage, you can run this command:

sudo rm -fr $HOME/.Trash/< Br>

Ubuntu Linux recycle bin is a hidden folder. Under the .Trash/directory of the home directory, the rm -fr command means mandatory, recursive Deleted.

Copyright © Windows knowledge All Rights Reserved