Fail to patch an Ubuntu 18.04 laptop

254 views
Skip to first unread message

in...@ijdata.com

unread,
Sep 14, 2020, 9:04:52 AM9/14/20
to BBR Development
Hi
I try to follow the steps in 
https://github.com/google/bbr/blob/v2alpha/README.md#obtaining-kernel-sources-with-tcp-bbr-v2-alpha
My setup is that I have two laptops (18.04) with an ethernet cable inbetween

I seem to face a few challenges.

+ One minor is that I need to update the gce-install.sh script with the -S option after the sudo commands.

+ The more serious issue is that get a message 
/lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE.old: No such file or directory
It seems like /lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE is there but not the .old ditto 

Any ideas what I do wrong ?
uname -a the unmodified laptop
Linux ********-ThinkPad-E470 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Regards
/Ingemar



Neal Cardwell

unread,
Sep 14, 2020, 9:24:35 AM9/14/20
to in...@ijdata.com, BBR Development
On Mon, Sep 14, 2020 at 9:04 AM in...@ijdata.com <in...@ijdata.com> wrote:
Hi
I try to follow the steps in 
https://github.com/google/bbr/blob/v2alpha/README.md#obtaining-kernel-sources-with-tcp-bbr-v2-alpha
My setup is that I have two laptops (18.04) with an ethernet cable inbetween

I seem to face a few challenges.

Thanks for the report!
 
+ One minor is that I need to update the gce-install.sh script with the -S option after the sudo commands.

Can you please post a patch illustrating exactly what change you needed to make? We may want to update the script on github.
 
+ The more serious issue is that get a message 
/lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE.old: No such file or directory
It seems like /lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE is there but not the .old ditto 

Any ideas what I do wrong ?
uname -a the unmodified laptop
Linux ********-ThinkPad-E470 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I'm not clear on whether that "....old: No such file or directory" message was corresponding to a fatal error or not.

Is the  patched gce-install.sh able to successfully boot the test kernel on the target machine? If so, I think that error can be ignored. If it did not boot, can you please copy the entire output of the script to a .txt file and attach it to an e-mail in this thread?

thanks,
neal



Regards
/Ingemar



--
You received this message because you are subscribed to the Google Groups "BBR Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bbr-dev+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bbr-dev/935063f1-5306-41b2-8009-5545445f8c03n%40googlegroups.com.

in...@ijdata.com

unread,
Sep 15, 2020, 4:55:33 AM9/15/20
to BBR Development
Hi
I can try to add a patch, however my git skills are still mediocre. The fix was to add -S as parameter to the sudo commands

Attached  below is a printout from my trial, apparently I manage to reboot the laptop but it seems like the whole operation fails somehow

./gce-install.sh -m *******@10.0.0.2
cleaning...
copying config.gce to .config ...
running make olddefconfig ...
making...
making modules ...
making install ...
making modules_install ...
making tarball ...
running: scp /home/ ******* /bbr/gce/+v2alpha+15fd29fce87e+GCE/pkg/kernel-+v2alpha+15fd29fce87e+GCE.tar.gz2  ******* @10.0.0.2:~/
*******@10.0.0.2's password: 
kernel-+v2alpha+15fd29fce87e+GCE.tar.gz2      100%  110MB 107.5MB/s   00:01    
*******@10.0.0.2's password: 
[sudo] password for  *******  : *******
W: Possible missing firmware /lib/firmware/rtl_nic/rtl8125a-3.fw for module r8169
Working files in /var/tmp/mkinitramfs_NfOHxx, early initramfs in /var/tmp/mkinitramfs-FW_44XNtF and overlay in /var/tmp/mkinitramfs-OL_L3AAEF
Working files in /var/tmp/mkinitramfs_Mlm4jn, early initramfs in /var/tmp/mkinitramfs-FW_U4B5R9 and overlay in /var/tmp/mkinitramfs-OL_aU9HWr
WARNING: missing /lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE.old
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE.old: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_0x5SWh/lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE.old/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_0x5SWh/lib/modules/5.4.0+v2alpha+15fd29fce87e+GCE.old/modules.builtin: No such file or directory
Working files in /var/tmp/mkinitramfs_0x5SWh, early initramfs in /var/tmp/mkinitramfs-FW_D4uWii and overlay in /var/tmp/mkinitramfs-OL_3uWMMV
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-42-generic
Found initrd image: /boot/initrd.img-5.4.0-42-generic
Found linux image: /boot/vmlinuz-5.4.0+v2alpha+15fd29fce87e+GCE
Found initrd image: /boot/initrd.img-5.4.0+v2alpha+15fd29fce87e+GCE
Found linux image: /boot/vmlinuz-5.4.0+v2alpha+15fd29fce87e+GCE.old
Found initrd image: /boot/initrd.img-5.4.0+v2alpha+15fd29fce87e+GCE.old
Adding boot menu entry for EFI firmware configuration
done
[sudo] password for  *******  : *******
Connection to 10.0.0.2 closed by remote host.

Neal Cardwell

unread,
Sep 15, 2020, 9:10:23 AM9/15/20
to in...@ijdata.com, BBR Development
On Tue, Sep 15, 2020 at 4:55 AM in...@ijdata.com <in...@ijdata.com> wrote:
Hi
I can try to add a patch, however my git skills are still mediocre. The fix was to add -S as parameter to the sudo commands

It sounds like your sudo setup is requiring a password. In that case, it may be preferable to change the script to ssh directly to the root user:

ssh root@${MACHINE} "

and then use ssh-agent on the local machine and place your public key in the ~/.ssh/authorized_keys file of the root user on the remote machine, so you can ssh over without a password:
 
Attached  below is a printout from my trial, apparently I manage to reboot the laptop but it seems like the whole operation fails somehow

When you say "it seems like the whole operation fails somehow"... Does the machine reboot? When the machine reboots, does the machine boot the kernel you built, or an older kernel?

Thanks for the output log!

best,
neal
 

in...@ijdata.com

unread,
Sep 17, 2020, 7:25:38 AM9/17/20
to BBR Development
Hi
Thanks for the suggestions

I realized that for some reason the whole operation did not work with the laptop I tried with. 
Switched to another laptop and  now I am up and running.
I got a different suggestion how to build and install the new kernel so I did the following
> cd bbr
> make config
> make bindeb-pkg
> cd ..
> sudo dpkg -i linux*5.4.0-rc6*.deb

Regards
Ingemar

Neal Cardwell

unread,
Sep 17, 2020, 10:46:51 AM9/17/20
to in...@ijdata.com, BBR Development
On Thu, Sep 17, 2020 at 7:25 AM in...@ijdata.com <in...@ijdata.com> wrote:
Hi
Thanks for the suggestions

I realized that for some reason the whole operation did not work with the laptop I tried with. 
Switched to another laptop and  now I am up and running.
I got a different suggestion how to build and install the new kernel so I did the following
> cd bbr
> make config
> make bindeb-pkg
> cd ..
> sudo dpkg -i linux*5.4.0-rc6*.deb

Thanks for posting that recipe. Did that build a kernel with bbr and bbr2 congestion control modules? I would be a little surprised if it did. What happens if you run the following after booting the resulting kernel:

  sysctl net.ipv4.tcp_congestion_control=bbr2

  sysctl net.ipv4.tcp_congestion_control=bbr

In order to build a  kernel with bbr and bbr2 congestion control modules, I think you need to update the kernel .config file to select those modules via "CONFIG" lines.

Some options:

(1) To build locally on an Ubuntu (18.04) Google Cloud VM, building bbr2, bbr, cubic, and dctcp, and making bbr2 the default, this recipe may work:

  sudo apt-get install build-essential fakeroot devscripts libelf-dev
  git clone -o google-bbr -b v2alpha  https://github.com/google/bbr.git
  cd bbr
  cp config.gce .config
  make olddefconfig
  make bindeb-pkg
  cd ..
  sudo dpkg -i linux*.deb

However, that would only build the drivers needed for Google Cloud VMs, so probably would not give you the drivers you need for a laptop.

(2) To modify an existing .config file to build bbr2, bbr, cubic, and dctcp, and make bbr2 the default, you can make sure the .config file includes the following lines:
  CONFIG_TCP_CONG_CUBIC=y
  CONFIG_TCP_CONG_DCTCP=y
  CONFIG_TCP_CONG_BBR=y
  CONFIG_TCP_CONG_BBR2=y

And then delete any line that says "CONFIG_DEFAULT_CUBIC=..." and replace it with:
  CONFIG_DEFAULT_BBR2=y

Does that approach (2) build a kernel with bbr and bbr2 for your laptop?

best,
neal

 

in...@ijdata.com

unread,
Sep 18, 2020, 1:52:37 AM9/18/20
to BBR Development
Hi

You are correct, I missed to document a few steps along the way. 

Regards
/Ingemar 

Reply all
Reply to author
Forward
0 new messages