cafaia Posted June 18, 2018 Report Share Posted June 18, 2018 Hello, everyone! In all installations made of Funtoo, I have this message: Using mount -t ext4 -o ro sh: bad number This message always appears before starting the openrc program. I believe it is harmless, but someone would know how to fix it? I thank you in advance for your help! Link to comment Share on other sites More sharing options...
0 palica Posted June 18, 2018 Report Share Posted June 18, 2018 Where do you have this message? Before starting what openrc program? Do you mean script or before OpenRC starts? Can you just give more details. What is in your fstab, how do you start your kernel, what is the kernel command line. Do you use your own kernel or debian-sources .......? There are thousands of possible reasons why you see this message. Thanks for providing more details and thanks for reading this post: Link to comment Share on other sites More sharing options...
0 cafaia Posted June 18, 2018 Author Report Share Posted June 18, 2018 Hi, Palica! Thank you for your attention and for the tip! I have this message about three lines before starting openrc, in the boot process before openrc starts. My fstab: /dev/md1 /boot ext2 defaults,noatime 1 2 /dev/mapper/swsyho-swap none swap sw 0 0 /dev/mapper/swsyho-system / ext4 noatime 0 1 /dev/mapper/swsyho-home /home ext4 defaults,noatime 0 2 tmpfs /var/tmp/portage tmpfs uid=portage,gid=portage,mode=775,size=16384M,noatime 0 0 /dev/sdc1 /hd ext4 defaults,noatime 0 2 I start the kernel with the following command line (from dmesg): Command line: BOOT_IMAGE=/vmlinuz-4.15.17-1 root=/dev/mapper/swsyho-system ro domdadm dolvm rootfstype=ext4 scandelay resume=/dev/mapper/swsyho-swap I start the kernel with the grub2 program and I have debian-sources but wihtout USE 'binary'. Link to comment Share on other sites More sharing options...
0 walterw Posted June 24, 2018 Report Share Posted June 24, 2018 I thought scandelay took a numerical argument. I use this to boot off of USB devices because it sometimes takes a second or 2 to see them Link to comment Share on other sites More sharing options...
0 cafaia Posted June 25, 2018 Author Report Share Posted June 25, 2018 Hi, Walterw! Thank you for your attention and tip! I made three changes, with scandelay, no scandelay and with this spelling 'scandelay=3', but the 'sh: bad number' continues... Best regards! Link to comment Share on other sites More sharing options...
0 walterw Posted June 26, 2018 Report Share Posted June 26, 2018 Hi cafaia, Hmm, this is an example of what I use, I have a modified initramfs ... linux /kernel-genkernel-x86_64-4.8.7-hardened consoleblank=300 crypt_root=/dev/disk/by-uuid/87f271ea dolvm doluks root=/dev/250.1/root-1 real_root=/dev/250.1/root-1 rootfstype=squashfs scandelay=2 memory tmpfs_size=4G initrd /initramfs-genkernel-x86_64-4.8.7-hardened If you modified your initramfs, please share. If not, please also confirm. It is odd to be getting that message if you haven't modified the initramfs and before openrc starts. In my case, I've gotten a variation before in shell scripts when I'm expecting a variable to be set, but it is not. Link to comment Share on other sites More sharing options...
0 cafaia Posted June 26, 2018 Author Report Share Posted June 26, 2018 Hi, Walterw! I did not modify my initramfs, I created it with the genkernel command. And I have this in my grub.cfg file: linux /vmlinuz-4.15.17-1 root=/dev/mapper/swsyho-system ro domdadm dolvm rootfstype=ext4 scandelay resume=/dev/mapper/swsyho-swap initrd /initramfs-genkernel-x86_64-4.15.17-1 Best regards! Link to comment Share on other sites More sharing options...
0 walterw Posted June 27, 2018 Report Share Posted June 27, 2018 Hi cafaia, If you don't mind, can you post your initramfs? That is the only way I see to troubleshoot this. The other alternative is to look at the source files in /usr/share/genkernel to try and backtrack what is going on there. BTW, I checked my linuxrc (/usr/share/genkernel/defaults/linuxrc), and I don't see an ro option, is that a kernel command-line option? Just for giggles, can you remove that argument? Link to comment Share on other sites More sharing options...
0 cafaia Posted June 27, 2018 Author Report Share Posted June 27, 2018 Hi, Walterw! I removed the 'ro' option but the error is still there. I'm sending my initramfs, I hope you can help me. Best regards. Here is the link to the initramfs file: https://mega.nz/#!ZYNVGKBQ!hryGEXRWUmIkiTcyNOyP4VwuAxerNMNTY61LgQopl4w Link to comment Share on other sites More sharing options...
0 walterw Posted June 27, 2018 Report Share Posted June 27, 2018 Hi cafaia, File received, I see it is compressed with gzip. I see that scandelay actually supports no args, it waits 3 seconds by default (when passed as an argument with no parameters) I didn't see anything that stood out, can you try editing /usr/share/genkernel/defaults/linuxrc and adding echo statements throughout to see where it might be occurring, followed by rebuilding the initramfs (and booting up with the modified init)? Then, we can narrow down exactly. Don't forget to backup your original ... Also, share the updated initramfs just so I can see it was updated as expected. Link to comment Share on other sites More sharing options...
0 engineer Posted June 10, 2021 Report Share Posted June 10, 2021 On linux-debian-sources-5.10.28_p1 I get this error also, but it comes before initramfs. Output says: ... Hint: Use parameter scandelay... Determining boot device... Detected real_root=/dev/sda3 Mounting /dev/sda3 as root... Using mount -t ext4 -o ro sh: bad number Booting (initramfs).. INIT: version 2.95 booting etc. Link to comment Share on other sites More sharing options...
0 engineer Posted June 14, 2021 Report Share Posted June 14, 2021 sh: bad number error is fixed by changing the following code /usr/share/genkernel/defaults/linuxrc: Replace linuxrc: if [ "${USE_AUFS_NORMAL}" -eq '1' ] With linuxrc: if [ "${USE_AUFS_NORMAL}" = '1' ] There are two instances. cardinal 1 Link to comment Share on other sites More sharing options...
0 engineer Posted June 14, 2021 Report Share Posted June 14, 2021 While you are there, go ahead and fix /usr/share/genkernel/defaults/config.sh /usr/share/genkernel/arch/x86/config.sh KERNEL_BINARY="arch/x86/boot/bzImage" DEFAULT_MAKEOPTS="-j5" Also in /usr/share/genkernel/gen_bootloader.sh change grub2-mkconfig -o "${GRUB_CONF}" to ego boot update Link to comment Share on other sites More sharing options...
Question
cafaia
Hello, everyone!
In all installations made of Funtoo, I have this message:
This message always appears before starting the openrc program.
I believe it is harmless, but someone would know how to fix it?
I thank you in advance for your help!
Link to comment
Share on other sites
12 answers to this question
Recommended Posts