Perfect solution to Linux Startup problems (revised)
Source: Internet
Author: User
Article Title: perfect solution to Linux Startup problems (revised ). 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.
This article provides several solutions to the following two common startup problems: Lilo failure and forgetting the root password:
There are five reference methods for Lilo failure:
1. If there is a boot floppy disk, run lilo and restart it after it is started.
2. Use a CD to boot the system. After the Installation Wizard starts, we can go to another console (Press Ctrl + Alt + F2) and we will see the bash. If your Linux/partition corresponds to/dev/hda3, the file system used is ext2.
Note: # the starting line is the comment line.
Mount-t ext2/dev/hda3/tmp
# (The user of the reiser file system uses reiserfs to replace ext2)
Chroot/tmp
/Sbin/lilo
If you forget the root password, use passwd to modify it.
Remove the disc and start it with the hard disk.
3. In the red flag, use a Windows boot floppy disk to start DOS. Assume that the optical drive is g:, Linux is installed in/dev/hda3, And the Linux installation CD is placed in the optical drive, run the following three commands at the DOS prompt:
G:
Cd \ dosutils \ autoboot
.. \ Loadlin vmlinuz root =/dev/hda3 1 or
.. \ Loadlin vmlinuz root =/dev/hda3 single or
.. \ Loadlin vmlinuz root =/dev/hda3 init =/bin/sh rw
After Linux is started, run/sbin/lilo at the # prompt.
If you forget the root password at the same time, you can use passwd to modify it at the # prompt.
Then restart.
4. Use the Upgrade Method for reinstallation under the red flag. Note that no package is selected. After you run the installation program again, you can fix Lilo.
5. Run the command in Red hat 7.1: Reload the file (but no package is selected, you cannot format the Linux partition, and then reconfigure Lilo). If you forget the root password, remember the password entered during reinstallation.
Solution to forgetting the root password:
If you forget the root password, restart it. At Lilo, the following command is displayed:
Run linux 1 (or linux = single or linux init =/bin/sh rw)
Enter the single-user mode and display bash #. Then run passwd to change the password, then exit, enter the login: location, enter root, and enter the new password. Everything will be OK! For password cracking, refer to methods 2, 3, and 5 above (if Lilo is normal, you do not have to run lilo)
Appendix: After Linux is installed, If DOS and Windows cannot be started (assuming it is installed in/dev/hda1), go to Linux and modify the/etc/lilo. conf file, and add:
Other =/dev/hda1
Label = dos
Save and exit. Execute the lilo command and add the dos option to lilo.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service