Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: Packet Writing on CD-RW media (mount rw, ala InCD)
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

PostPosted: Sun Dec 19, 2004 6:44 am    Post subject: Finally CDRW is working AGAIN. Reply with quote

Finally, I was able to make the CDRW packet writing work again. Here are the details:

I used Kernel-2.6.10-rc3 as it has build-in UDF file system.
Because it is still not in portage stable branch I did:
Code:
ACCEPT_KEYWORDS="~x86" emerge development-sources -vp
(next repeat the command without "p" if everything looks OK).


Upgrade kernel as usual (everybody has their own slightly different method):
Code:
cd /usr/src
rm linux
ln -s linux-2.6.NEW-gentoo linux ; substitute NEW for new version.
cd linux
cp ../linux-2.6.OLD-gentoo/.config .
make oldconfig
[ At this point, it will ask you what settings you want for the options that have changed since 2.6.OLD-gentoo]
make && make modules_install
mount /boot
(backup your working kernel; I copy working kernel to old one and copy the new-one over current one).
cp arch/i386/boot/bzImage /boot/kernel-2.6.DEFAULT-gentoo
cp System.map /boot/System.map-2.6.DEFAULT-gentoo


Quote:
Make sure these settings are enabled:
Device Drivers ---->
Block Drivers ---->
<*> Packet writing on CD/DVD Media (EXPERIMENTAL)
( 8 ) Freebuffers for data gathering
[ ] Enable write caching
File Systems ---->
CD-ROM/DVD Filesystems ---->
<*> UDF Filesystem Support


Reboot

Got to /dev directory and delete (or move somewhere else) all "pktcdvd" files (we will setup new one):
Code:
#rm pktcdvd*


Next emereg udftools-1.0.0b-r3 (because it is still in unstable branch) you do:
Code:
#ACCEPT_KEYWORDS="~x86" emerge udftools


Next, we will setup your new dev name, you can name it whatever you want but you must be consistent and change the name in fstab as well.
Quote:
as lunatc has mention in post above:
IIRC something changed on newer kernels (i think it was on 2.6.8.1 on something related with ioctl or so, not sure..), so the pktsetup command changed the format from pktsetup /dev/cdroms/pktcdvd0 /dev/hdc to pktsetup device_name /dev/hdc


so I followed his pattern and use the same format:
To setup device I use
Code:
#pktsetup cdwri /dev/cdrom


the above command should create directory /dev/pktcdvd and two files in there you can check it:
Code:
/dev/pktcdvd/ll
brw-r-----  1 root root 254,  0 Dec 18 21:00 cdwri
crw-r--r--  1 root root  10, 63 Dec 18 20:25 control

As I've mentioned above you need to use the same name in fstab:
Code:
/dev/pktcdvd/cdwri         /mnt/cdrw        udf        noauto,noatime,rw,users 0 0

I don't know if you have the same start-up script in /etc/init.d/cdrw if not use this one from this page
Quote:
(File: /etc/init.d/cdrw) you will find in at the bottom:
http://gentoo-wiki.com/HOWTO_Packet_Writing_on_CD-RW


Some notes:
If you have an CDRW icon on your desktop, edit it. Right click the icon - go to
Quote:
Properties - Devices and use: /dev/pktcdvd/cdwri


restart the cdrw
Code:
/etc/init.d/cdrw start


you should be able to mount your cdrw if it is formated.
You can format the CDRW as packet writing as normal user:
Code:
$ cdrwtool -d /dev/hdc -q

(hdc is your CDRW device) if you don't know what it is use command:
Code:
dmesg | grep -i dvd
;you should see something like:
hdc: PLEXTOR CD-R PX-W8432T, ATAPI CD/DVD-ROM drive

When you format the CDRW first time and mount it the owner will be root:
Quote:
/mnt/ll
drwxr-xr-x 3 root root 152 Dec 18 20:14 cdrw


While the CDRW is mounted change the owner to yourself:
Code:
chown joseph:user /mnt/cdrw

(next time you mount it, it will retain the ownership - I don't know why it that or how to change it)
_________________
#Thelma
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Sun Dec 19, 2004 8:49 am    Post subject: Reply with quote

can you drag large files (500MB say) to the icon and not have it hang?

does this work with dvd+rw media too?

regards
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

PostPosted: Sun Dec 19, 2004 5:10 pm    Post subject: Reply with quote

Cintra wrote:
can you drag large files (500MB say) to the icon and not have it hang?

does this work with dvd+rw media too?

regards


I wanted to answer your question, try to burn 500+Mb file to CDRW and guess what I got when I try to mount CDRW this morning:

mount: /dev/pktcdvd/cdwri is not a valid block device

What a disappointment!!!
I was working all day on it yesterday, and by the end of day it was working fine I posted those instructions how I did it, and everything went for nothing.
CDRW has be on the market for about 10years and the technology is so unreliable under Linux!
_________________
#Thelma
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Sun Dec 19, 2004 5:37 pm    Post subject: Reply with quote

I was afraid of that :-(

I was overjoyed a while back on finding 2.6.10 had a new packet option setting.

As a previous user of InCD on XP for small backups, I thought "at last", tried dragging files to InCD formatted dvd+rw media, they appeared to work OK, BUT only on small-ish files... ended up with all sorts of hangs with the big ones, so I put it on the back burner.

regards
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

PostPosted: Sun Dec 19, 2004 6:52 pm    Post subject: Reply with quote

Cintra wrote:
I was afraid of that :-(
[snip]


ADDITIONAL INSTRUCTION - to my previous post above.

I was able to make it to work again apparently I skipped one setup instructions.

Explanation:
Upon showdown, the CDRW is teared-down by pktsetup according to startup scrip /etc/init.d/cdrw but to set it up again it is looking for your CDRW or DVDRW device in /etc/conf.d/cdrw

Code:
/etc/conf.d/cdrw 
 # List the CD-Rom drives you wish to enable packet writing on here.
 # Some examples follow:
 #cdrw_list="/dev/hdd"
 #cdrw_list="/dev/sr0 /dev/sr1 /dev/sr2"
 #cdrw_list="/dev/cdroms/cdrom0 /dev/cdroms/cdrom1"
 cdrw_list="/dev/hdc"


hdc - is my CDRW yours might be different.
(see above how to look-it-up).

Back to your question:
I generated 561Mb file tar.gz (as it is faster to copy one big file than a folder with with many small files - from my past experience).
It took me 18min. to write this file to CDRW at speed 4x
I checked md5sum before burning and after when I copied it back from CDRW, there were no errors.

I restarted computer and CDRW is working as it suppose to :-)
_________________
#Thelma
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Sun Dec 19, 2004 8:21 pm    Post subject: Reply with quote

Oh excellent! I'm happy your howto still stands.. fast too!

How about dvd+rw?

mvh
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
Joseph_sys
Advocate
Advocate


Joined: 08 Jun 2004
Posts: 2571
Location: Edmonton, AB

PostPosted: Sun Dec 19, 2004 8:39 pm    Post subject: Reply with quote

Cintra wrote:
Oh excellent! I'm happy your howto still stands.. fast too!

How about dvd+rw?

mvh


I would test it on DVD-RW if I had one.
Though I think it should make no difference what RW media it is. You just have to configure it so linux will recongize it.
If you have both CDRW and DVDRW, first list them both in /etc/conf.d/cdrw accordingly and generate new setup like:
Code:
pktsetup dvdrw1 /dev/your_device_name

and
add this name to fstab. I think it is all you need (correct me anybody if I've missed anything).
_________________
#Thelma
Back to top
View user's profile Send private message
lunatc
Guru
Guru


Joined: 18 Apr 2002
Posts: 409
Location: Canary Islands. Spain

PostPosted: Tue Dec 28, 2004 12:16 pm    Post subject: Reply with quote

Kernel 2.6.10 Released!
Wow! Packet writing is now included into the stable kernel! :D
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Jan 01, 2005 6:14 am    Post subject: Reply with quote

lunatc wrote:
Kernel 2.6.10 Released!
Wow! Packet writing is now included into the stable kernel! :D

But does it work with gentoo-dev-sources-2.6.10 ?

I've compiled the right things in the kernel and when I reboot I have a character device /dev/pktcdvd. (I'm using udev)

It was mentioned above this should be a directory. So I delete it and create the directory /dev/pktcdvd

I then run pktsetup dvdrw /dev/hdb which creates a character node control and a block node dvdrw in the /dev/pktcdvd directory.

At this point I am at a loss. I have tried starting the /etc/init.d/cdr script, but it fails. I try to format a disc and I get this error
Code:
Initiating quick disc blank
wait_cmd: Input/output error
Command failed: a1 01 00 00 00 00 00 00 00 00 00 00 - sense 02.30.00
blank disc: Illegal seek

I'm using udftools-1.0.0b-r4 from portage and I thought the patch was applied already.

Any suggestions?
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Jan 01, 2005 6:30 am    Post subject: Reply with quote

I think my problem is I'm trying this with a DVD+rw and its not needed.
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Sat Jan 01, 2005 12:06 pm    Post subject: Reply with quote

headrush wrote:
I think my problem is I'm trying this with a DVD+rw and its not needed.

Hei headrush

Did you get it to work on dvd+rw?

I've just got around to using the above cd-rw setup. Had some trouble dropping files onto the desktop 'dvdwri' icon, but was able to drag & drop OK inside Konqueror - am now enjoying music from this first burn.

Edit: dvd+rw worked fine with the same 216MB folder transfer, and dropping to the desktop icon, while playing music...
Next for some big files...

Thanks to Joseph_sys and others for sorting out packet writing on Gentoo and a Happy New Year to all :-)
_________________
"I am not bound to please thee with my answers" W.S.


Last edited by Cintra on Fri Jun 03, 2005 5:22 am; edited 1 time in total
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Sat Jan 01, 2005 6:23 pm    Post subject: Reply with quote

I scrapped the packet writing feature from the kernel config.
I use DVD+RW exclusively except for CD-R when burning ISOs.

The "normal" writing to DVD+RW worked fine for me including a 650MB avi file.

Once the copying dialog box is finished, the writer continued to burn and after a minute or so it was done and stopped. Loaded the DVD into Windows and it read it fine.
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Sat Jan 01, 2005 10:04 pm    Post subject: Reply with quote

Well, I was enthusiastic like Joseph_sys was earlier - after rebooting from XP and trying to mount the dvd+rw I get
Code:

mount: /dev/pktcdvd/dvdwri is not a valid block device

Furthermore I see the following error during boot
Code:

Jan  1 22:33:29 p4pe rc-scripts: ERROR:  "/etc/init.d/cdrw" has syntax errors in it; not executing...

but I'm using the cdrw script from
http://gentoo-wiki.com/HOWTO_Packet_Writing_on_CD-RW

Edit: from another thread entry of mine:
"my problem is solved... I copied the cdrw script again from wiki page dated Jan 2nd and did:
Code:
# chown root.daemon /etc/init.d/cdrw
# chmod 0770 /etc/init.d/cdrw
# mknod /dev/pktcdvd0 b 97 0
#  /etc/init.d/cdrw start   (and now it ran!)
 * Re-caching dependency info (mtimes differ)...
 * Enabling CD-RW packet writing on /dev/hdc ...                                                            [ ok ]

and I was in business again...
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
Inssomniak
n00b
n00b


Joined: 03 Aug 2004
Posts: 12

PostPosted: Mon Jan 03, 2005 10:08 pm    Post subject: pktwrite and udev, my hack Reply with quote

using kernel 2.6.10-gentoo-r2 (gentoo-dev-sources) with pktcdvd compiled right in.
using latest udftools -r4

this took me a bit of time to get working, mainly because when the pktcdvd driver is loaded, it created a character device /dev/pktcdvd, instead of a block device.

I created this udev rule to run a small script to make it as a directory.

KERNEL="pktcdvd" PROGRAM="/etc/udev/scripts/pktcdvd.sh"

which in turn runs this script to do the work:

#!/bin/bash

mkdir /dev/pktcdvd

its simple and dirty, and could easily be solved by using the RC_DEVICE_TARBALL=yes, but I refuse to, thats not what udev is about.

I imagine once the pktcdvd driver is fixed to create it as a directory so pktsetup knows what to do with it, it wont be needed, but this worked perfectly for me now.

I found it that if you were using konqueror to transfer your files to your dvd, that is was very slow (no "sync" option in fstab), but to copy the same file over at the prompt, was very fast (top speed of the recorder) . no idea how to fix that up.

hope this helps some ppl
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Tue Jan 04, 2005 2:44 pm    Post subject: Reply with quote

Hei Inssomniak

Thanks for the pktcdvd idea above..

Edit: I cleaned this post up a lot...

Am now back in business - the above udev rule is not needed in 2.6.10.

After removing it, and using some neat footwork, I got back to the correct contents in /dev/pktcdvd ie 'dvdwri and control', and now packet writing works a charm.

I emerged krusader too - it copies and drag&drops folders to /mnt/dvdrw without trouble - looks a bit like a cut-down konqueror...

mvh
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
Inssomniak
n00b
n00b


Joined: 03 Aug 2004
Posts: 12

PostPosted: Fri Jan 07, 2005 3:26 pm    Post subject: Reply with quote

Cintra wrote:
Hei Inssomniak

Thanks for the pktcdvd idea above..

Edit: I cleaned this post up a lot...

Am now back in business - the above udev rule is not needed in 2.6.10.

After removing it, and using some neat footwork, I got back to the correct contents in /dev/pktcdvd ie 'dvdwri and control', and now packet writing works a charm.

I emerged krusader too - it copies and drag&drops folders to /mnt/dvdrw without trouble - looks a bit like a cut-down konqueror...

mvh


I think I missed patching pktsetup (udftools), but thought using the latest -r4, it would be patched, I also run 2.6.10, and pktsetup still dont know what to do with the character device, Im open to what I missed, the above I suggeseted worked for me, but it was just a workaround.
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Fri Jan 07, 2005 7:38 pm    Post subject: Reply with quote

Hei Inssomniak

I'm happy to say that packet writing to dvd+rw still works fine after several days. I leave the dvd+rw in my drive when I turn the machine off at night and after booting all I do is:
Code:
# mount /mnt/dvdrw      (in var/log/messages)
Jan  5 08:03:16 p4pe pktcdvd: inserted media is DVD+RW
Jan  5 08:03:16 p4pe pktcdvd: write speed 2822kB/s
Jan  5 08:03:23 p4pe pktcdvd: 4590208kB available on disc
Jan  5 08:03:24 p4pe UDF-fs INFO UDF 0.9.8.1 (2004/29/09) Mounting volume 'LinuxUDF', timestamp 2005/01/03 14:21 (103c)

I do 'hdparm /dev/hdc' to check dma is still set, and 'hdparm -d1 -c1 /dev/hdc' to set 32-bit i/o. I also check ksysguard to see pktcdvd0 is OK with its -20 nice value..

I use krusader to drag folders & files to /mnt/dvdwr/ ...

Before reaching this stage, I disabled entries for simple udf writing & reading in fstab so I have only
Code:
/dev/pktcdvd/dvdwri  /mnt/dvdrw  udf  noauto,noatime,rw,users 0 0

I also spent a day with Nero speed test, checking dvd+rw media! I think most of my initial packet and UDF writing troubles, were due to faulty dvd+rw media :-(

I followed Joseph_sys instructions to get the /dev/pktcdvd0 block device and right contents in /dev/pktcdvd/ but I believe it was important to have cdrw service in rc-status stopped while I did it:
Code:
# /etc/init.d/cdrw stop
 * Disabling CD-RW packet writing on /dev/hdc ...                                                           [ ok ]

p4pe dev # pktsetup dvdwri /dev/hdc
p4pe dev # cd  /dev/pktcdvd
p4pe pktcdvd # dir
control  dvdwri

however when restarting cdrw:
Code:
 # /etc/init.d/cdrw start
 * Enabling CD-RW packet writing on /dev/hdc
 * Failed to enable packet writing on /dev/hdc
I had to reboot to clear it, and everything came up OK :-) I noticed a new "0" block device in /dev/pktcdvd/ tho'.

I would advise checking your dvd+rw media is error-free and have another go.

Edit: to format/clear your dvd+rw, umount the drive & then
Code:
# mkudffs /dev/pktcdvd/dvdwri


regards
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Fri Jan 14, 2005 9:35 am    Post subject: Reply with quote

I too set up a DVD+RW for packet writing and everything works. That includes copying very large 1+gb files and dirs with lots of small files as well. Its a bit slow, but then I'll be using it for backups mostly anyway.
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Fri Jan 14, 2005 11:24 am    Post subject: Reply with quote

certocivitas wrote:
I too set up a DVD+RW for packet writing and everything works. That includes copying very large 1+gb files and dirs with lots of small files as well. Its a bit slow, but then I'll be using it for backups mostly anyway.

Hei certocivitas

Great to hear you have no trouble with 1+gb files!

I have to admit to just enjoying things for a while with music folders, but after your post I'll try some bigger stuff too..

Btw, did you have any difficulties setting things up?

mvh
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
certocivitas
Apprentice
Apprentice


Joined: 29 Dec 2004
Posts: 194

PostPosted: Fri Jan 14, 2005 11:43 am    Post subject: Reply with quote

certocivitas wrote:
Its a bit slow

...was kind of an under statement :) it took forever to cp a massive file over and back. There was no file corruption though. I'm going to do that a number of times before trusting anything important to it.

One strange thing, sometimes it takes a very long time before the disk becomes unmountable. Long after any activity(30 min) an umount attempt still throws a busy error. Eventually it unmounts though.

I used the wiki instructions, the info on this thread, and the linux-2.6.10-gentoo-r4 kernel.
Back to top
View user's profile Send private message
Cintra
Advocate
Advocate


Joined: 03 Apr 2004
Posts: 2111
Location: Norway

PostPosted: Fri Jan 14, 2005 6:45 pm    Post subject: Reply with quote

certocivitas wrote:
certocivitas wrote:
Its a bit slow

...was kind of an under statement :) it took forever to cp a massive file over and back. There was no file corruption though. I'm going to do that a number of times before trusting anything important to it.

One strange thing, sometimes it takes a very long time before the disk becomes unmountable. Long after any activity(30 min) an umount attempt still throws a busy error. Eventually it unmounts though.

I used the wiki instructions, the info on this thread, and the linux-2.6.10-gentoo-r4 kernel.

Hei certocivitas

Have just completed 2.2GB of transfer from a FAT32 disk in 15 minutes total, ie from start to end of all blinking, using a NEC 3520a on new 4x Verbatim media. No problems.. am playing it back now.

There were no very large files, just 206x mp3 music files taken up on FM and converted with Cool Edit 2000 some time back.

Must say I'm pretty happy with it

mvh
:-D
_________________
"I am not bound to please thee with my answers" W.S.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Feb 10, 2005 5:43 pm    Post subject: Reply with quote

Cintra wrote:
Hei Inssomniak

Thanks for the pktcdvd idea above..


Am now back in business - the above udev rule is not needed in 2.6.10.

After removing it, and using some neat footwork, I got back to the correct contents in /dev/pktcdvd ie 'dvdwri and control', and now packet writing works a charm.

I'm using gentoo-dev-sources-2.6.10-r6 and I still need Insomniak's script for udev. :)
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Feb 10, 2005 5:45 pm    Post subject: Reply with quote

Inssomniak wrote:
I think I missed patching pktsetup (udftools), but thought using the latest -r4, it would be patched, I also run 2.6.10, and pktsetup still dont know what to do with the character device, Im open to what I missed, the above I suggeseted worked for me, but it was just a workaround.

I have the exact same thing.
The udftools 1.0.0b-r4 in portage has this patch already installed.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Feb 10, 2005 5:49 pm    Post subject: Reply with quote

Cintra wrote:
Code:
 # /etc/init.d/cdrw start
 * Enabling CD-RW packet writing on /dev/hdc
 * Failed to enable packet writing on /dev/hdc
I had to reboot to clear it, and everything came up OK :-) I noticed a new "0" block device in /dev/pktcdvd/ tho'.

Cintra, the cdrw script causes the /dev/pktcdvd/0 to be created. You said you are using dvdwri instead. Are you using the device tarball to keep this block device in /dev on reboot?
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Thu Feb 10, 2005 6:23 pm    Post subject: Reply with quote

After finishing writing and unmounting the disc, if I leave the disc in the drive, the write light continues to constantly flash.

I have removed the disc and remounted it and all seems everything was properly written.

Anyone else see this behaviour?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6  Next
Page 3 of 6

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum