Jump to content
funtoo forums
  • 0
cafaia

sh: bad number

Question

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!

Share this post


Link to post
Share on other sites

9 answers to this question

Recommended Posts

  • 0

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:

 

Share this post


Link to post
Share on other sites
  • 0

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'.

Share this post


Link to post
Share on other sites
  • 0

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!

Share this post


Link to post
Share on other sites
  • 0

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.

Share this post


Link to post
Share on other sites
  • 0

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!

Share this post


Link to post
Share on other sites
  • 0

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?

Share this post


Link to post
Share on other sites
  • 0

Hi cafaia,

File received, I see it is compressed with gzip.

  1. I see that scandelay actually supports no args, it waits 3 seconds by default (when passed as an argument with no parameters)
  2. 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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...