Install Linux on a second disk from an already running Linux (RHEL 7.8) instance

I am trying to mount a second disk on a running Linux (RHEL 7.8) AWS instance, install a customized bootable Linux environment to it, and then change that disk to an AMI so we can boot new Linux instances from it. Since this is in the cloud, I don’t have the ability to boot an ISO or kickstart to run the standard installation procedures. I realize this is a roundabout way to do this, but let’s just say it’s a requirement.

I create a partition on the disk, create the XFS filesystem, mount it, and install the Base and Core group of packages to it, as well as the kernel and grub2 packages. No issues there. I run a grub2-install on the new disk, and then chroot to its path and run grub2-mkconfig -o /boot/grub2/grub.cfg. I did make sure to use the UUID for the new disk in the fstab, and verified that the disk UUID was being used in the grub configurations.

I then shutdown the instance, snapshot the volume, and then turn that snapshot into an AMI. No issues there. Booting up an instance from it, I was able to get a login prompt. That’s as far as I’ve been able to get, though. It seems sshd never starts up, so I can’t access it, I’m just seeing the system log showing me a login prompt. No matter what I do, I can’t seem to get the openssh server to startup and respond. I did verify the symlink systemd uses to enable processes is in place for sshd. I’m assuming I’m missing some configuration, or additional packages I need to get a functioning Linux instance. There doesn’t seem to be much information out there on how to do something like this, but it seems like it should be possible with the right mix of packages and configurations.

Server Fault Asked by ALittleStitiousPuppet on December 27, 2020

0 Answers

Add your own answers!

Related Questions

Action log of last ssh login

2  Asked on January 15, 2021 by andrewl64


Ansible loops and conditions with arrays

1  Asked on January 14, 2021 by eviltorbalan


DB2 Integrity Checks and Exception Tables

1  Asked on January 14, 2021 by imthefirestartr


MySql Can’t Start on Ubuntu 20.04 LTS

0  Asked on January 13, 2021 by john-gab-tolentino


Opera Mini Compression Technology

0  Asked on January 13, 2021 by myzel394


What does systemd “thawing” mean?

0  Asked on January 12, 2021 by johannes-ernst


Strongswan transport mode ipsec within subnet

1  Asked on January 12, 2021 by viraptor


SuperMicro Servers can’t detect ALL Disk attached to SAS

0  Asked on January 11, 2021 by sami-satti


Zabbix key with comma

1  Asked on January 11, 2021 by pawe-zimny


Zabbix doesn’t run custom alert script

1  Asked on January 11, 2021 by alfred-balle


SQL Server 2012 Native Client returns missing DLL error on install

1  Asked on January 10, 2021 by user306594


Ask a Question

Get help from others!

© 2022 All rights reserved.