Changes

Jump to: navigation, search

OPS235 Lab 3 - CentOS7

795 bytes added, 12:42, 28 April 2015
no edit summary
[[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 youruserid'''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).
[[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>
#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>.
13,420
edits

Navigation menu