Changes

Jump to: navigation, search

Lab 3 Warnings / Debrief

3,970 bytes added, 12:36, 5 October 2015
no edit summary
If you cannot log graphically into your machine (first 3 common problems), there is a trick to boot your system into '''single-user''' mode. This mode does not provide networking, graphics, or logging in as other regular users, but can connect to a text-based interface as the '''root''' user. This method will only work if a GRUB (<u>'''Gr'''</u>and '''<u>U</u>'''nified <u>'''B'''</u>oot-loader) password has not been set, or that you haven't forgotten the GRUB password.
 
 
 
 
'''Steps to Boot into "Single-User Mode":'''
 
{| width="50%" align="right" cellpadding="10"
|- valign="top"
|
[[Image:grub2_1.png|thumb|right|600px|Add the boot option '''single''' and then press '''ctrl-x''' to boot into single user mode]]
|}
#Boot-up your '''centos1''' VM. '''when the Grub Boot menu appears''', press the letter <b><code><span style="color:#3366CC;font-size:1.2em;">e</span></code></b> (for "edit").
#Using your arrow keys, scroll to next screen to '''linux16''' command and type the word <b><code><span style="color:#3366CC;font-size:1.2em;">single</span></code></b> as an argument after '''quiet''' (see diagram for reference) and then press <b><code><span style="color:#3366CC;font-size:1.2em;">ctrl-x</span></code></b> to boot.
#The system should boot into text-based mode. Enter your '''root''' password.
#One thing to look at is partition space usage. Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">df -h</span></code></b>
#If you notice 0% free space in the '''/''' partition, then there is a problem. This most likely is caused by not following steps to create a <u>compressed</u> copy of the VM image. If that is the case, locate the large image backup and remove it. Do NOT remove the image in ''/var/lib/libvirt/images'' directory!
#You can use the '''passwd''' command to reset your '''regular user''' password (eg. <b><code><span style="color:#3366CC;font-size:1.2em;">passwd regularuserid</span></code></b>). You can press '''ctrl-c''' if you wish to abort (i.e. not change password).
#To restart in graphical mode, simply enter the command <b><code><span style="color:#3366CC;font-size:1.2em;">reboot</span></code></b>.
 
:Unfortunately, this method does not work if you forgot your '''root''' password (To reset your root password, refer to procedure below).
 
 
'''Steps to Reset Root's Password:'''
 
{| width="50%" align="right" cellpadding="10"
|- valign="top"
|
[[Image:grub2_3.png|thumb|right|600px|Add word '''single''' at the end of boot options, '''ENTER''' and press '''b''' to boot ]]
|}
#The procedure to reset root's password is different than shown above. Press <b><code><span style="color:#3366CC;font-size:1.2em;">e</span></code></b> at the Grub boot menu.
#Using your arrow keys, move to '''linux16''' command and replace the argument '''ro''' with the argument <b><code><span style="color:#3366CC;font-size:1.2em;">rw init=/sysroot/bin/sh</span></code></b> (see diagram for reference) and then press <b><code><span style="color:#3366CC;font-size:1.2em;">ctrl-x</span></code></b> to boot.
#The system should boot into text-based mode without prompting for root's password.
#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">chroot /sysroot</span></code></b><br><br>
#Issue the command: <b><code><span style="color:#3366CC;font-size:1.2em;">passwd root</span></code></b> in order to change your root password (press '''ctrl-c''' if you wish to abort - i.e. not change password).
#To restart in graphical mode, simply enter the command <b><code><span style="color:#3366CC;font-size:1.2em;">reboot</span></code></b>.
 
 
'''Catastrophic Boot Problems:'''
 
:Not being able to start your '''c7host''' due to '''Kernel Panic''' or some sort of '''catastrophic disk failure''' is not as easy to fix. You might be able to boot from your '''Centos LIVE DVD, open a terminal and mount the partition''' via command line and look for possible problems (setup files like '''/etc/fstab'''). '''Lab5''' will discuss more about mounting and the /etc/fstab file. The "worst-case scenario" would be to purchase a new hard disk, '''perform lab1 completely, perform lab2 to install and set-up virtualization software''', then '''restore your VM image and xml file backups''' (eg. decompressing images, issuing virsh define commands for .xml files). That is why consistently '''performing backups of ALL of your VMS at the end of each lab is absolutely essential! You have been warned!'''
== Common Mistakes / Warnings ==
13,420
edits

Navigation menu