PDA

View Full Version : Looking for makedev in SLES 11 SP1



caro24
05-Apr-2013, 13:31
makedev ist not available. Where can I get it?
Thanks in advance!

malcolmlewis
05-Apr-2013, 14:18
On Fri 05 Apr 2013 12:34:04 PM CDT, caro24 wrote:


makedev ist not available. Where can I get it?
Thanks in advance!




Hi
It's just a script that has been around for a long time.....

See here;
http://software.opensuse.org/package/makedev
It's a noach package so can be extracted and copied to /usr/sbin.

I do note the comment "You do not need this script on SUSE Linux, but it is needed for FHS 2.1."

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.3 (x86_64) Kernel 3.7.10-1.1-desktop
up 3 days 20:47, 4 users, load average: 0.04, 0.09, 0.07
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

jmozdzen
05-Apr-2013, 14:32
Hi caro24,

from what I can see, makedev has been obsoleted at least by udev and is no longer included.

What is it that you need that specific package for? Maybe we can help with a different approach.

Regards,
Jens

caro24
05-Apr-2013, 14:43
Thanks for your help. makedev is always customized for different distros, so I hoped for a special SLES-variant. However, the OpenSuse-version seems to work.

But I'm always open for better solutions. What I want to do is building a script for making an image of a running linux system like the one in ec2-bundle-vol for AWS.
I create a blank image file with dd, format and mount it and then rsync the local drive. Afther that I create console, null and zero with makedev.
I never used udev before...

caro24
05-Apr-2013, 15:02
Hm... using the OpenSuse-verion, I can create console, but not null and zero.

jmozdzen
05-Apr-2013, 15:05
Hi caro24,

"makedev" is a helper to create device nodes, typically in /dev. While this had been quite some task in earlier days (leading to scripts like "makedev"), nowadays the files in /dev are created automatically. If you look at how your SLES is set up, you'll notice that /dev is no standard file system (like ext2/3/4), but mounted as

udev on /dev type tmpfs (rw,mode=0755)
Thus, any device node you create in /dev will be gone after the next reboot. It's being taken care of by "udev", which's job it is to detect even run-time changes (USB plug & unplug operates etc.) and to create nodes accordingly.

If you're for some reason in a position that you need to create those few devices you mentioned (rather than having udev let it do for you), simply use "mknod" (see "man 1 mknod") as the command actually used by the former "makedev" scripts. I bet that the script contained in todays "makedev" package is rather... empty.

Regards,
Jens

jmozdzen
05-Apr-2013, 15:22
mknod /dev/zero c 1 5
mknod /dev/null c 1 3
mknod -m 600 /dev/console 5 1

Again, if you have a properly set up system, udev takes care of this.

Regards,
Jens

caro24
05-Apr-2013, 16:11
Oh... that was too easy :-)
The guys from the AWS community recommended to create these devices manually. However, as you said, all devices have been created correctly on startup.

Again, thanks for your help.