Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packer images are missing initrd drivers. #22

Closed
Phalen opened this issue Jan 21, 2021 · 4 comments
Closed

Packer images are missing initrd drivers. #22

Phalen opened this issue Jan 21, 2021 · 4 comments
Labels
CentOS help wanted Extra attention is needed

Comments

@Phalen
Copy link

Phalen commented Jan 21, 2021

I tried to build the centos8 image since the canonical one was having issues and noticed that when it panics due to missing root the /lib/mod.... has almost no drivers in it. going to kernel/scsi there were 2 or 3 drivers when it panics in the full driver listing its nearly 20 drivers in there.

@Phalen
Copy link
Author

Phalen commented Jan 24, 2021

I was finally able to find the issue. Cent8 removed needed drivers from the kernel. its not hard to get a ks to use those drivers but how would one do so in the packer environment? would you expect a nfs /web image/iso or is there a better way to include the addional drivers in the packer image? Since previously deployed machines are able to power back on with the images deployed by maas having the boot drivers on a seperate server that may not have recovered would be troubling.

@ltrager
Copy link
Contributor

ltrager commented Jan 25, 2021

Packer simply automates the official OS installation process and creates a MAAS compatible image. CentOS, RHEL, and VMware all use a kickstart file to describe how the installation is performed. packer-maas stores these in the http directory. We're open to accepting changes to the base kickstart file but we do have a requirement that all packages and drivers come from the distros official archive.

@Phalen
Copy link
Author

Phalen commented Jan 26, 2021

its more of a issue of centos/rhel policy causing issues as they muddled with dev id's to remove support from the official kernel tree :/
I could not get the kickstart to load the drivers and had to manually hack them in via modified initrd img It seems i will have to work quite a bit on getting both dracut and other tools sorted out to see if there's a sensible way to do this update or not.

I will update this issue if i find any thing as the way i got it working tonight has cloud-init griping about selinux labels post boot.

@sergiostrampelli
Copy link

I have resolved adding this block to http/centos7.ks

%pre-install --log=/mnt/sysimage/root/ks-preinstall.log
mkdir /mnt/sysimage/etc/dracut.conf.d
echo "hostonly=\"no\""  > /mnt/sysimage/etc/dracut.conf.d/hostonlyno.conf
%end

@alexsander-souza alexsander-souza added help wanted Extra attention is needed CentOS labels Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CentOS help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants