You are not logged in.
I was testing an i486 build yesterday and image builds fine... but on testing it drops me to a reduced shell after failing to loop mount root image.
Looking at archlinux32 i486 version I cannot see if it loop mounts or just mounts iso image.
Basically device gets mounted to /run/archiso/bootmnt the fails to loop mount image.
Is this by design? Can I look at archbang32 i486 source?
Has Linus dropped i486 support already? ;-)
Offline
The 486 ISO just uses isolinux-i486.cfg and mounts the CDROM directly as ISO9660 root partition:
APPEND root=/dev/sr0 iommu=off
There is no loop mount or so involved at runtime
(/dev/sr0 might be different, e.g. /dev/hda on a PATA CDROM drive and you might require different drivers - libata or so)
While building mkarchiso486 builds a airootfs (the ROOTFS variable) and pacstraps the i486 version into there. This is
the place you can fiddle in your own stuff.
Sorry, the documentation is - aeh - let's say - minimal. :-)
Let me try to reproduce this /run/archiso/bootmnt problem..
Feel free to clone https://git.archlinux32.org/archi486/tree/iso and make an archbang32..
..just be faster than Linus dropping 486 support, or you may run out of potential users. :-)
Offline
Assertion 'close_nointr(fd) != -EBADF' failed at src/basic/fd-util.c:76, function safe_close(). Aborting.
Just after autologin.. interresting..
close_nointr looks like something in systemd..
I have several questions here, the most important one: why are there assert()s in productive code?!
Possible issue: /dev filesystem is missing something (like /dev/fd/self whatever)..
Offline
https://github.com/systemd/systemd/pull/8392
looks like this has been there before (with other file desciptors), it will not be easy to find, what systemd
is closing here (which is already closed)..
Offline
Have a feeling loop mount is failing, have had to add module [loop] in the past. Most the init is made up of hooks so that should narrow things down.
Am not at my desktop until tomorrow night so will take a look then, at least I have i686 version working now.....
Systemd is perfect it could never be at fault ;-)
Offline
As i486 is not based on archiso I think I am not going to get it to work. The iso certainly builds fine with everything...
The root file image is not found for some reason and I know it is mounted to /run/archiso/bootmnt.
Am tempted to try manually loading image to root_switch but it is something I have never tried or think would even work.
Can of course see why i486 version is low level to run on very low power systems. Doing a normal arch install worked for me and I could set up just about everything I needed (got lazy with network connection).
Do not want to create to much noise here with my problems ;-)
Offline
No problem. :-)
The
Assertion 'close_nointr(fd) != -EBADF' failed at src/basic/fd-util.c:76, function safe_close(). Aborting.
Renders systems non-booting. This is the latest systemd update (uncomenting the usual pam_systemd stuff helps).
Offline
I am running systemd 251.2-1.0 here and my system still seems to boot okay. Is this only a problem for i486 users?
Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.
Offline
Mmh. No, I had in on my NAS running pentium4.. so, this could also be another effect maybe..
This bug would be easy to find, if I could run a kexec in userland and run a systemd, but that's
nothing I have done yet. And I have to build a debug version of systemd first. Sadly we
never adapted the debugd symbol idea from upstream..
Offline
If the problem is in init (the script) how does systemd affect it? The hooks are loaded even up to the point of mounting /run/archiso/bootmnt ...
Where in init does it load system image (or is that in init_functions)?
Systemd only gets started at point of switch root?
If I could figure out what unpacks sfs image in script then maybe I could figure out issue.
That is why I am asking the questions of the experts ;-)
Offline
There is no such thing as an init script with systemd (init is systemd).
The isolinux config files contain a archisobasedir and archisolabel (those are set in syslinux when booting).
The mounts happen in the archiso hook /usr/lib/initcpio/hooks/archiso (presumablly copied there from when installing archiso32).
The scripts rely on archisolabel and so if the ISO has the wrong name, it will not be automatically found.
(Experts: I merely copied archiso,archinsteall from upstream into archiso32,archinstall32 and I'm doing some minor 32-bit tweaks to it) :-)
Offline
init script in initramfs
#!/usr/bin/ash
udevd_running=0
mount_handler=default_mount_handler
init=/sbin/init
rd_logmask=0
. /init_functions
mount_setup
# parse the kernel command line
parse_cmdline </proc/cmdline
# setup logging as early as possible
rdlogger_start
for d in ${disablehooks//,/ }; do
[ -e "/hooks/$d" ] && chmod 644 "/hooks/$d"
done
. /config
run_hookfunctions 'run_earlyhook' 'early hook' $EARLYHOOKS
if [ -n "$earlymodules$MODULES" ]; then
modprobe -qab ${earlymodules//,/ } $MODULES
fi
run_hookfunctions 'run_hook' 'hook' $HOOKS
# honor the old behavior of break=y as a synonym for break=premount
if [ "${break}" = "y" ] || [ "${break}" = "premount" ]; then
echo ":: Pre-mount break requested, type 'exit' to resume operation"
launch_interactive_shell
fi
rootdev=$(resolve_device "$root") && root=$rootdev
unset rootdev
fsck_root
# Mount root at /new_root
"$mount_handler" /new_root
run_hookfunctions 'run_latehook' 'late hook' $LATEHOOKS
run_hookfunctions 'run_cleanuphook' 'cleanup hook' $CLEANUPHOOKS
if [ "$(stat -c %D /)" = "$(stat -c %D /new_root)" ]; then
# Nothing got mounted on /new_root. This is the end, we don't know what to do anymore
# We fall back into a shell, but the shell has now PID 1
# This way, manual recovery is still possible.
err "Failed to mount the real root device."
echo "Bailing out, you are on your own. Good luck."
echo
launch_interactive_shell --exec
elif [ ! -x "/new_root${init}" ]; then
# Successfully mounted /new_root, but ${init} is missing
# The same logic as above applies
err "Root device mounted successfully, but ${init} does not exist."
echo "Bailing out, you are on your own. Good luck."
echo
launch_interactive_shell --exec
fi
if [ "${break}" = "postmount" ]; then
echo ":: Post-mount break requested, type 'exit' to resume operation"
launch_interactive_shell
fi
# this should always be the last thing we do before the switch_root.
rdlogger_stop
exec env -i \
"TERM=$TERM" \
/usr/bin/switch_root /new_root $init "$@"
# vim: set ft=sh ts=4 sw=4 et:
This is from initramfs [lsinitcpio -x <file>] thought this is where archiso hooks are started. Can see systemd stuff in /var/run... udev etc is systemd based rest I am unsure of, dark magic involved ;-)
Offline
Emm interesting option rd.debug and rd.log=y gives some output on boot in init
Last edited by Mr Green (2022-10-30 12:23:37)
Offline
Things were so much simpler before systemd ... Am testing another iso build with pam update. My virtual machine is very slow some idiot only gave it one cpu core ;-)
Offline
Offline
Yes, the old init system was built from basic scripts and GNU tools. It was simple to grep a single script, but rather more complex to work out what was running at the same time when you parallelise the scripts to speed up bootup (on systems with multiple cores or a surfeit of disc IO). That's what systemd gives up first of all, a way to describe in simple ways was depends on what, and systemd builds a graph and works out what can run concurrently.
Edit: I am running pambase 2011 something here, so that might be the straw that broke the camel's back.
Edit2: I also seem to have those workaround lines in my /etc/pam.d/system-login already. I don't remember ever editing that file.
Last edited by levi (2022-10-30 19:43:45)
Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.
Offline
@Mr Green: uname gives whatever the kernel gives you. I remember vaguely, we had to patch some things for 486?
Just testd on my VM:
Linux eurobuild6-7-i486 5.18.10-arch1-1.0 #1 SMP PREEMPT_DYNAMIC Sun, 10 Jul 2022 00:13:12 +0000 i486 GNU/Linux
Is the CPU set to 486 (I presume you are using a VM for testing)?
@levi: systemd: I have a theory, I had only some pam_systemd.so commented out (the one in system-login), not
the others in system-auth.
Offline
I am running a virtual machine [Virtualbox] which has i486 installed and kernel to match. Used a different machine and got the same result. Everything on iso image is i486 but once in reduced shell kernel shows i686 ;-( [Will check system settings]
i686 version is fine and dandy
Offline
@levi: systemd: I have a theory, I had only some pam_systemd.so commented out (the one in system-login), not
the others in system-auth.
I have no lines referencing pam_system.so in my system-auth in /etc/pam.d, only some others referring to pam_systemd_home (which mostly seem to be negatived out fwiw), but that''s not the string quoted from the bug report, so I assume they're irrelevant.
Architecture: pentium4, Testing repos: Yes, Hardware: EeePC 901+2GB RAM+OS half on the SD card.
Offline
Did not think for one minute there was an issue with archlinux32... ;-) Never had an issue like this before, so it is possibly related to archiso. Was even thinking there was an issue with mirrors. Might rule that one out next.
Do you do anything weird with keys? should it be packey --populate archlinux32 ?
Might look at testing on 'real hardware' Virtualbox is ok but VMs tend to run much slower.
Offline
Keys are never weird. ;-)
archinstall on the i686 ISO is doing some pacman key refreshes and there is a systemd unit there also doing refreshs (and this takes ages).
I understand why this is done, because there are a lot of users of ISOs complaining about expired keys and then they are lost on how to
update the keys.
On the i486 ISO nothing is done, and what makes it worse, /etc/pacman.d is read-only on the ISO. So updating might not be so easy.
And I forgot to update the keyring-archlinux32 package for the new ISOs (grmpf). But they should expire right now..
Real hardware also exposes emulation bugs in qemu (never tried virtualbox). A 486 on qemu is just almost a real 486, basically,
it does something more a real 486 doesn't do..
Offline