Topics that don't fit in to the other categories
Who is behind the voice intro of the videos?
D

I thought you hired out Morgan Freeman, but based on recent things I've seen on Facebook I thought maybe you got the guy who does "True tales of the..." Maybe it is I don't know his name, but he's pretty funny.

read more
A+, Network+, Strata IT Fundamentals
Expanding /dev/sda2 in CentOS 7
M

I was thinking about in VMWare adding hard drives. I looked online and found this command.

[root@CENTOS7WEB ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 588G 0 disk
├─sda1 8:1 0 28G 0 part /boot
├─sda2 8:2 0 502.9G 0 part /var
├─sda3 8:3 0 46.6G 0 part /
├─sda4 8:4 0 1K 0 part
└─sda5 8:5 0 10.6G 0 part [SWAP]
sr0 11:0 1 4.2G 0 rom
[root@CENTOS7WEB ~]# ^C
[root@CENTOS7WEB ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.23.2).

/etc/fstab Created by anaconda on Mon Jul 9 13:05:53 2018 Accessible filesystems, by reference, are maintained under '/dev/disk' See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

UUID=7f55cb31-58a1-4e76-917a-24990184870e / xfs defaults 0 0
UUID=2cb27450-6095-437a-961a-04f925cdf9a3 /boot xfs defaults 0 0
UUID=b10cfc1c-7cfb-4134-a709-d7d4fa220f27 /var xfs defaults 0 0
UUID=36d319a6-6703-4670-8ce6-6bc63e98e367 swap swap defaults 0 0
/etc/fstab (END)

You'll need to boot from a live cd. Add partitions for them to disk 1, copy all the contents over, and then use sudo blkid to get the UUID of each partition. On disk 1's new /, edit the /etc/fstab to use the new UUIDs you just looked up.

Updating GRUB depends on whether it's GRUB1 or GRUB2. If GRUB1, you need to edit /boot/grub/device.map

If GRUB2, I think you need to mount your partitions as they would be in a real situation. For example:

sudo mkdir /media/root
sudo mount /dev/sda1 /media/root
sudo mount /dev/sda2 /media/root/boot
sudo mount /dev/sda3 /media/root/home

(Filling in whatever the actual partitions are that you copied things to, of course)

Then bind mount /proc and /dev in the /media/root:

sudo mount -B /proc /media/root/proc
sudo mount -B /dev /media/root/dev
sudo mount -B /sys /media/root/sys

Now chroot into the drive so you can force GRUB to update itself according to the new layout:

sudo chroot /media/root
sudo update-grub

The second command will make one complaint (I forget what it is though...), but that's ok to ignore.

Test it by removing the bad drive. If it doesn't work, the bad drive should still be able to boot the system, but I believe these are all the necessary steps.

read more
CCENT, CCNA Routing & Switching, CCNA Security
Cisco equipment
M

My only suggestion is blocking SSH on your firewall router to your ISP. You don't want someone coming in from the outside.

read more
MTA, MCSA Windows 8, MCSE Windows Server 2012
MCSA Windows 10 - 70-697 70-698 (2018)
R

Thanks for the info!

read more
Security+, CASP, CEH, SSCP and CISSP
CISSP
A

@angie
It looks updated now. Thanks

read more
ACA, ACSP and ACTC
First Aid Not able to fix disk
M

Try an Ubuntu Live Boot CD or USB drive. You can read the file system and copy your data off the drive.

read more

IT Service Managment

ITIL Practitioner Worksheets
M

@angie Any updates? I'm waiting to complete the series until I can do the homework using the templates. Thanks!

read more