In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
What are the four scenarios of Suse9 fault repair? many beginners are not very clear about this. In order to help you solve this problem, the following editor will explain it in detail. People with this need can come and learn. I hope you can get something.
As Suse is more and more accepted by the majority of users, along with the problems follow, this time we are talking about Suse9 troubleshooting. This article aims at four scenarios of Suse9 fault repair: grub is destroyed, files in boot partition are mistakenly deleted, boot program is destroyed and password is changed and can not enter the system. I hope that through this article, it will be helpful for you to learn Suse9 fault repair.
Note: Suse9 can also boot into the system when there is no fstab, so if the fstab is deleted by mistake, it can be restored directly.
Scenario 1:grub is destroyed (including: menu.lst,stage2...)
Linux:/boot/grub # fdisk-l
Disk / dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/ dev/sda1 * 1 1020 8193118 + 83 Linux
/ dev/sda2 1021 1151 1052257 + 82 Linux swap
Destroy grub
Rm-rf / boot/grub/*
Reboot the system, report error 15, and put the cd1 of SUSE into the CD-ROM drive
Choose "Manual Installation"
Choose "Start Installation or system"
Choose "Start Installation or update"
Choose "CDROM"
Choose "boot installed system"
Put the cd2 of SUSE into the optical drive
Mount:
Mount / dev/hdc / media/cdrom
Install grub:
Rpm-ivh grub-0.94-45.3.i586.rpm-force
Enter the grub operation interface:
Grub
Root (hd0,0)
Setup (hd0)
Vi / boot/grub/menu.lst
Title linux for pushmail
Root (hd0,0)
Kernel / boot/vmlinuz-2.6.5-7.244-smp
Initrd / boot/initrd
Reboot
Scenario 2) the contents of the / boot partition are completely emptied, including: (kernel,initrd,grub.)
Linux:/boot/ # rm-rf *
Reboot
Put cd1 into cdrom
Choose "Manual Installation"
Choose "Start Installation or system"
Choose "Start Installation or update"
Choose "CDROM"
Choose "boot installed system"
Put cd2 into cdrom
Mount / dev/hdc / media/cdrom
Rpm-ivh kernel-smp-2.6.5-7.97.i586.rpm
Rpm-ivh grub-0.94-45.3.i586.rpm-force
Vi / boot/grub/menu.lst
Title linux for pushmail
Root (hd0,0)
Kernel / boot/vmlinuz-2.6.5-7.244-smp
Initrd / boot/initrd
Reboot
Scenario 3) MBR is corrupted, excluding partitioned tables
Dd if=/etc/passwd f=/dev/sda bs=446 count=1
Reboot
Put the cd1 into the optical drive
Choose rescue system
Enter grub
Root (hd0,0)
Setup (hd0)
Quit
Reboot
Case 4) suse recovers the root password:
1. Restart the machine, after the grub boot interface appears, add init=/bin/bash to the option to start linux, by passing the init=/bin/bash parameter to the kernel to make OS run bash before running the login program, a command line appears.
two。 Wait a moment (none) #: command line.
3. At this point, typing mount-n /-o remount,rw means that the root file system will be re-mount to read and write, and once you have read and write permission, you can change the password through the passwd command.
4. At this point, enter the passwd command to reset the password.
5. Remember to use mount-n /-o remount,ro to set the root file system to its original state after modification.
Summary:
1) if the partition table is not corrupted, it can be recovered.
2) the order of system boot loading is:
MBR: identify the partition used for booting. The bootstrap size of .MBR can be viewed on the system through fdisk. The size of the bootstrap is 446 bytes, and the next 64 bytes are 16 bytes, 4 bytes, and 5 bytes, respectively.
In the case of grub as the bootstrap, the contents of the MBR boot record are consistent with / boot/grub/stage1. First (446) bytes
The stage1 file works only when resuming the installation of grub, not during each boot. Therefore, it can be deleted.
The bootstrap program of MBR is destroyed. You can enter the grub mode through the rescue CD and restore it. See scenario 3.
2.2) Boot partition: the boot partition loads stage1.5,stage2.0 and menu.lst, etc. Note that the stage1.5 file is the physical address of the disk, that is, it exists at the front of the disk (boot partition).
After changing the physical location, you cannot boot. You need to reinstall grub, as shown in scenario 3.
2.3) execute the sysinit script. Load fstab files and so on.
3) * the boot partition has nothing to do with whether it is mounted or not. The system can start even if it is commented out in fstab, because the boot partition only works after the mbr bootstrap program is executed, but not after the sysinit script takes over the execution stream.
Two tips:
1. Check the SUSE version.
two。 Change the encryption of a user's password
SUSE system:
Query version number
Lsb_release-a
Or cat / etc/SuSE-release
Suse changes the password encryption method of the user
Linux:/etc/default # more passwd
# This file contains some information for
# the passwd (1) command and other tools
# creating or modifying passwords.
# Define default crypt hash
# CRYPT= {des,md5,blowfish}
CRYPT=des
# Use another crypt hash for group passwowrds.
# This is used by gpasswd, fallback is the CRYPT entry.
# GROUP_CRYPT=des
Change CRYPT=md5
Just save and exit.
Note:
There can be three types of encryption authentication at the same time:
For example:
User An is des
User B is md5
User C is blowfish
When customers log in to the system, they can log in to the system using user An or user B or user C, respectively.
There are three different ciphertexts for users in the shadow file.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.