- Newest
- Most votes
- Most comments
I've done exactly this, you're basically doing the same as I did (slice up a second disk into all your mountpoints and rsync the first disk across to the second).
You need to specifically pay attention to the character devices in /dev, making sure the ownership, perms, major & minor numbers are carried across. And do an install -Ddm 000755 on the bind devices on the new disks. Also remember to re-make your GRUB config at the end.
I also found it useful to disable FIPS mode and SELinux just while I got it working, these can be re-enabled later.
I found this very helpful indeed https://github.com/plus3it/amigen8 and looking at how it was done in here got me over a lot of hurdles.
@RWC Appreciate the pointers, and thanks for pointing me to the amigen8 repo. Looks like I have some homework ahead of me tomorrow.
You're welcome. Much as I would like to be able to post my code here (or put it on a public repo in github) I believe my employer will consider it to be their IP, which is why I have to stick to vague, general advice. The amigen8 repo is great though - clone it and run it yourself and you'll find it works. Then pick through the code and see what it's doing that you've missed.
Another couple of things - don't worry about a separate boot device, just fold it into the root filesystem. It will still work, and grub2-install & grub2-mkconfig will take care of pointing things at the right place. Also your new root disk can be any size you like, doesn't need to match the original.
I understand being under the corporate IP; same here so I can't publish what I have thus far. While we were able to glean a few nuggets from the amigen8 repo, they built theirs to a CentOS system using LVM volumes. We are stuck using RHEL 8 system without the ability use LVM.
Unfortunately the Grub2 loader configuration and installation process they use does not work for secure UEFI devices, which I've ran into past testing of my solution. So still stuck at trying to get the /boot and /boot/efi mounts configured correctly as the last step in order to rip off an AMI and get an instance.
Relevant content
- asked 3 years ago
- asked 9 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 9 months ago

I know its been a while since this was posted. I wish I had seen this a year ago. I have successfully managed to use packer to create a RockyLinux8 AMI that boots and we use in our production ENV. My Rocky 8 AMI is not EFI but does use LVM. It was because of LVM that I went down this path to begin with. I can easily strip out our corporate configs and have been considering posting the rest on GitHub.
I am now working on a RockyLinux 9 AMI and this one uses EFI and LVM.
Let me know if you are still looking for answers.
Oh and DO NOT use rsync when you can build out the second EBS very easily.
Hi there, this project went on hold due to our inability to solve the challenge, but it is still outstanding work for us to resolve. I'd be happy to coordinate a GitHub repo share for anything you may feel comfortable sharing. You can find me on GitHub with the username 'gantta'.