# UDEV Problems with cloned system

## RAPHEAD

Hi,

I have a master and a cloned gentoo system pretty much the latest portage stuff.

I have cloned the gentoo system via rsync to the slave's HDD including "/dev".

Problem is, when I boot the slave, the kernel recongizes the hardware

just fine but /dev is pretty empty. For example /dev/sda* is missing where

/dev/sda1 is actiually the device this system has booted from!

As a result the swap space cannot be added in the boot process.

Another result or maybe the cause seems to be this boot message:

Letting udev process events [!!]

I'd really like to know what I can do to get my /dev populated

I don't know much about udev but in theory I think

udev should create devices on its own -- right?

any help is appreciated

----------

## RAPHEAD

BUMP

----------

## firsttry

Hey, can't help you unfortunately, but thought I'd join your cry for help and bump this topic as I'm getting the same problem: how does this make any sense?

```
localhost dev # ls

adsp       ptybb  ptyq9  ptyv7  ram13       tty58  ttye4  ttyse  ttyxc

audio      ptybc  ptyqa  ptyv8  ram14       tty59  ttye5  ttysf  ttyxd

bus        ptybd  ptyqb  ptyv9  ram15       tty6   ttye6  ttyt0  ttyxe

cdrom2     ptybe  ptyqc  ptyva  ram2        tty60  ttye7  ttyt1  ttyxf

cdrom3     ptybf  ptyqd  ptyvb  ram3        tty61  ttye8  ttyt2  ttyy0

cdrw2      ptyc0  ptyqe  ptyvc  ram4        tty62  ttye9  ttyt3  ttyy1

cdrw3      ptyc1  ptyqf  ptyvd  ram5        tty63  ttyea  ttyt4  ttyy2

console    ptyc2  ptyr0  ptyve  ram6        tty7   ttyeb  ttyt5  ttyy3

core       ptyc3  ptyr1  ptyvf  ram7        tty8   ttyec  ttyt6  ttyy4

cpu        ptyc4  ptyr2  ptyw0  ram8        tty9   ttyed  ttyt7  ttyy5

disk       ptyc5  ptyr3  ptyw1  ram9        ttya0  ttyee  ttyt8  ttyy6

dsp        ptyc6  ptyr4  ptyw2  random      ttya1  ttyef  ttyt9  ttyy7

dvd2       ptyc7  ptyr5  ptyw3  rd          ttya2  ttyp0  ttyta  ttyy8

dvd3       ptyc8  ptyr6  ptyw4  sequencer   ttya3  ttyp1  ttytb  ttyy9

dvdrw2     ptyc9  ptyr7  ptyw5  sequencer2  ttya4  ttyp2  ttytc  ttyya

dvdrw3     ptyca  ptyr8  ptyw6  shm         ttya5  ttyp3  ttytd  ttyyb

fb         ptycb  ptyr9  ptyw7  snapshot    ttya6  ttyp4  ttyte  ttyyc

fb0        ptycc  ptyra  ptyw8  snd         ttya7  ttyp5  ttytf  ttyyd

fbsplash   ptycd  ptyrb  ptyw9  sound       ttya8  ttyp6  ttyu0  ttyye

fd         ptyce  ptyrc  ptywa  stderr      ttya9  ttyp7  ttyu1  ttyyf

full       ptycf  ptyrd  ptywb  stdin       ttyaa  ttyp8  ttyu2  ttyz0

gpmctl     ptyd0  ptyre  ptywc  stdout      ttyab  ttyp9  ttyu3  ttyz1

hda        ptyd1  ptyrf  ptywd  tts         ttyac  ttypa  ttyu4  ttyz2

hda1       ptyd2  ptys0  ptywe  tty         ttyad  ttypb  ttyu5  ttyz3

hda2       ptyd3  ptys1  ptywf  tty0        ttyae  ttypc  ttyu6  ttyz4

hda3       ptyd4  ptys2  ptyx0  tty1        ttyaf  ttypd  ttyu7  ttyz5

hda4       ptyd5  ptys3  ptyx1  tty10       ttyb0  ttype  ttyu8  ttyz6

hda5       ptyd6  ptys4  ptyx2  tty11       ttyb1  ttypf  ttyu9  ttyz7

hdb        ptyd7  ptys5  ptyx3  tty12       ttyb2  ttyq0  ttyua  ttyz8

initctl    ptyd8  ptys6  ptyx4  tty13       ttyb3  ttyq1  ttyub  ttyz9

input      ptyd9  ptys7  ptyx5  tty14       ttyb4  ttyq2  ttyuc  ttyza

kmem       ptyda  ptys8  ptyx6  tty15       ttyb5  ttyq3  ttyud  ttyzb

kmsg       ptydb  ptys9  ptyx7  tty16       ttyb6  ttyq4  ttyue  ttyzc

log        ptydc  ptysa  ptyx8  tty17       ttyb7  ttyq5  ttyuf  ttyzd

loop       ptydd  ptysb  ptyx9  tty18       ttyb8  ttyq6  ttyv0  ttyze

loop0      ptyde  ptysc  ptyxa  tty19       ttyb9  ttyq7  ttyv1  ttyzf

loop1      ptydf  ptysd  ptyxb  tty2        ttyba  ttyq8  ttyv2  urandom

loop2      ptye0  ptyse  ptyxc  tty20       ttybb  ttyq9  ttyv3  usbdev1.1_ep00

loop3      ptye1  ptysf  ptyxd  tty21       ttybc  ttyqa  ttyv4  usbdev1.1_ep81

loop4      ptye2  ptyt0  ptyxe  tty22       ttybd  ttyqb  ttyv5  usbdev1.3_ep00

loop5      ptye3  ptyt1  ptyxf  tty23       ttybe  ttyqc  ttyv6  usbdev1.3_ep81

loop6      ptye4  ptyt2  ptyy0  tty24       ttybf  ttyqd  ttyv7  usbdev1.3_ep82

loop7      ptye5  ptyt3  ptyy1  tty25       ttyc0  ttyqe  ttyv8  usbdev2.1_ep00

mem        ptye6  ptyt4  ptyy2  tty26       ttyc1  ttyqf  ttyv9  usbdev2.1_ep81

mixer      ptye7  ptyt5  ptyy3  tty27       ttyc2  ttyr0  ttyva  usbdev2.2_ep00

null       ptye8  ptyt6  ptyy4  tty28       ttyc3  ttyr1  ttyvb  usbdev2.2_ep81

nvidia0    ptye9  ptyt7  ptyy5  tty29       ttyc4  ttyr2  ttyvc  usbdev3.1_ep00

nvidiactl  ptyea  ptyt8  ptyy6  tty3        ttyc5  ttyr3  ttyvd  usbdev3.1_ep81

port       ptyeb  ptyt9  ptyy7  tty30       ttyc6  ttyr4  ttyve  usbdev4.1_ep00

ptmx       ptyec  ptyta  ptyy8  tty31       ttyc7  ttyr5  ttyvf  usbdev4.1_ep81

pts        ptyed  ptytb  ptyy9  tty32       ttyc8  ttyr6  ttyw0  usbdev5.1_ep00

ptya0      ptyee  ptytc  ptyya  tty33       ttyc9  ttyr7  ttyw1  usbdev5.1_ep81

ptya1      ptyef  ptytd  ptyyb  tty34       ttyca  ttyr8  ttyw2  vcs

ptya2      ptyp0  ptyte  ptyyc  tty35       ttycb  ttyr9  ttyw3  vcs1

ptya3      ptyp1  ptytf  ptyyd  tty36       ttycc  ttyra  ttyw4  vcs12

ptya4      ptyp2  ptyu0  ptyye  tty37       ttycd  ttyrb  ttyw5  vcs2

ptya5      ptyp3  ptyu1  ptyyf  tty38       ttyce  ttyrc  ttyw6  vcs3

ptya6      ptyp4  ptyu2  ptyz0  tty39       ttycf  ttyrd  ttyw7  vcs4

ptya7      ptyp5  ptyu3  ptyz1  tty4        ttyd0  ttyre  ttyw8  vcs5

ptya8      ptyp6  ptyu4  ptyz2  tty40       ttyd1  ttyrf  ttyw9  vcs6

ptya9      ptyp7  ptyu5  ptyz3  tty41       ttyd2  ttys0  ttywa  vcs7

ptyaa      ptyp8  ptyu6  ptyz4  tty42       ttyd3  ttyS0  ttywb  vcsa

ptyab      ptyp9  ptyu7  ptyz5  tty43       ttyd4  ttys1  ttywc  vcsa1

ptyac      ptypa  ptyu8  ptyz6  tty44       ttyd5  ttyS1  ttywd  vcsa12

ptyad      ptypb  ptyu9  ptyz7  tty45       ttyd6  ttys2  ttywe  vcsa2

ptyae      ptypc  ptyua  ptyz8  tty46       ttyd7  ttyS2  ttywf  vcsa3

ptyaf      ptypd  ptyub  ptyz9  tty47       ttyd8  ttys3  ttyx0  vcsa4

ptyb0      ptype  ptyuc  ptyza  tty48       ttyd9  ttyS3  ttyx1  vcsa5

ptyb1      ptypf  ptyud  ptyzb  tty49       ttyda  ttys4  ttyx2  vcsa6

ptyb2      ptyq0  ptyue  ptyzc  tty5        ttydb  ttys5  ttyx3  vcsa7

ptyb3      ptyq1  ptyuf  ptyzd  tty50       ttydc  ttys6  ttyx4  zero

ptyb4      ptyq2  ptyv0  ptyze  tty51       ttydd  ttys7  ttyx5

ptyb5      ptyq3  ptyv1  ptyzf  tty52       ttyde  ttys8  ttyx6

ptyb6      ptyq4  ptyv2  ram0   tty53       ttydf  ttys9  ttyx7

ptyb7      ptyq5  ptyv3  ram1   tty54       ttye0  ttysa  ttyx8

ptyb8      ptyq6  ptyv4  ram10  tty55       ttye1  ttysb  ttyx9

ptyb9      ptyq7  ptyv5  ram11  tty56       ttye2  ttysc  ttyxa

ptyba      ptyq8  ptyv6  ram12  tty57       ttye3  ttysd  ttyxb
```

My sda nodes have all disappeared - don't think I've done any major updates for a couple of days when I last tried using a usb drive...

Don't know if this helps, but here's the last 100 lines of my dmesg:

```
localhost dev # dmesg|tail -n 100

hub 1-0:1.0: USB hub found

hub 1-0:1.0: 8 ports detected

ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)

USB Universal Host Controller Interface driver v3.0

ACPI: PCI Interrupt 0000:00:1d.0[A] -> GSI 23 (level, low) -> IRQ 19

PCI: Setting latency timer of device 0000:00:1d.0 to 64

uhci_hcd 0000:00:1d.0: UHCI Host Controller

uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2

uhci_hcd 0000:00:1d.0: irq 19, io base 0x0000e480

usb usb2: configuration #1 chosen from 1 choice

hub 2-0:1.0: USB hub found

hub 2-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.1[B] -> GSI 19 (level, low) -> IRQ 20

PCI: Setting latency timer of device 0000:00:1d.1 to 64

uhci_hcd 0000:00:1d.1: UHCI Host Controller

uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3

uhci_hcd 0000:00:1d.1: irq 20, io base 0x0000e800

usb usb3: configuration #1 chosen from 1 choice

hub 3-0:1.0: USB hub found

hub 3-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.2[C] -> GSI 18 (level, low) -> IRQ 21

PCI: Setting latency timer of device 0000:00:1d.2 to 64

uhci_hcd 0000:00:1d.2: UHCI Host Controller

uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4

uhci_hcd 0000:00:1d.2: irq 21, io base 0x0000e880

usb usb4: configuration #1 chosen from 1 choice

hub 4-0:1.0: USB hub found

hub 4-0:1.0: 2 ports detected

ACPI: PCI Interrupt 0000:00:1d.3[D] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:00:1d.3 to 64

uhci_hcd 0000:00:1d.3: UHCI Host Controller

uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5

uhci_hcd 0000:00:1d.3: irq 16, io base 0x0000ec00

usb usb5: configuration #1 chosen from 1 choice

hub 5-0:1.0: USB hub found

hub 5-0:1.0: 2 ports detected

usb 1-5: new high speed USB device using ehci_hcd and address 3

usb 1-5: configuration #1 chosen from 1 choice

usb 2-2: new low speed USB device using uhci_hcd and address 2

usb 2-2: configuration #1 chosen from 1 choice

usbcore: registered new interface driver usblp

drivers/usb/class/usblp.c: v0.13: USB Printer Device Class driver

Initializing USB Mass Storage driver...

usbcore: registered new interface driver usb-storage

USB Mass Storage support registered.

input: Logitech USB Mouse as /class/input/input0

input: USB HID v1.10 Mouse [Logitech USB Mouse] on usb-0000:00:1d.0-2

usbcore: registered new interface driver usbhid

drivers/usb/input/hid-core.c: v2.6:USB HID core driver

PNP: PS/2 Controller [PNP0303:PS2K,PNP0f03:PS2M] at 0x60,0x64 irq 1,12

i8042.c: Detected active multiplexing controller, rev 1.1.

serio: i8042 KBD port at 0x60,0x64 irq 1

serio: i8042 AUX0 port at 0x60,0x64 irq 12

serio: i8042 AUX1 port at 0x60,0x64 irq 12

serio: i8042 AUX2 port at 0x60,0x64 irq 12

serio: i8042 AUX3 port at 0x60,0x64 irq 12

mice: PS/2 mouse device common for all mice

TCP cubic registered

Initializing XFRM netlink socket

NET: Registered protocol family 1

NET: Registered protocol family 17

NET: Registered protocol family 15

ieee80211: 802.11 data/management/control stack, git-1.1.13

ieee80211: Copyright (C) 2004-2005 Intel Corporation <jketreno@linux.intel.com>

ieee80211_crypt: registered algorithm 'NULL'

ieee80211_crypt: registered algorithm 'WEP'

ieee80211_crypt: registered algorithm 'CCMP'

ieee80211_crypt: registered algorithm 'TKIP'

Using IPI Shortcut mode

Time: tsc clocksource has been installed.

Time: acpi_pm clocksource has been installed.

ACPI: (supports S0 S3 S4 S5)

input: AT Translated Set 2 keyboard as /class/input/input1

Synaptics Touchpad, model: 1, fw: 6.1, id: 0xa3a0b3, caps: 0xa04713/0x10008

input: SynPS/2 Synaptics TouchPad as /class/input/input2

kjournald starting.  Commit interval 5 seconds

EXT3-fs: mounted filesystem with ordered data mode.

VFS: Mounted root (ext3 filesystem) readonly.

Freeing unused kernel memory: 232k freed

ACPI: PCI Interrupt 0000:00:1b.0[A] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:00:1b.0 to 64

nvidia: module license 'NVIDIA' taints kernel.

ACPI: PCI Interrupt 0000:01:00.0[A] -> GSI 16 (level, low) -> IRQ 16

PCI: Setting latency timer of device 0000:01:00.0 to 64

NVRM: loading NVIDIA UNIX x86 Kernel Module  1.0-9746  Fri Dec 15 09:54:45 PST 2006

ipw2200: Intel(R) PRO/Wireless 2200/2915 Network Driver, 1.1.4k

ipw2200: Copyright(c) 2003-2006 Intel Corporation

ACPI: PCI Interrupt 0000:02:03.0[A] -> GSI 22 (level, low) -> IRQ 22

ipw2200: Detected Intel PRO/Wireless 2200BG Network Connection

ipw2200: Detected geography ZZM (11 802.11bg channels, 0 802.11a channels)

EXT3 FS on hda5, internal journal

kjournald starting.  Commit interval 5 seconds

EXT3 FS on hda2, internal journal

EXT3-fs: mounted filesystem with ordered data mode.

NTFS-fs warning (device hda1): parse_options(): Option utf8 is no longer supported, using option nls=utf8. Please use option nls=utf8 in the future and make sure utf8 is compiled either as a module or into the kernel.

NTFS volume version 3.1.

Adding 506036k swap on /dev/hda3.  Priority:-1 extents:1 across:506036k

skge eth0: enabling interface

TKIP: replay detected: STA=00:c0:49:ec:54:48 previous TSC 000000000000 received TSC 000000000000

skge eth0: Link is up at 100 Mbps, full duplex, flow control none
```

Oh yeah, in case this is udev related I'm running udev104-r12, and have made no modification to any of the rules...

Any help... anyone??

----------

## firsttry

Had a look on this site, http://www.gentoo.org/doc/en/udev-guide.xml, which has a section on missing device nodes at boot, have a look if that can help you. When I do what it says:

```
# mkdir test

# mount --bind / test

# cd test/dev

# ls
```

all my sda* (and more) appear listed, though these aren't present in the normal /dev/ directory. According to the instructions there they need to be made one by one... is this actually what needs to be done? The faq there is actually only relevant to console and null devices - does this still apply? Don't really want to start changing things manually if there's another problem that I'm not seeing... plus I wouldn't know which devices (besides sda1-5 or so...) to add!

----------

## firsttry

Uhh... things started working on their own, don't know what went wrong...

Good luck with your predicament raphead!

----------

## John R. Graham

 *RAPHEAD wrote:*   

> ...
> 
> I'd really like to know what I can do to get my /dev populated
> 
> ...

 I've run into the same thing when using tape backup / restore to clone a system.  The issue is that special files don't copy properly unless special care is taken; rsync didn't make you a full copy of what was in /dev on your master machine. 

To fix it, on your "slave" system, boot a Live CD, mount your root partition to /mnt/gentoo, and run

```
cd /mnt/gentoo/dev

MAKEDEV -v generic
```

That should make UDEV a lot happier.  There's a man page for MAKEDEV if you want more information.

- John

----------

## RAPHEAD

Sorry,PPL for the late reply.

thanks for the input but I now found out what the problem is:

It was just that I have _NOT_ created the /sys dir on the clone

because I have rsynced withotut that directory.

somewhere I have read that udev is actually using the /sys FS and 

by that I figured out whats wrong. An error message by the init scripts would be really nice in that case.

Regarding MAKEDEV:

Are you sure that this is needed? 

I somewhere read that actually only a 'console' entry is needed

and the rest will be added by udev automatically.

One interesting point I just found out:

I dont have any of my ethernet devices in /dev

but this seems to be normal

----------

## John R. Graham

 *RAPHEAD wrote:*   

> ...
> 
> I somewhere read that actually only a 'console' entry is needed
> 
> ...

 You may be right.  The initial symptom that led me to the MAKEDEV solution after an unsuccessful system cloning attempt had to do with a "missing console" error message.  Passing "generic" to MAKEDEV may be somewhat overkill, however, once the system boots, no cruft is visible in the /dev directory:  nice clean results.

- John

----------

## risa2000

I have run into same problem yesterday. In fact I did use tar to move the system and also recreated /dev/console and /dev/null by hand. And also forgot to mkdir /sys. The problem was that few devices were there even then, but not all, and symptoms were a bit cryptic. I have been trying debugging udev, which was in fact perfectly fine   :Rolling Eyes:  . But this post saved my day. Thanks for following and contributing the solutions  :Smile: .

----------

