Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

lxc - net.ethX requires sysfs, but sysfs disabled in latest

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
zeek
Guru
Guru
User avatar
Posts: 480
Joined: Sat Nov 16, 2002 10:27 pm
Location: Bantayan Island
Contact:
Contact zeek
Website

lxc - net.ethX requires sysfs, but sysfs disabled in latest

  • Quote

Post by zeek » Tue Dec 18, 2012 8:02 pm

Recently it looks like this bug https://bugs.gentoo.org/show_bug.cgi?id=425790 added the keyword '-lxc' to /etc/init.d/sysfs. This prevents sysfs from starting during container boot.

However /etc/init.d/net.lo checks for the existence of network devices using /sys. The relevant snippet:

Code: Select all

/lib64/rc/net/ifconfig.sh:
_exists()
{
        [ -e /sys/class/net/"$IFACE" ]
}
Reading the above bug it seems that the submitter is suggesting bind mounting sysfs inside the container? I think that mounting a new instance of sysfs inside the container is more correct than mounting the host's sysfs? Any lxc experts that can comment?

Thanks!
Top
makton3g
Tux's lil' helper
Tux's lil' helper
Posts: 88
Joined: Thu Aug 19, 2004 2:15 pm

if issue with LXC

  • Quote

Post by makton3g » Sat Jan 05, 2013 4:46 pm

Zeek

First, THANK YOU!!! I been trying to figure out what has caused my network to die on my guest Gentoo container and your post has put me in the right direction.

for your question, the sysfs is the same regardless where you how many times you mount it and is a security consideration when dealing with LXC containers. You just found a bug in their design for removing sysfs from the container. What was your fix, besides mounting sysfs? I found both spots in the code and am looking to see how I can modify my LXC to bring up the interfaces I'll update if i can can get this work without having sysfs in there.

Again, thanks a bunch!!!

-Mak
Top
zeek
Guru
Guru
User avatar
Posts: 480
Joined: Sat Nov 16, 2002 10:27 pm
Location: Bantayan Island
Contact:
Contact zeek
Website

  • Quote

Post by zeek » Tue Jan 08, 2013 2:01 am

The quick n easy solution for now is to use "newnet" USE flag and /etc/conf.d/network file for config (instead of /etc/conf.d/net). This bug report has more details:

https://bugs.gentoo.org/show_bug.cgi?id=445820

If you have a complex network config you might try to modify the init script for net.lo instead.

As pointed out in that bug report newnet seems to be deprecated and will be removed one day:

http://archives.gentoo.org/gentoo-dev/m ... 61aaf3.xml


One more thing, if I compare the results of ls -lR /sys between the host and container I get different results? Do you see identical directory trees?
Top
Post Reply

3 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy