Wednesday, April 18, 2007

gotcha with /dev and udev when copying system

Usually I use

cd /
tar -clf - .|(cd /mnt;tar -xpf -)

to make a copy of a system. However, with newer systems running udev, this will cause problems as it does not copy /dev, which gets put on its own partition. So you will not be able to boot into a system unless you copy the /dev entries (it has a basic skeleton including vital files such as /dev/console and /dev/sda etc, stuff not needed for most boot environments will be created by udev dynamically)

No comments: