Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev update killed my system - HELP please :-(
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
audiodef
Watchman
Watchman


Joined: 06 Jul 2005
Posts: 5263

PostPosted: Mon Apr 09, 2012 4:07 pm    Post subject: Reply with quote

Good, this isn't just me. Someone decided it would be fun to drop a bomb down the pipe.

You have to boot in with sysresccd or some such, chroot, and configure your kernel to enable devtmpfs. Make sure you etc-update or dispatch-conf, too.

Well, this is one possible way. I had three machines fire-bombed by this udev party-killer, and that's how I fixed it.

Note: just enable devtmpfs. Don't enable the keep-mounted or whatever option just under that.
_________________
Gentoo Studio: http://gentoostudio.org
Facebook: http://www.facebook.com/gentoostudio
G+: https://plus.google.com/113947758237122861689/posts
Pappy's Kernel Seeds: http://kernel-seeds.org
Back to top
View user's profile Send private message
steveL
Advocate
Advocate


Joined: 13 Sep 2006
Posts: 2486
Location: The Peanut Gallery

PostPosted: Mon Apr 09, 2012 5:03 pm    Post subject: Reply with quote

audiodef wrote:
Note: just enable devtmpfs. Don't enable the keep-mounted or whatever option just under that.

That does work fine, since udev-mount (which is needed by udev in sysinit) mounts /dev from devtmpfs if it can; but it'll also work fine with CONFIG_DEVTMPFS_MOUNT (you just get an ok message saying /dev is already mounted.)

Having it enabled just makes things easier when you have a problem booting and start a rescue shell/ single-user mode, especially if you have lvm partitions, since they will now be accessible under their kernel names. (And if you have them listed under those in /etc/fstab then they can easily be mounted with mount -a.)

=======
Summary:
=======
If you have /usr and/or /var on a separate partition (including lvm) and you don't currently have an initramfs, then your options are:
1) The supported route: Setup an initramfs.
2) Use a couple of patches to openrc initscripts to make udev start after localmount.
3) Use sys-apps/eudev

Potentially the list of required partitions could include /opt if third-party drivers or support scripts are installed there (or directories are read or written to by the same.)
Back to top
View user's profile Send private message
dustfinger
Guru
Guru


Joined: 15 Aug 2004
Posts: 420

PostPosted: Mon Feb 11, 2013 7:56 am    Post subject: Reply with quote

Hi,

I have /usr on its own partition. I have been so busy that I have been dealing with this udev issue by simply not rebooting my system - LOL! I finally got around to setting up initramfs to mount /usr early. To do this I chose to follow The Gentoo Wiki - Early_Userspace_Mounting. When I rebooted I was presented with an error that was similar to:
Code:
803 on /mnt/root failed

It also complained that the file or directory did not exist. Eek! Well, this error dropped me to the rescue shell thank goodness. So I mounted root manually and also mounted /usr and /boot. This gave me:
Code:
/mnt/root
/mnt/root/usr
/mnt/root/boot


I then chroot /mnt/root (Note that the chroot is necessary for the repackaging of the image to work) and edited the /usr/src/initramfs/init provided in the wiki mentioned above. There is a function in that script called uuidlabel_root. I commented out everything in that function and replaced it with an explicit mount to my root. This happens to be:
Code:
mount -o ro /dev/sda5 /mnt/root

I don't really understand why the fancy method which detects the correct device node for root was failing, but an explicit mount for my particular system got me up and running. After making that change I followed the instructions to re-package the image on boot and then rebooted my system. I am happy once again.

This is really just an FYI to anyone following that wiki.

By the way, how will we be informed when udev is fixed. I will want to get rid of this initramfs hack once it is no longer required.

Sincerely,

dustfinger.
_________________
Unanswered Post Initiative:
http://forums.gentoo.org/viewtopic.php?t=119906
Back to top
View user's profile Send private message
DaggyStyle
Advocate
Advocate


Joined: 22 Mar 2006
Posts: 4926

PostPosted: Mon Feb 11, 2013 11:46 am    Post subject: Reply with quote

dustfinger wrote:
Hi,

I have /usr on its own partition. I have been so busy that I have been dealing with this udev issue by simply not rebooting my system - LOL! I finally got around to setting up initramfs to mount /usr early. To do this I chose to follow The Gentoo Wiki - Early_Userspace_Mounting. When I rebooted I was presented with an error that was similar to:
Code:
803 on /mnt/root failed

It also complained that the file or directory did not exist. Eek! Well, this error dropped me to the rescue shell thank goodness. So I mounted root manually and also mounted /usr and /boot. This gave me:
Code:
/mnt/root
/mnt/root/usr
/mnt/root/boot


I then chroot /mnt/root (Note that the chroot is necessary for the repackaging of the image to work) and edited the /usr/src/initramfs/init provided in the wiki mentioned above. There is a function in that script called uuidlabel_root. I commented out everything in that function and replaced it with an explicit mount to my root. This happens to be:
Code:
mount -o ro /dev/sda5 /mnt/root

I don't really understand why the fancy method which detects the correct device node for root was failing, but an explicit mount for my particular system got me up and running. After making that change I followed the instructions to re-package the image on boot and then rebooted my system. I am happy once again.

This is really just an FYI to anyone following that wiki.

By the way, how will we be informed when udev is fixed. I will want to get rid of this initramfs hack once it is no longer required.

Sincerely,

dustfinger.


using latest stable udev-197, /usr on separate partition, no initramfs and system boots.
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
chris972
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2012
Posts: 97

PostPosted: Mon Feb 11, 2013 9:52 pm    Post subject: Reply with quote

My OpenVZ Kernel doesn't contain DEVTMPFS option, so, what can I do plz ?
Back to top
View user's profile Send private message
dustfinger
Guru
Guru


Joined: 15 Aug 2004
Posts: 420

PostPosted: Wed Feb 13, 2013 1:25 pm    Post subject: Reply with quote

Hi chris972,

According to DaggyStyle the latest stable version of udev is no longer affected by this issue. You no longer need to mount the /usr partition early using initramfs. I have not tried to remove my initramfs yet, nor have I looked at the bug reports to see exactly when the fix was made for udev. I am just so darn busy all of the time :-P

Best of luck!

Sincerely,

dustfinger.
_________________
Unanswered Post Initiative:
http://forums.gentoo.org/viewtopic.php?t=119906
Back to top
View user's profile Send private message
chris972
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2012
Posts: 97

PostPosted: Wed Feb 13, 2013 1:55 pm    Post subject: Reply with quote

Well... My english is not very good but i'll try to explain.
I haven't /usr separate, but i have an openvz kernel. And openvz kernel doesn't have DEVTMPSFS option.
So, I can't update udev.
For the moment, this works, but how long ?
What will I have to do when udev update will be required to maintain all my system ?
Have I to forget openvz ?
This situation is not good at all.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2129
Location: Finland

PostPosted: Wed Feb 13, 2013 2:26 pm    Post subject: Reply with quote

chris972 wrote:
Well... My english is not very good but i'll try to explain.
I haven't /usr separate, but i have an openvz kernel. And openvz kernel doesn't have DEVTMPSFS option.
So, I can't update udev.
For the moment, this works, but how long ?
What will I have to do when udev update will be required to maintain all my system ?
Have I to forget openvz ?
This situation is not good at all.


How do you mean? The release of 2.6.32:

http://lwn.net/Articles/364927/

Says:

"Linus has released 2.6.32 on the usual "right after LWN publishes its weekly edition" schedule. Some of the more significant features in 2.6.32 include devtmpfs"

And when I look at latest openvz-sources in tree, it says:

sys-kernel/openvz-sources-2.6.32.72.10

Then I extracted the source tarball and grepped though the source tree, and DEVTMPFS is mentioned dozens of times.

And when I look at latest required kernel of the udev-197-r8 ebuild:

2.6.32

If you can't use the oldest stable series from http://www.kernel.org/ then you have much bigger problems than just udev.
Back to top
View user's profile Send private message
chris972
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2012
Posts: 97

PostPosted: Wed Feb 13, 2013 2:45 pm    Post subject: Reply with quote

I don't understand all what you mean, my english is really too bad, but, I'm certain openvz doesn't contain devtmpfs, and a lot of users are not happy with that.
You should look openvz kernel sources better :
Code:
# grep -A2 "config DEVTMPFS" ./drivers/base/Kconfig
config DEVTMPFS
        bool "Create a kernel maintained /dev tmpfs (EXPERIMENTAL)"
        depends on HOTPLUG && SHMEM && TMPFS && !VE
--
config DEVTMPFS_MOUNT
        bool "Automount devtmpfs at /dev"
        depends on DEVTMPFS


The "!VE" makes all the difference. You CAN'T activate it with openvz, because devels consider OpenVZ can't work with DEVTMPFS.
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2129
Location: Finland

PostPosted: Wed Feb 13, 2013 2:57 pm    Post subject: Reply with quote

chris972 wrote:
I don't understand all what you mean, my english is really too bad, but, I'm certain openvz doesn't contain devtmpfs, and a lot of users are not happy with that.
You should look openvz kernel sources better :
Code:
# grep -A2 "config DEVTMPFS" ./drivers/base/Kconfig
config DEVTMPFS
        bool "Create a kernel maintained /dev tmpfs (EXPERIMENTAL)"
        depends on HOTPLUG && SHMEM && TMPFS && !VE
--
config DEVTMPFS_MOUNT
        bool "Automount devtmpfs at /dev"
        depends on DEVTMPFS


The "!VE" makes all the difference. You CAN'T activate it with openvz, because devels consider OpenVZ can't work with DEVTMPFS.


OK, I stand corrected. I'm afraid your only option is to copy old sys-fs/udev to local overlay then, along with sys-apps/module-init-tools.
The OpenVZ developers need to fork udev if they don't plan in supporting DEVTMPFS. Crazy as it sounds.
Back to top
View user's profile Send private message
chris972
Tux's lil' helper
Tux's lil' helper


Joined: 02 Mar 2012
Posts: 97

PostPosted: Wed Feb 13, 2013 3:07 pm    Post subject: Reply with quote

ssuominen wrote:
I'm afraid your only option is to copy old sys-fs/udev to local overlay then, along with sys-apps/module-init-tools.

You mean in its actual version that doesn't require devtmpfs, so 171 ?
But, when my gentoo will require udev > 171, what will be my situation ?
Quote:
The OpenVZ developers need to fork udev if they don't plan in supporting DEVTMPFS. Crazy as it sounds.

Or udev devel to find a solution to not require devtmpfs...

Thanks for your help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum