Home > English, Tech Crunch > HOWTO Populate /dev with static files on Debian

HOWTO Populate /dev with static files on Debian

This article was first written in December 2005 for the BeezNest technical
website (http://glasnost.beeznest.org/articles/320).

In some situation (when using previously devfs, for example), your /dev is empty of static files, and moving to udev or coming back to static /dev is then impossible.

In package debootstrap on Debian, there is the file /usr/lib/debootstrap/devices.tar.gz (or /usr/share/debootstrap/devices.tar.gz in newer releases) which only contains standard /dev files.

To set them in place is then just:

# cd /mount_point
# tar zxvf /usr/lib/debootstrap/devices.tar.gz

Of course, your /dev must not be mounted with udev or devfs for this to work, so it may be necessary to boot from a CD (for example) and mount your adequate partitions (containing /dev and /usr/lib) before doing this.

Example procedure

Your installation is broken because the system does not find some devices at boot (ex.: /dev/console or /dev/null).

  • Boot on a Debian or Ubuntu CD (not necessarily a LiveCD)
  • Switch to console (alt-f2 – Enter)
  • Mount the partition on the harddrive where / is located (ex: /dev/hda3) on /floppy
  • Mount the partition on the harddrive where /usr is located, if separate, under /floppy/usr
  • Change to directory /floppy
  • Execute tar zxvf usr/lib/debootstrap/devices.tar.gz
  • Reboot
Advertisements
Categories: English, Tech Crunch Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: