You are not logged in.

#1 2022-10-27 06:23:14

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Does i486 version use loop mounting?

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

#2 2022-10-27 06:43:36

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

#3 2022-10-27 07:19:07

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

#4 2022-10-27 07:40:32

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

Mmh. No luck with the newest systemd..

Offline

#5 2022-10-27 18:42:18

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

#6 2022-10-27 18:55:45

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#7 2022-10-29 07:27:57

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#8 2022-10-30 09:00:55

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

#9 2022-10-30 09:13:58

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: Does i486 version use loop mounting?

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

#10 2022-10-30 09:34:17

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

#11 2022-10-30 10:20:47

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#12 2022-10-30 10:43:45

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

#13 2022-10-30 10:49:54

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

pambase-20221020-1.0  could have changed rules which now pop up as assertiong in systemd..

Offline

#14 2022-10-30 12:15:00

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#15 2022-10-30 12:23:25

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#16 2022-10-30 12:35:19

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

Ah, you're right, there is an init in the ramdisk and an init (systemd) after the root change.

Offline

#17 2022-10-30 12:40:11

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#18 2022-10-30 13:08:22

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

fail.png

Could you check archiso version for i486 seems it is trying to load i686?

Inside init uname gives me i686 kernel???

Last edited by Mr Green (2022-10-30 13:30:14)

Offline

#19 2022-10-30 18:42:51

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: Does i486 version use loop mounting?

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

#20 2022-10-31 06:34:05

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

@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

#21 2022-10-31 21:34:29

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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 wink

Offline

#22 2022-11-01 01:41:02

levi
Moderator
From: Yorkshire, UK
Registered: 2018-06-16
Posts: 1,197

Re: Does i486 version use loop mounting?

abaumann wrote:

@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

#23 2022-11-02 17:35:51

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

I did a archlinux32-2022.11.02-i486.iso, I always see i486 when I run it in a VM..
.. I also fixed the systemd issue.

Offline

#24 2022-11-02 20:23:56

Mr Green
Member
Registered: 2017-11-11
Posts: 60

Re: Does i486 version use loop mounting?

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

#25 2022-11-03 06:44:04

abaumann
Administrator
From: Zurich
Registered: 2019-11-14
Posts: 984
Website

Re: Does i486 version use loop mounting?

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

Board footer

Powered by FluxBB