II just tried to install debian on a ultra sparc III based Sun Ultra
45 workstation with the newest netinst image I could find, but the
resulting install is not able to mount the root filesystem to complete
the boot process.
The UltraSparc IIIi cpu in this machine lacks the crc32 opcodes and
needs to use the crc32c_generic driver instead. Is this expected
behavior because the machine is too old, or is this a bug?
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.41 [/sbin/fsck.ext4 (1) -- /dev/sdb2] fsck.ext4 -a -C0 /dev/sdb2
/dev/sdb2: clean, 33434/133169152 files, 9133747/532645976 blocks
done.
[ 75.478521] crc32c_sparc64: sparc64 crc32c opcode not available.
[ 75.652621] EXT4-fs (sdb2): Cannot load crc32c driver.
mount: mounting /dev/sdb2 on /root failed: No such file or directory
Failed to mount /dev/sdb2 as root file system.
I used this image: https://cdimage.debian.org/cdimage/ports/current/debian-12.0.0-sparc64-NETINST-1.iso
sdb2 may sound strange, but it is the correct partition for /, as the
machine has solaris installed on what it thinks is sda :)
Fstab has not been modified and does indeed refer to the paritions by
UUID. This is the first boot after a fresh install. The error message
of can't mount /root probably is probably a side effect of the
initramfs process or someone trying to make it more user friendly.
Installation was done in guided partition mode, using the full (sdb)
disk. sdb1 is /boot, sbd2 is / and sbd3 is swap in this particular installation.
The system clearly tried to load the wrong crc32c module, instead of crc32c_generic, which triggered the following kernel messages:
[ 75.478521] crc32c_sparc64: sparc64 crc32c opcode not available.
[ 75.652621] EXT4-fs (sdb2): Cannot load crc32c driver.
The system clearly tried to load the wrong crc32c module, instead of crc32c_generic, which triggered the following kernel messages:
[ 75.478521] crc32c_sparc64: sparc64 crc32c opcode not available.
[ 75.652621] EXT4-fs (sdb2): Cannot load crc32c driver.
I'm not sure how this is supposed to be related to your root filesystem problem.
Adrian
As follow up:
Just booted the installation cd and mounted the disk, chrooted and
started ssh so I could more easily copy and paste :)
mosca@ultra45:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdb2 during installation UUID=25f72af7-ea5d-484b-859c-6724ed3382bc / ext4 errors=remount-ro 0 1
# /boot was on /dev/sdb1 during installation UUID=40e43524-0383-4da1-bb08-ae3a10a6114e /boot ext2
defaults 0 2
# swap was on /dev/sdb4 during installation UUID=de638666-5dc6-4869-bcdc-014907d38a8b none swap sw
0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
mosca@ultra45:~$ lsmod
Module Size Used by
ext4 794624 2
crc16 24576 1 ext4
mbcache 24576 1 ext4
jbd2 122880 1 ext4
crc32c_generic 24576 3 <== this is the correct module that
should be used, fresh install tries to use crc32c which fails, due to
lack of crc32c opcodes in this older cpu.
[1] https://patchwork.kernel.org/project/linux-mips/patch/20241103223154.136127-16-ebiggers@kernel.org/
The system clearly tried to load the wrong crc32c module, instead of crc32c_generic, which triggered the following kernel messages:
[ 75.478521] crc32c_sparc64: sparc64 crc32c opcode not available.
[ 75.652621] EXT4-fs (sdb2): Cannot load crc32c driver.
This is the ext4 driver complaining about it not finding a crc32c
driver, and it won't mount any ext4 filesystems.
I sent the fstab and lsmod from the installation cd on a separate
message. I will try blacklisting the crc32c_sparc module to see if
that forces it to try the _generic version frist.
Hello Marcelo,
On Mon, 2025-05-19 at 17:50 +0200, Marcelo Bezerra wrote:
As follow up:
Just booted the installation cd and mounted the disk, chrooted and
started ssh so I could more easily copy and paste :)
mosca@ultra45:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5).
#
# systemd generates mount units based on this file, see systemd.mount(5).
# Please run 'systemctl daemon-reload' after making changes here.
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sdb2 during installation UUID=25f72af7-ea5d-484b-859c-6724ed3382bc / ext4 errors=remount-ro 0 1
# /boot was on /dev/sdb1 during installation UUID=40e43524-0383-4da1-bb08-ae3a10a6114e /boot ext2
defaults 0 2
# swap was on /dev/sdb4 during installation UUID=de638666-5dc6-4869-bcdc-014907d38a8b none swap sw
0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
OK, this looks good. What does the kernel command line say?
mosca@ultra45:~$ lsmod
Module Size Used by
ext4 794624 2
crc16 24576 1 ext4
mbcache 24576 1 ext4
jbd2 122880 1 ext4
crc32c_generic 24576 3 <== this is the correct module that
should be used, fresh install tries to use crc32c which fails, due to
lack of crc32c opcodes in this older cpu.
The question is whether this is related to the failure you are seeing and
I am not sure about this. It seems that there were some changes to ext4
with regards to crc32c [1].
If this is actually the problem, we need to figure out why the wrong module is loaded on your machine. I don't have an answer to that from the top of
my head.
You can try blacklisting the crc32c_sparc64 module from the kernel command line.
Adrian
[1] https://patchwork.kernel.org/project/linux-mips/patch/20241103223154.136127-16-ebiggers@kernel.org/
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Blacklisting that module did indeed fix the issue and the system booted.
Not sure what the ideal fix would be for this. I suspect this should
affect other machines lacking that instructions, and not only this
ultra45.
I wonder if the code in https://github.com/torvalds/linux/blob/a5806cd506af5a7c19bcd596e4708b5c464bfd21/arch/sparc/lib/crc32_glue.c#L62
should be returning non 0 when it lacks HWCAP_SPARC_CRYPTO or fails
the CFR_CRC32C checks.
static int __init crc32_sparc_init(void)
{
unsigned long cfr;
if (!(sparc64_elf_hwcap & HWCAP_SPARC_CRYPTO))
return 0; <=== here
__asm__ __volatile__("rd %%asr26, %0" : "=r" (cfr));
if (!(cfr & CFR_CRC32C))
return 0; <=== and here
static_branch_enable(&have_crc32c_opcode);
pr_info("Using sparc64 crc32c opcode optimized CRC32C implementation\n");
return 0;
}
arch_initcall(crc32_sparc_init);
[1] https://elixir.bootlin.com/linux/v6.14.7/source/arch/powerpc/lib/crc32-glue.c#L73
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 145:41:42 |
Calls: | 10,383 |
Calls today: | 8 |
Files: | 14,054 |
D/L today: |
2 files (1,861K bytes) |
Messages: | 6,417,685 |