-   Linux - Software (
-   -   linux from scratch build with linux-2.6.11 and my pktsetup problem! (

behmjoe 03-30-2005 09:24 PM

linux from scratch build with linux-2.6.11 and my pktsetup problem!

My whole linux experience has been grand, but i'm stalled on this part. udftools-1.0.0b3 using the build instructions from the current blfs-cvs. It built fine. I used the udftools patch and all, but didn't need the kernel patch because the kernel nows supports packet writing. My problem is this...

$ pktsetup /dev/pktcdvd0 /dev/hdf
ioctl: Inappropriate ioctl for device

Well i don't know what to do. Can someone help me. Has anyone ran into this problem? Do i need a different patch for udftools? Must i change my udev config? Must i take a hammer to my computer?

Peace out
fight the flower power take regular showers

foo_bar_foo 03-31-2005 12:35 AM

hmmmmmmm i haven't used this but these are the troubleshooting steps i would go through

first thing if you built the kernel driver as a module you have to load it and possibly at boot so udev can create device nodes
(i think it's called pktcdvd ?) like you hadn't got that far

you might want to try building udftools without that patch -- it might be specific for the kernel ??
read this
check out how the instructions are different for kernel 2.6.8 (the one blfs is written for)
in particular device names seem to be different with the newer kernel driver ?
try reading kernel docs /Documentation/cdrom/packet-writing.txt
and check out the script there /etc/init.d/cdrw
it seems to be a smart try at the pktsetup command
like always go back and try
unset CFLAGS
and see if that fixes it

since you are using the newer kernel module than is in the instructions try to get the newest udftools
possibly even from cvs

sorry can't help more

behmjoe 03-31-2005 06:19 PM


Yes, i used the current code for udftools not cvs, but udftools-1.0.0b3 from the blfs cvs current. I tried not patching, and patching, and i still get the same problem. The lfs-6.0 udev setup automatically installs the /dev/pktcdvd0 node into the dev tree. I was wondering what the blfs patch does to pktsetup.c. I am new to code and i really need to work on understanding it. I seem to be at a standstill trying to mount a cdrw read write.

later g

Andrew Benton 03-31-2005 07:11 PM

I looked at the udftools page but it didn't seem like the right tool for the job to me, so I didn't install it and I can't tell you how to make it work. But I can say that dvd+rw-tools- works really well making rewritable dvds for me. It uses cdrtools as a backend

behmjoe 03-31-2005 07:31 PM


I think i found the root of the problem. In the /dev tree i have /dev/pktcdvd which appears as a character device, and /dev/pktcdvd0 which appears as a regular file. It should be a block device i think. How does one setup udev to make the proper device. Also i have the packet writing driver built into my kernel. I haven't attempted a modular kernel yet cause i want everything to work properly before i delve into the modular complications.


foo_bar_foo 04-01-2005 12:01 AM

show us
ls -l /dev/pktcdvd*

what i see in the kernel docs is


i think that would be a folder pktcdvd with 0,1,2,3 in it ?
but it really doesn't matter what the device name is
major device number should be 97 with minor numbers 0,1,2 and like that

if /dev/pktcdvd is 97 0 have you tried
pktsetup /dev/pktcdvd /dev/hdf

i cant figure out the udev rules (sorry)
you could try as a test (if there is no pktcdvd1)
mknod /dev/pktcdvd1 b 97 1
pktsetup /dev/pktcdvd1 /dev/hdf

behmjoe 04-01-2005 12:47 AM


well heres the current setup

ls -l /dev/pktcdvd*
crw- --- --- 10, 63 /dev/pktcdvd
-r-- --x r-t 0 /dev/pktcdvd0

so is this wrong the /etc/udev/rules.d and /etc/udev/permissions.d directories contain two files each 25* 50* respectively, and none of the files reference pktcdvd. Shouldn't one of the pktcdvd's be a block device? I don't think the nodes have the proper major and minor numbers so i want to know how to get udev to create them. I really do not want to physically create them. That would go against the udev philosophy and be uncomfortable to me.


behmjoe 04-01-2005 06:17 AM


ok an update i added this line to my /etc/udev/50-udev.permissions:


I added these lines to my /etc/udev/rules.d/50-udev.rules:

KERNEL="pktcdvd", NAME="pktcdvd/control"
KERNEL="pktcdvd[0-9]*", NAME="pktcdvd/pktcdvd%n"

the results:

ls /dev/pktcdvd

I have the control device, but no pktcdvd*. What is up with this why do i not have this node. Does anyone know how to fix this?


behmjoe 04-02-2005 04:32 AM


yet another update. after being angry for a while i did:

ls /dev/pktcdvd

pktsetup /dev/pktcdvd/pktcdvd0 /dev/hdf
ioctl: Inappropriate ioctl for device

ls -l /dev/pktcdvd*
crw- --- --- 10, 63 /dev/pktcdvd/control
-r-- --x r-t 0 /dev/pktcdvd/pktcdvd0

pktsetup /dev/pktcdvd/pktcdvd0 /dev/hdf
ioctl: Inappropriate ioctl for device

I am still frustrated, but this probably speaks volumes of what my problem is, but i still don't have a clue to how for that matter what the hell is going on. Please SOS!!! If any sly cat's out their have worked some magic when in this same spot.

All times are GMT -5. The time now is 06:44 AM.