Genrate /dev/xvda using MAKEDEV

Generally, when I do my backups I ignore the /dev folder. Then, I usually populate /dev by using:

MAKEDEV generic
MAKEDEV std

However, this does not generate the /dev/xvda, /dev/xvdb, ….

Any idea how do this?

3 Replies

This is how I do it for distro images:

XEN_MAJOR=202
XEN_MINOR=0
for XEN_DRIVE in a b c d e f g h
do
    if [ ! -e xvd$XEN_DRIVE ]
        then mknod xvd$XEN_DRIVE b $XEN_MAJOR $XEN_MINOR
    fi
    let "XEN_MINOR = $XEN_MINOR + 16"
done
chown root:disk xvd*
chmod g+w xvd*

That creates them in pwd so you need to cd /dev first.

-James

Thanks.

Apparently if "Xenify distro" is enabled in the Linode Manager, this will be done when you boot :-)

@saman007uk:

Apparently if "Xenify distro" is enabled in the Linode Manager, this will be done when you boot :-)
Last I knew "xenify" didn't create device nodes. Maybe it's udev doing that for you?

-Chris

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct