* sysfs question
@ 2008-09-11 14:01 Mark Ryden
[not found] ` <dac45060809110701i49acb8e7m7d8e3ccea7c59ab7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 7+ messages in thread
From: Mark Ryden @ 2008-09-11 14:01 UTC (permalink / raw)
To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA
Hello,
I am trying to follow the
Linux Containers - Network Namespace configuration instructions from
http://lxc.sourceforge.net/network/configuration.php
I had built a kernel with CONFIG_SYS=n and CONFIG_NET_NS=y
and CONFIG_VETH=y , etc, according to the instructions.
Now, the CONFIG_SYSFS help text says:
sysfs is currently used by the block subsystem to mount the root
partition. If sysfs is disabled you must specify the boot device on
the kernel boot command line via its major and minor numbers. For
example, "root=03:01" for /dev/hda1.
So I added root=08,02 to my kernel boot parameter line and booted.
it starts booting, but then gets:
switchroot: mount failed: No such file or directory.
Booting has failed.
8 is the majoror number and 2 is the minor number of /dev/sda2, where I have
my root partition.
Googling for this found the following, which not helped much:
http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-11/msg05032.html
Any ideas?
Regards,
Mark
^ permalink raw reply [flat|nested] 7+ messages in thread[parent not found: <dac45060809110701i49acb8e7m7d8e3ccea7c59ab7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: sysfs question [not found] ` <dac45060809110701i49acb8e7m7d8e3ccea7c59ab7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2008-09-11 14:05 ` Mark Ryden [not found] ` <dac45060809110705r2474060bi71c657a23588975f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2008-09-11 14:49 ` Benjamin Thery 1 sibling, 1 reply; 7+ messages in thread From: Mark Ryden @ 2008-09-11 14:05 UTC (permalink / raw) To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA In fact, after looking more closely, I see that before that message appears: Error: unmouting old /sys ERROR unmounting old /sys: Invalid argument. forcing unmount of /sys switchroot... Any ideas? Rgs, Mark On Thu, Sep 11, 2008 at 5:01 PM, Mark Ryden <markryde-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > Hello, > I am trying to follow the > Linux Containers - Network Namespace configuration instructions from > http://lxc.sourceforge.net/network/configuration.php > > > I had built a kernel with CONFIG_SYS=n and CONFIG_NET_NS=y > and CONFIG_VETH=y , etc, according to the instructions. > > > Now, the CONFIG_SYSFS help text says: > > sysfs is currently used by the block subsystem to mount the root > partition. If sysfs is disabled you must specify the boot device on > the kernel boot command line via its major and minor numbers. For > example, "root=03:01" for /dev/hda1. > > > So I added root=08,02 to my kernel boot parameter line and booted. > > > it starts booting, but then gets: > switchroot: mount failed: No such file or directory. > Booting has failed. > > 8 is the majoror number and 2 is the minor number of /dev/sda2, where I have > my root partition. > > Googling for this found the following, which not helped much: > http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-11/msg05032.html > > Any ideas? > Regards, > Mark > ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <dac45060809110705r2474060bi71c657a23588975f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: sysfs question [not found] ` <dac45060809110705r2474060bi71c657a23588975f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2008-09-11 14:26 ` xiaoming.zhang [not found] ` <200809112226.59518.zxm927-9Onoh4P/yGk@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: xiaoming.zhang @ 2008-09-11 14:26 UTC (permalink / raw) To: Mark Ryden; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA On Thursday 11 September 2008 10:05:43 pm Mark Ryden wrote: > In fact, after looking more closely, I see that before that message > appears: Error: unmouting old /sys > ERROR unmounting old /sys: Invalid argument. > forcing unmount of /sys > switchroot... > My experience is you'd better to find a sysfs patch, since the sysfs filesystem is required by ramdisk and some system utilities, e.g., system network configuration scripts. Patch for mm-tree can be found here: http://lxc.sourceforge.net/patches/2.6.26/ This is what I used: http://lxc.sourceforge.net/patches/2.6.26/2.6.26-rc8-mm1-lxc1/broken-out/sysfs/ I merged these 11 patches on Linux-2.6.26.1 though I don't understand these patches, luckily enough it worked for me. > Any ideas? > Rgs, > Mark > > On Thu, Sep 11, 2008 at 5:01 PM, Mark Ryden <markryde-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > Hello, > > I am trying to follow the > > Linux Containers - Network Namespace configuration instructions from > > http://lxc.sourceforge.net/network/configuration.php > > > > > > I had built a kernel with CONFIG_SYS=n and CONFIG_NET_NS=y > > and CONFIG_VETH=y , etc, according to the instructions. > > > > > > Now, the CONFIG_SYSFS help text says: > > > > sysfs is currently used by the block subsystem to mount the root > > partition. If sysfs is disabled you must specify the boot device on > > the kernel boot command line via its major and minor numbers. For > > example, "root=03:01" for /dev/hda1. > > > > > > So I added root=08,02 to my kernel boot parameter line and booted. > > > > > > it starts booting, but then gets: > > switchroot: mount failed: No such file or directory. > > Booting has failed. > > > > 8 is the majoror number and 2 is the minor number of /dev/sda2, where I > > have my root partition. > > > > Googling for this found the following, which not helped much: > > http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-11/msg05032.html > > > > Any ideas? > > Regards, > > Mark > > _______________________________________________ > Containers mailing list > Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > https://lists.linux-foundation.org/mailman/listinfo/containers -- Have fun, Xiaoming Zhang ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <200809112226.59518.zxm927-9Onoh4P/yGk@public.gmane.org>]
* Re: sysfs question [not found] ` <200809112226.59518.zxm927-9Onoh4P/yGk@public.gmane.org> @ 2008-09-11 15:37 ` Daniel Lezcano [not found] ` <48C93B3D.3050303-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Daniel Lezcano @ 2008-09-11 15:37 UTC (permalink / raw) To: xiaoming.zhang, Mark Ryden Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, benjamin Thery xiaoming.zhang wrote: > On Thursday 11 September 2008 10:05:43 pm Mark Ryden wrote: >> In fact, after looking more closely, I see that before that message >> appears: Error: unmouting old /sys >> ERROR unmounting old /sys: Invalid argument. >> forcing unmount of /sys >> switchroot... >> > > My experience is you'd better to find a sysfs patch, since the sysfs > filesystem is required by ramdisk and some system utilities, e.g., system > network configuration scripts. > > Patch for mm-tree can be found here: > http://lxc.sourceforge.net/patches/2.6.26/ > > This is what I used: > http://lxc.sourceforge.net/patches/2.6.26/2.6.26-rc8-mm1-lxc1/broken-out/sysfs/ > > I merged these 11 patches on Linux-2.6.26.1 though I don't understand these > patches, luckily enough it worked for me. As mentioned Benjamin, it is hard to boot a distro without sysfs. I think it is a good idea to use the lxc patchset. You can use the latest version: http://lxc.sourceforge.net/patches/2.6.27/2.6.27-rc6-lxc1/ If you want to play with the container, you have the userspace tools at: http://lxc.sourceforge.net/download/lxc/ Don't forget to check the README in the directory ;) -- Daniel ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <48C93B3D.3050303-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>]
* Re: sysfs question [not found] ` <48C93B3D.3050303-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> @ 2008-09-11 15:53 ` xiaoming.zhang [not found] ` <200809112353.47144.zxm927-9Onoh4P/yGk@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: xiaoming.zhang @ 2008-09-11 15:53 UTC (permalink / raw) To: Daniel Lezcano Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, benjamin Thery On Thursday 11 September 2008 11:37:33 pm Daniel Lezcano wrote: > xiaoming.zhang wrote: > > On Thursday 11 September 2008 10:05:43 pm Mark Ryden wrote: > >> In fact, after looking more closely, I see that before that message > >> appears: Error: unmouting old /sys > >> ERROR unmounting old /sys: Invalid argument. > >> forcing unmount of /sys > >> switchroot... > > > > My experience is you'd better to find a sysfs patch, since the sysfs > > filesystem is required by ramdisk and some system utilities, e.g., system > > network configuration scripts. > > > > Patch for mm-tree can be found here: > > http://lxc.sourceforge.net/patches/2.6.26/ > > > > This is what I used: > > http://lxc.sourceforge.net/patches/2.6.26/2.6.26-rc8-mm1-lxc1/broken-out/ > >sysfs/ > > > > I merged these 11 patches on Linux-2.6.26.1 though I don't understand > > these patches, luckily enough it worked for me. > > As mentioned Benjamin, it is hard to boot a distro without sysfs. I > think it is a good idea to use the lxc patchset. > > You can use the latest version: > > http://lxc.sourceforge.net/patches/2.6.27/2.6.27-rc6-lxc1/ > Thank you very much. And is there any patchset for Linux-2.6.26.* (not the mm-tree)? > If you want to play with the container, you have the userspace tools at: > > http://lxc.sourceforge.net/download/lxc/ > > Don't forget to check the README in the directory ;) > > -- Daniel -- Have fun, Xiaoming Zhang ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <200809112353.47144.zxm927-9Onoh4P/yGk@public.gmane.org>]
* Re: sysfs question [not found] ` <200809112353.47144.zxm927-9Onoh4P/yGk@public.gmane.org> @ 2008-09-11 16:40 ` Daniel Lezcano 0 siblings, 0 replies; 7+ messages in thread From: Daniel Lezcano @ 2008-09-11 16:40 UTC (permalink / raw) To: xiaoming.zhang Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, benjamin Thery xiaoming.zhang wrote: > On Thursday 11 September 2008 11:37:33 pm Daniel Lezcano wrote: >> xiaoming.zhang wrote: >>> On Thursday 11 September 2008 10:05:43 pm Mark Ryden wrote: >>>> In fact, after looking more closely, I see that before that message >>>> appears: Error: unmouting old /sys >>>> ERROR unmounting old /sys: Invalid argument. >>>> forcing unmount of /sys >>>> switchroot... >>> My experience is you'd better to find a sysfs patch, since the sysfs >>> filesystem is required by ramdisk and some system utilities, e.g., system >>> network configuration scripts. >>> >>> Patch for mm-tree can be found here: >>> http://lxc.sourceforge.net/patches/2.6.26/ >>> >>> This is what I used: >>> http://lxc.sourceforge.net/patches/2.6.26/2.6.26-rc8-mm1-lxc1/broken-out/ >>> sysfs/ >>> >>> I merged these 11 patches on Linux-2.6.26.1 though I don't understand >>> these patches, luckily enough it worked for me. >> As mentioned Benjamin, it is hard to boot a distro without sysfs. I >> think it is a good idea to use the lxc patchset. >> >> You can use the latest version: >> >> http://lxc.sourceforge.net/patches/2.6.27/2.6.27-rc6-lxc1/ >> > Thank you very much. And is there any patchset for Linux-2.6.26.* (not the > mm-tree)? We worked most of the time sticked with the devel version of the kernel tree. The kernel which is the nearest of the version you are describing is 2.6.27-rc6-lxc1 which is not based on the -mm but on the 2.6.27 release candidate. IMO, this is the most stable version of the LXC. ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: sysfs question [not found] ` <dac45060809110701i49acb8e7m7d8e3ccea7c59ab7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2008-09-11 14:05 ` Mark Ryden @ 2008-09-11 14:49 ` Benjamin Thery 1 sibling, 0 replies; 7+ messages in thread From: Benjamin Thery @ 2008-09-11 14:49 UTC (permalink / raw) To: Mark Ryden; +Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA Hi Mark, Indeed booting a distro without sysfs can be tricky because, for example, initrd might need it (eg. Fedora). IIRC, to boot without sysfs, in addition to the "root=" option, you have to create some devices nodes in advance in your /dev tree (mainly the /dev/sda* ones, plus a bunch of others /dev/urandom, /dev/null, /dev/console, /dev/tty). mknod /dev/sda b 8 0 mknod /dev/sda1 b 8 1 ... But my advice to test netns is to apply the tagged directories sysfs patchses. It is a lot easier (and complete). Gregkh is merging the patchset to his tree today (he has added 6 out of the 8 remaining patches this morning) :) Once the patchset is completely merged I'll update the howto. Also I can send you tarball too if you want. Which kernel version do you use? Regards, Benjamin Mark Ryden wrote: > Hello, > I am trying to follow the > Linux Containers - Network Namespace configuration instructions from > http://lxc.sourceforge.net/network/configuration.php > > > I had built a kernel with CONFIG_SYS=n and CONFIG_NET_NS=y > and CONFIG_VETH=y , etc, according to the instructions. > > > Now, the CONFIG_SYSFS help text says: > > sysfs is currently used by the block subsystem to mount the root > partition. If sysfs is disabled you must specify the boot device on > the kernel boot command line via its major and minor numbers. For > example, "root=03:01" for /dev/hda1. > > > So I added root=08,02 to my kernel boot parameter line and booted. > > > it starts booting, but then gets: > switchroot: mount failed: No such file or directory. > Booting has failed. > > 8 is the majoror number and 2 is the minor number of /dev/sda2, where I have > my root partition. > > Googling for this found the following, which not helped much: > http://linux.derkeiler.com/Mailing-Lists/Kernel/2007-11/msg05032.html > > Any ideas? > Regards, > Mark > _______________________________________________ > Containers mailing list > Containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org > https://lists.linux-foundation.org/mailman/listinfo/containers > > -- B e n j a m i n T h e r y - BULL/DT/Open Software R&D http://www.bull.com ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-11 16:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-11 14:01 sysfs question Mark Ryden
[not found] ` <dac45060809110701i49acb8e7m7d8e3ccea7c59ab7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-11 14:05 ` Mark Ryden
[not found] ` <dac45060809110705r2474060bi71c657a23588975f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-09-11 14:26 ` xiaoming.zhang
[not found] ` <200809112226.59518.zxm927-9Onoh4P/yGk@public.gmane.org>
2008-09-11 15:37 ` Daniel Lezcano
[not found] ` <48C93B3D.3050303-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2008-09-11 15:53 ` xiaoming.zhang
[not found] ` <200809112353.47144.zxm927-9Onoh4P/yGk@public.gmane.org>
2008-09-11 16:40 ` Daniel Lezcano
2008-09-11 14:49 ` Benjamin Thery
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox