|Home||Switchboard||Unix Administration||Red Hat||TCP/IP Networks||Neoliberalism||Toxic Managers|
|May the source be with you, but remember the KISS principle ;-)|
SUSE LINUX contains a rescue system for accessing your Linux partitions from the outside in the event of an emergency. The rescue system includes several programs with which you can remedy large problems with inaccessible hard disks, misconfigured configuration files, or other similar problems.
The SLES rescue system can be started in different ways. Normally, starting from CD 1 is preferred way.
The rescue system is a Linux system that is completely written to a RAM disk. Therefore, it contains only the most important tools needed to repair your system. To start the rescue system, do the following:
A shell is started without prompting you for a password.
Another component of the rescue system is Parted, which is used for resizing partitions. This program can be launched from within the rescue system, if you do not want to use the resizer integrated in YaST. Information about Parted can be found at http://www.gnu.org/software/parted/.
The rescue system is launched from CD (or DVD). The CD-ROM or DVD drive must be bootable. If necessary, change the boot sequence in the BIOS setup. Proceed as follows to start the rescue system:
Regardless of the medium chosen, the rescue system is decompressed, loaded onto a RAM disk as a new root file system, mounted, and started. Now it is ready for use.
Under Alt-F1 to Alt-F3, the rescue system provides at least three virtual consoles. You can log in as root without a password. Press Alt-F10 to enter the system console displaying the kernel and syslog messages.
A shell and many other useful utilities, such as the mount program, can be found in the /bin directory. The sbin directory contains important file and network utilities for reviewing and repairing the file system, including reiserfsck and e2fsck. This directory also contains the most important binaries for system maintenance, such as fdisk, mkfs, mkswap, mount, mount, init, and shutdown, as well as ifconfig, route, and netstat for maintaining the network. The directory /usr/bin contains the vi editor, grep, find, less, and telnet.
To mount your SUSE LINUX system using the rescue system, use the mount point /mnt. You can also use or create another directory. The following example demonstrates the procedure for a system with the /etc/fstab details shown in Example 5.1. “Example /etc/fstab”.
Example 5.1. Example /etc/fstab
/dev/sdb5 swap swap defaults 0 0 /dev/sdb3 / ext2 defaults 1 1 /dev/sdb6 /usr ext2 defaults 1 2
|Pay attention to the order of steps outlined in the following section for mounting the various devices.|
To access your entire system, mount it step by step in the /mnt directory using the following commands:
mount /dev/sdb3 /mnt mount /dev/sdb6 /mnt/usr
Now, access your entire system and, for example, correct mistakes in configuration files, such as /etc/fstab, /etc/passwd, and /etc/inittab. The configuration files are now located in the /mnt/etc directory instead of in /etc. Before recovering lost partitions with the fdisk program by simply setting them up again, make a printout of /etc/fstab and the output of fdisk -l.
Damaged file systems are tricky problems for the rescue system. Generally, file systems cannot be repaired on a running system. If you encounter serious problems, you may not even be able to mount your root file system and the system boot may end with kernel panic. In this case, the only way is to repair the system from the outside using a rescue system.
The SUSE LINUX rescue system contains the utilities reiserfsck, e2fsck, and dumpe2fs (for diagnosis). These should remedy most problems. In an emergency, man pages often are not available. For this reason, they are included in this manual in B. Manual Page of reiserfsck and C. Manual Page of e2fsck.
If mounting an ext2 file system fails due to an invalid superblock, the e2fsck program would probably fail, too. If this were the case, your superblock may be corrupted, too. There are copies of the superblock located every 8192 blocks (8193, 16385, etc.). If your superblock is corrupted, try one of the copies instead. This is accomplished by entering the command e2fsck -f -b 8193 /dev/damaged_partition. The -f option forces the file system check and overrides e2fsck's error so that, because the superblock copy is intact, everything is fine.
3019_11_manual S E C T I O N 1 1 Use the SLES Rescue System In this section you learn how to use the SLES 9 rescue system.
Use the SLES Rescue System Version 2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by 11-1 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
1. Understand Typical System Failures
2. Use the Rescue System
3. Boot Directly into a Shell
When your system it not booting any longer, the SUSE rescue system can be used to repair the damaged system. You can boot your system directly into a shell. Within this shell, you automatically have root permissions. To prevent unauthorized users from doing this, set a password for GRUB. 11-2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 2 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license. Migrating to SUSE LINUX Objective 1 Understand Typical System Failures Several things can cause failures during system boot. Depending on the cause, the boot process can be interrupted at various points, as described below:
■The boot manager GRUB is needed to load the kernel. If GRUB is damaged, problems will occur at an early stage of the boot process.
In this case, you must reinstall GRUB.
■If you are using a self-compiled kernel, some modules might be missing. An attempt to load missing modules can end with a "kernel panic."
In this case, you should load another kernel to access the system.
xYou should not use a self-compiled kernel, because you lose all support from Novell in this case.
■After the kernel is loaded, it mounts the root file system. If the file system contains errors (for example, due to a system crash where the file systems could not be unmounted cleanly), the system tries to repair these errors.
If the repair fails, you have to run the file system check manually.
■As the last step of the boot process the kernel starts the first process called init. This process starts other processes that start services and mount file systems.
If central configuration files of the system (such as /etc/inittab or /etc/fstab) contain errors, the boot process might terminate at this point, eventually leaving the system in an unusable state.
In this case, the damaged configuration file has to be identified and repaired.
■You can also use the rescue system if the root password is lost. If you do not have root access via SSH authentication keys, you need to use the rescue system to get root access to your system again.
1. Select Rescue System while booting from CD 1.
The rescue system is loaded entirely to the main memory of the system.
2. Select a keyboard map.
Rescue login is displayed.
3. Enter root.
A shell is started without prompting you for a password.
Objective 2 Use the Rescue System
The SLES rescue system can be started in different ways. Normally, starting from CD 1 is preferred way. If your system cannot boot from a CD, you can use a floppy disk to boot the rescue system. x You can use YaST to create a boot disk for systems that cannot boot from a CD. The rescue system is a Linux system that is completely written to a RAM disk. Therefore, it contains only the most important tools needed to repair your system. To start the rescue system, do the following: 11-4 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 2 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license. Migrating to SUSE LINUX
4. To verify that the most important directories with some basic programs are written to a RAM disk in memory, enter
5. To gain access to the installed system, mount the root partitions of your installed system to the mount point /mnt/ of the rescue system, as shown below:
1. Check and repair the root file system.
If the root file system is damaged, you will not be able to mount it to /mnt. In this case, start the appropriate tool (reiserfsck, e2fsck or other, depending on the file system format) to check and repair the file system manually.
If the repair succeeds, reboot the system. It should start without any problem. Depending on what caused the failure of your system, you should do one of the following:
Rescue:~ # df -h Rescue:~ # mount /dev/sda3 /mnt Use the SLES Rescue System Version 2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by 11-5 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
2. Reinstall the boot loader.
If you have to reinstall GRUB, mount your root file system to /mnt and use chroot to change your file system root directory, as shown below:
Using this command, the directory /mnt becomes the new root directory for all subsequently used commands. This command opens a subshell with a chroot environment.
To reinstall the boot loader, use the following commands:
To leave the chroot environment and return to the original environment, enter exit.
Reboot the system to check if the boot loader is working.
3. Edit configuration files.
If some central configuration files have been damaged and prevent the system from booting, you can use the chroot environment to edit these files.
xBe aware that vi is the only editor available.
Rescue:~ # chroot /mnt Rescue:~ # chroot /mnt Rescue:/ # grub --batch </etc/grub.conf Rescue:/ # exit Rescue:/ # 11-6 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 2 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license. Migrating to SUSE LINUX
4. If the root password of your installed system has been lost, you can set a new password using the chroot environment.
To set a new password, change to the new root directory; then enter
1. On the command line, log in as user root with a password of novell.
2. To change the directory, enter cd /boot.
3. To list the content, enter ls -l.
4. To rename the link vmlinuz, enter
mv vmlinuz vmlinux.bak
5. Reboot the computer by entering reboot.
The system does not start properly.
6. Insert the SLES CD 1.
7. Restart the system.
8. Start the SUSE rescue system by selecting Rescue System.
The system boots from CD with the rescue option.
9. Select your language.
10. Log in as user root with a password.
11. Explore the file system and find out what programs are available within the rescue system. Exercise 11-1 Use the SUSE Rescue System To use the SUSE rescue system, complete the following:
passwd Use the SLES Rescue System Version 2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by 11-7 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
12. Mount the root partition of your installed system on /mnt by entering
mount root-partition /mnt
13. To change the directory, enter cd /mnt/boot.
14. Restore the link by entering
mv vmlinux.bak vmlinuz
15. Reboot the system.
It starts again without problems.
■Only the root file system is mounted.
■You have a limited PATH variable.
■You have only US English keyboard layout. (End of Exercise) Objective 3 Boot Directly into a Shell Whether you are using GRUB or LILO as the boot loader, you can boot your system directly into a shell. Within this shell, you automatically have root permissions. To boot directly into the shell Bash, enter the following at the boot prompt of your system: After booting, the system prompt looks like this: You have only a limited environment available:
init=/bin/bash (none):/# 11-8 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 2 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license. Migrating to SUSE LINUX To prevent booting the system into a root shell, you should set a password for GRUB. You should use MD5-encrypted passwords for this. Do the following:
1. To set a password, you first have to generate a password hash as follows:
2. This hash has to copied to the GRUB configuration file, /boot/grub/menu.lst.
To do this, enter the following command in the GRUB shell:
3. Disable the graphical boot menu because it is not working in conjunction with the password feature. In /boot/grub/menu.lst, remove the following line or disable it with a hash sign (#) in the first column:
1. Enter p to be prompted for the password.
2. Enter the correct password.
Now you have access to the GRUB shell. If you start the machine now, you can only select one of the available boot options. To modify the boot options or enter the commands to boot into a shell, perform the following:
DA3:~ # grub grub > md5crypt Password: ****** Encrypted: $1$wwnzf0$1fx7X1QzcR.MnO0Ir5Av4/ grub> quit grub> password --md5 $1$wwnzf0$1fx7X1QzcR.MnO0Ir5Av4/ # gfxmenu (hd0,0)/boot/message Use the SLES Rescue System Version 2 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by 11-9 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license.
3. Set the root device for GRUB (the partition on which the boot loader is located).
For example, if the boot loader is located on the first partition of the first hard disk, use the following:
4. Next define how the kernel is loaded.
You have to provide the partition on which the root file system is located (in this example /dev/sda1 is assumed).
You can specify other parameters for the kernel after the root partition. To boot into a shell, use the following command:
5. Define the initial RAM disk to use by entering the following:
6. Load the kernel and boot your system by entering the following:
The system will boot into a root shell.
grub> root (hd0,0) grub> kernel (hd0,0)/boot/vmlinuz root=/dev/sda1 init=/bin/bash grub> initrd (hd0,0)/boot/initrd grub> boot 11-10 Copyright © 2007 Novell, Inc. Copying or distributing all or part of this manual is protected by Version 2 a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 license. Migrating to SUSE LINUX
1.Understand Typical System Failures
Several things can cause failures during system boot:
■The boot manager GRUB is damaged.
In this case, GRUB has to be reinstalled.
■A self-compiled kernel doesn’t contain all necessary modules and a load attempt ends in a "kernel panic".
In this case, load another kernel to access the system.
■There is an error in the root file system. The system tries to repair these errors and fails.
In this case, run the file system check manually.
■There is an error in one of the central configuration files of the system (e.g. /etc/inittab) and the boot process terminates.
In such a case, the damaged configuration file has to be identified and repaired.
■You lost the root password.
In this case, use the rescue system to get root access to your system again.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available in our efforts to advance understanding of environmental, political, human rights, economic, democracy, scientific, and social justice issues, etc. We believe this constitutes a 'fair use' of any such copyrighted material as provided for in section 107 of the US Copyright Law. In accordance with Title 17 U.S.C. Section 107, the material on this site is distributed without profit exclusivly for research and educational purposes. If you wish to use copyrighted material from this site for purposes of your own that go beyond 'fair use', you must obtain permission from the copyright owner.
ABUSE: IPs or network segments from which we detect a stream of probes might be blocked for no less then 90 days. Multiple types of probes increase this period.
Groupthink : Two Party System as Polyarchy : Corruption of Regulators : Bureaucracies : Understanding Micromanagers and Control Freaks : Toxic Managers : Harvard Mafia : Diplomatic Communication : Surviving a Bad Performance Review : Insufficient Retirement Funds as Immanent Problem of Neoliberal Regime : PseudoScience : Who Rules America : Neoliberalism : The Iron Law of Oligarchy : Libertarian Philosophy
War and Peace : Skeptical Finance : John Kenneth Galbraith :Talleyrand : Oscar Wilde : Otto Von Bismarck : Keynes : George Carlin : Skeptics : Propaganda : SE quotes : Language Design and Programming Quotes : Random IT-related quotes : Somerset Maugham : Marcus Aurelius : Kurt Vonnegut : Eric Hoffer : Winston Churchill : Napoleon Bonaparte : Ambrose Bierce : Bernard Shaw : Mark Twain Quotes
Vol 25, No.12 (December, 2013) Rational Fools vs. Efficient Crooks The efficient markets hypothesis : Political Skeptic Bulletin, 2013 : Unemployment Bulletin, 2010 : Vol 23, No.10 (October, 2011) An observation about corporate security departments : Slightly Skeptical Euromaydan Chronicles, June 2014 : Greenspan legacy bulletin, 2008 : Vol 25, No.10 (October, 2013) Cryptolocker Trojan (Win32/Crilock.A) : Vol 25, No.08 (August, 2013) Cloud providers as intelligence collection hubs : Financial Humor Bulletin, 2010 : Inequality Bulletin, 2009 : Financial Humor Bulletin, 2008 : Copyleft Problems Bulletin, 2004 : Financial Humor Bulletin, 2011 : Energy Bulletin, 2010 : Malware Protection Bulletin, 2010 : Vol 26, No.1 (January, 2013) Object-Oriented Cult : Political Skeptic Bulletin, 2011 : Vol 23, No.11 (November, 2011) Softpanorama classification of sysadmin horror stories : Vol 25, No.05 (May, 2013) Corporate bullshit as a communication method : Vol 25, No.06 (June, 2013) A Note on the Relationship of Brooks Law and Conway Law
Fifty glorious years (1950-2000): the triumph of the US computer engineering : Donald Knuth : TAoCP and its Influence of Computer Science : Richard Stallman : Linus Torvalds : Larry Wall : John K. Ousterhout : CTSS : Multix OS Unix History : Unix shell history : VI editor : History of pipes concept : Solaris : MS DOS : Programming Languages History : PL/1 : Simula 67 : C : History of GCC development : Scripting Languages : Perl history : OS History : Mail : DNS : SSH : CPU Instruction Sets : SPARC systems 1987-2006 : Norton Commander : Norton Utilities : Norton Ghost : Frontpage history : Malware Defense History : GNU Screen : OSS early history
The Peter Principle : Parkinson Law : 1984 : The Mythical Man-Month : How to Solve It by George Polya : The Art of Computer Programming : The Elements of Programming Style : The Unix Hater’s Handbook : The Jargon file : The True Believer : Programming Pearls : The Good Soldier Svejk : The Power Elite
Most popular humor pages:
Manifest of the Softpanorama IT Slacker Society : Ten Commandments of the IT Slackers Society : Computer Humor Collection : BSD Logo Story : The Cuckoo's Egg : IT Slang : C++ Humor : ARE YOU A BBS ADDICT? : The Perl Purity Test : Object oriented programmers of all nations : Financial Humor : Financial Humor Bulletin, 2008 : Financial Humor Bulletin, 2010 : The Most Comprehensive Collection of Editor-related Humor : Programming Language Humor : Goldman Sachs related humor : Greenspan humor : C Humor : Scripting Humor : Real Programmers Humor : Web Humor : GPL-related Humor : OFM Humor : Politically Incorrect Humor : IDS Humor : "Linux Sucks" Humor : Russian Musical Humor : Best Russian Programmer Humor : Microsoft plans to buy Catholic Church : Richard Stallman Related Humor : Admin Humor : Perl-related Humor : Linus Torvalds Related humor : PseudoScience Related Humor : Networking Humor : Shell Humor : Financial Humor Bulletin, 2011 : Financial Humor Bulletin, 2012 : Financial Humor Bulletin, 2013 : Java Humor : Software Engineering Humor : Sun Solaris Related Humor : Education Humor : IBM Humor : Assembler-related Humor : VIM Humor : Computer Viruses Humor : Bright tomorrow is rescheduled to a day after tomorrow : Classic Computer Humor
The Last but not Least
Copyright © 1996-2016 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. This document is an industrial compilation designed and created exclusively for educational use and is distributed under the Softpanorama Content License.
Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.
FAIR USE NOTICE This site contains copyrighted material the use of which has not always been specifically authorized by the copyright owner. We are making such material available to advance understanding of computer science, IT technology, economic, scientific, and social issues. We believe this constitutes a 'fair use' of any such copyrighted material as provided by section 107 of the US Copyright Law according to which such material can be distributed without profit exclusively for research and educational purposes.
This is a Spartan WHYFF (We Help You For Free) site written by people for whom English is not a native language. Grammar and spelling errors should be expected. The site contain some broken links as it develops like a living tree...
|You can use PayPal to make a contribution, supporting development of this site and speed up access. In case softpanorama.org is down you can use the at softpanorama.info|
The statements, views and opinions presented on this web page are those of the author (or referenced source) and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.
Last modified: October 03, 2017