element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
BeagleBoard
  • Products
  • Dev Tools
  • Single-Board Computers
  • BeagleBoard
  • More
  • Cancel
BeagleBoard
Forum what to do to prevent my bbb living his own live?
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join BeagleBoard to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 3 replies
  • Subscribers 103 subscribers
  • Views 1095 views
  • Users 0 members are here
  • debian buster
  • boot-up
  • bbb
Related

what to do to prevent my bbb living his own live?

jgnoss
jgnoss over 4 years ago

Hi folks,

 

Beaglebone black official debian 10 image.

I try do get rid of some (for my project not needed) stuff that bbb does at startup.

 

Here is what I need:

TTY and getty on the debug UART connector

GPIOs and config-pin

CAN0 CAN1

Ethernet on the RJ45 connector

a running DHCP

 

What is bad with actual config is the long boot time.

Over a minute, trying to configure all that USB stuff I don't need.

USB0 and USB1 Ethernet interface, ttyG...

I was happy to find /etc/default/bb-boot and commented out USB_NETWORK . . .
Next boot was not much faster, but no USB0 and USB1 Ethernet interfaces, huu happy, 1 step done a few more to go

One or two boots later and those interfaces were back again, and of course edit made in  /etc/default/bb-boot has magically gone away.

I was very closed to throw the bbb out of the window.

 

Please anyone can give me a hint what and where to look and edit to make the bbb work with that stuff I need as named above.

Juergen

  • Sign in to reply
  • Cancel

Top Replies

  • ajcc
    ajcc over 4 years ago +4
    I haven't looked into all the things the BBB does during boot, but as a general trick to reduce the boot time on Linux you can check how long the boot takes with systemd-analyze . When I do this on the…
  • jgnoss
    jgnoss over 4 years ago in reply to ajcc +2
    Who is that guy ajcc ? You are my hero! Very detailed and very helpful. Your instructions gave me some hints where to look further and finally I've got my network running as I want and it takes 18s to…
  • ajcc
    ajcc over 4 years ago

    I haven't looked into all the things the BBB does during boot, but as a general trick to reduce the boot time on Linux you can check how long the boot takes with systemd-analyze. When I do this on the BBB I found that it takes 39 seconds to finish booting.

     

    $ systemd-analyze critical-chain
    The time after the unit is active or started is printed after the "@" character.
    The time the unit takes to start is printed after the "+" character.
    
    graphical.target @39.525s
    └─multi-user.target @39.519s
      └─getty.target @39.187s
        └─serial-getty@ttyGS0.service @39.154s
          └─dev-ttyGS0.device @39.137s

     

    So you can see that starting ttyGS0 took 39 seconds, there's also a web server running on the virtual USB network interface. Use systemctl status to list all services on your system.

     

    When I disable the bonescript-autorun service I reach graphical.target in 27 seconds, so that's 12 seconds shaved off the boot time (don't worry about it being called graphical target, if you're using the IoT image there's no GUI)

    $ sudo systemctl disable bonescript-autorun.service

     

    When I also disable the web server nginx it doesn't shave off any time on boot. This is because services are starting even after the login prompt is visible.

    $ sudo systemctl disable nginx.service

     

    So I don't think DHCP being accessible would be related to the "long" boot time. Then what's taking up so much time? Well, we can check everything that has to be started before multi-user.target is reached.

    $ systemctl list-dependencies multi-user.target

     

    It will show a long list, some of those things are not enabled or running so you'll have to do some research into what you can disable. I choose two I didn't think was needed:

    $ sudo systemctl disable bb-bbai-tether.service
    $ sudo systemctl disable serial-getty@ttyGS0.service # this is a generated symlink, so it need to be masked to be disabled
    $ sudo systemctl mask serial-getty@ttyGS0.service # this will create a symlink to /dev/null, disabling it forever

     

    End result of just disabling services?

    $ systemd-analyze critical-chain
    The time after the unit is active or started is printed after the "@" character.
    The time the unit takes to start is printed after the "+" character.
    
    graphical.target @15.297s
    └─multi-user.target @15.292s
      └─getty.target @15.070s
        └─serial-getty@ttyS0.service @15.054s
          └─dev-ttyS0.device @15.026s

     

    Enjoy your extra 15 seconds of free time. I'll just end with this:

    $ systemd-analyze 
    Startup finished in 8.227s (kernel) + 15.522s (userspace) = 23.749s

     

    Unpacking the kernel takes a few seconds and disabling services might break things. I'm not taking any responsibility if disabling services breaks your system.

    • Cancel
    • Vote Up +4 Vote Down
    • Sign in to reply
    • Cancel
  • vasuki-1
    vasuki-1 over 4 years ago

    It can possible in pinnless system in motherboard

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • jgnoss
    jgnoss over 4 years ago in reply to ajcc

    Who is that guy

          ajcc   ?

     

    You are my hero!

     

    Very detailed and very helpful.

     

    Your instructions gave me some hints where to look further and finally I've got my network running as I want and it takes 18s to come up.

     

    very very nice.

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube