XPost: alt.os.linux
On 2025-06-04 15:43, Java Jive wrote:
On 2025-06-02 13:44, Java Jive wrote:
Searching on "Magic mismatch, very weird" comes up with some threads.
One is
hardware failure, the other is about using a non-1k blocksize with
(old) mke2fs
and a 2007-era ramdisk implementation that doesn't support other than
1k:
https://sourceforge.net/p/e2fsprogs/bugs/175/#b0df
Perhaps you could try -b1024 on the mkfs.ext2 command? Or experiment
with
other blocksizes?
Thanks, may try that later this afternoon,
And it worked, adding the -b1024 parameter makes my copying manually the original procedure work! Thanks for that.
[...]
So I tried moving that bit of code to rcS, but I still can't get it to reboot. Again all the messages are correctly displayed, but no reboot actually occurs.
I now have this fully working. If it's of any interest here's the code
from rcS. If on first boot, less than 2 HDs are found, it's sets a flag
in the U-boot environment, which survives a reboot, and then does a
reboot. On the second boot, it wipes the reboot flag and carries on the
boot regardless of how many HDs are found. In my case, the reboot
allows the second HD to be detected during the second boot, so the XFS
storage area spread across both HDs becomes available.
[Beware unintended line wrap, and note that the variables ECHO, WC, etc
contain the full initrd path to the binaries concerned]
# Check for HDs
${ECHO} "Checking for found hard drives ..."
HDs="$(${SGMAP}|${GREP} 'ATA'|${WC} -l)"
if [ "${HDs}" -lt 2 ]
then
case "${HDs}" in
0) ${ECHO} "WARNING: No hard drives found!"
;;
1) ${ECHO} "WARNING: Only 1 hard drive found!"
;;
esac
${ECHO} "Checking firmware for reboot flag ..."
REBOOTED="$(${PRINTENV} ${REBOOTFLG})"
if [ -z "${REBOOTED}" ] || [ "${REBOOTED}" == "## Error: \"${REBOOTFLG}\" not defined" ]
then
# Set flag and reboot
${SETENV} ${REBOOTFLG} true
${ECHO} "Rebooting to try to pick up slow-spin-up drives ..."
# The following command is valid according to the help parameter, but fails
# ${UMOUNT} -a
${SLEEP} 5
${REBOOT}
exit
else
# This is already a reboot, but still less than two HDs
# nothing further that can be done here
${ECHO} "Less than 2 hard drives found even after reboot"
fi
else
${ECHO} "2 hard drives found!"
fi
# 2 hard drives were found or this is already a reboot
# so just clear the flag and continue
${ECHO} "Clearing reboot flag in firmware ..."
${SETENV} ${REBOOTFLG}
--
Fake news kills!
I may be contacted via the contact address given on my website:
www.macfh.co.uk
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)