Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Help getting Oracle Linux guest running #4969

Closed
jackdouglas opened this issue Dec 24, 2024 · 2 comments
Closed

Help getting Oracle Linux guest running #4969

jackdouglas opened this issue Dec 24, 2024 · 2 comments
Assignees
Labels
Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Status: Awaiting review Indicates that a pull request is ready to be reviewed

Comments

@jackdouglas
Copy link

I use firecracker for many of the database backends on db<>fiddle, which has been working fine for years. I can run Debian and even Alpine guests but I've always had trouble with RHEL clones like Oracle Linux.

They boot ok but don't let me log in - with this dockerfile I get stuck without a tty:

FROM mysql:8.4-oraclelinux9
RUN microdnf install -y systemd
RUN echo '[Service]' > /etc/systemd/system/fiddle.service \
  && echo 'ExecStart=/fiddle.sh' >> /etc/systemd/system/fiddle.service \
  && echo '[Install]' >> /etc/systemd/system/fiddle.service \
  && echo 'WantedBy=default.target' >> /etc/systemd/system/fiddle.service \
  && systemctl enable fiddle
RUN echo '[Service]' > /etc/systemd/system/mysqld.service \
  && echo 'ExecStart=/usr/sbin/mysqld --user=root --skip-networking --daemonize' >> /etc/systemd/system/mysqld.service \
  && echo '[Install]' >> /etc/systemd/system/mysqld.service \
  && echo 'RequiredBy=fiddle.service' >> /etc/systemd/system/mysqld.service \
  && systemctl enable mysqld
RUN echo ttyS0 > /etc/securetty
RUN microdnf clean all
RUN echo "root:Docker!" | chpasswd
ENTRYPOINT ["bash"]

and today I finally got a login prompt for the first time, but logging in a 'no login shell' error with this dockerfile:

FROM mysql:8.4-oraclelinux9
RUN microdnf install -y systemd
RUN echo '[Service]' > /etc/systemd/system/fiddle.service \
  && echo 'ExecStart=/fiddle.sh' >> /etc/systemd/system/fiddle.service \
  && echo '[Install]' >> /etc/systemd/system/fiddle.service \
  && echo 'WantedBy=default.target' >> /etc/systemd/system/fiddle.service \
  && systemctl enable fiddle
RUN echo '[Service]' > /etc/systemd/system/mysqld.service \
  && echo 'ExecStart=/usr/sbin/mysqld --user=root --skip-networking --daemonize' >> /etc/systemd/system/mysqld.service \
  && echo '[Install]' >> /etc/systemd/system/mysqld.service \
  && echo 'RequiredBy=fiddle.service' >> /etc/systemd/system/mysqld.service \
  && systemctl enable mysqld
RUN echo ttyS0 > /etc/securetty \
  && echo '[Service]' > /etc/systemd/system/mygetty.service \
  && echo 'ExecStart=/usr/sbin/agetty -L 9600 ttyS0 vt102' >> /etc/systemd/system/mygetty.service \
  && echo '[Install]' >> /etc/systemd/system/mygetty.service \
  && echo 'RequiredBy=fiddle.service' >> /etc/systemd/system/mygetty.service \
  && systemctl enable mygetty
RUN microdnf clean all
RUN echo "root:Docker!" | chpasswd
ENTRYPOINT ["bash"]

in both cases I'm building the rootfs like this:

DOCKER_BUILDKIT=1 docker build -t dummy - < DOCKERFILE
dd if=/dev/zero bs=1M count=1000 > rootfs.ext4
mkfs.ext4 rootfs.ext4
mount -o loop rootfs.ext4 mnt
docker run --rm -ti -v mnt:/my-rootfs dummy
for d in bin etc home lib lib64 opt root sbin usr dev run var; do tar c "/$d" | tar x -C /my-rootfs; done
for dir in proc sys; do mkdir /my-rootfs/${dir}; done
exit

Is there something obvious I'm doing wrong? I'm really keen to add later versions of MySQL to dbfiddle but the official docker images are all Oracle Linux based since 8.0.

@hackeroneulevel

This comment was marked as spam.

@hackeroneulevel

This comment was marked as spam.

@pb8o pb8o added the Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` label Jan 8, 2025
@pb8o pb8o self-assigned this Jan 8, 2025
@pb8o pb8o added the Status: Awaiting review Indicates that a pull request is ready to be reviewed label Jan 8, 2025
@firecracker-microvm firecracker-microvm locked and limited conversation to collaborators Jan 8, 2025
@pb8o pb8o converted this issue into discussion #4985 Jan 8, 2025

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Priority: Low Indicates that an issue or pull request should be resolved behind issues or pull requests labelled ` Status: Awaiting review Indicates that a pull request is ready to be reviewed
Projects
None yet
Development

No branches or pull requests

3 participants