LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 11-15-2006, 04:22 AM   #1
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Rep: Reputation: 0
How can I format a DVD RAM?


Hi. I'm sure this is basic stuff, but I can't find anything about it in google, or in the forum here. I have a DVD RAM which has been written to once by a linux system, but now the linux system does not recognise it. I want to use it for my backups, and as I understand it it should just appear as another volume. I'm assuming that the disk is corrupt ( I think I might have written to it using k3b in desperation in the middle of the night trying to back up my system some time ago! )

So, my questions are
How do I find which device my DVD drive is, /hda/... whatever so I can do something to it?
Once I know which one it is, how do I format it?
Once I have formatted it how do I mount it so I can find it if the system doesn't do it automatically?

I am running Fedora 6.
Another thing I don't understand is that fdisk, mkfs, and format all give me command not found.

Help much appreciated.
 
Old 11-15-2006, 05:22 AM   #2
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Check (as root) the /var/log/messages file for you device, maybe type something like;

cat /var/log/messages | grep DVD

As far as your other query, maybe you have a pathing issue. The two Linux commands can be found/used by typing the path where they are located. Try using 'su -' instead of 'su' so you get root's pathing and not inherit the user's pathing.

/sbin/fdisk
/sbin/mkfs

FYI: format is a DOS command.
 
Old 11-15-2006, 06:25 AM   #3
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Hi. Thanks for the input, the drive seems to be /dev/hda. How do I format it?
BTW su- just gives me command not found, but using /sbin/... works fine. Cheers
 
Old 11-15-2006, 09:46 AM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
The command is su<space>-;su -

Formating is only needed once on DVD-RAM media, just delete the files you do not want from the media. Check your /etc/fstab file for where the device mounts to. Try these typed commands as root;

cat /etc/fstab
mount -t auto /dev/hda
cd /the/path/to/the/mountpoint/
(the second section of the /etc/fstab line entry for the device)
rm some_file_name_here_you_do_not_want
 
Old 11-15-2006, 09:59 PM   #5
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for that Lenard. I have been trying to delete the files, but without success, which is why in desperation I thought it would be simpler to format the disk - I spent several hours trying to delete files! The files seem to be a mixture of ownerships, some owned by root, and some by me as an ordinary user. Every time I use rm on a directory I get an endless series of 'cannot delete files as you do not have permission to delete the file., or '... you do not have permission to alter files in this directory'. This happens even when I am logged in as root, though, of course, it happens for different files than when I am logged in as an ordinary user. I can't go through the disk manually, there are tens of thousands of files on it. I don't understand why root can't delete everything, from my long ago unix experience I expected to be able to ride roughshod over permissions as root, but on this system root doesn't seem to be able to do anything with files it doesn't own, or files in directories it doesn't have permissions to alter files in.
I have tried chmod and chown to just change all of the files on the disk so I can delete them, but these commands don't recognise wild cards. I just get
chmod: cannot access `*.*': No such file or directory
or
chmod: cannot access `*': No such file or directory
!?

Once again, it seems as if there must be a simple solution, but I have literlly spent hours on this one stupid problem, poring over the rm man pages, and googling for solutions. If there were a corner shop which sold DVD RAMS I would long ago have moved on!

Last edited by triplemaya; 11-15-2006 at 10:27 PM.
 
Old 11-15-2006, 10:57 PM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,745

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
I found this:

Quote:
DVD-RAM

DVD-RAM is addressed as an ordinary file system.

To create the file system, enter

mke2fs -b 2048 /dev/scd0

Now the medium can be simply attached to the file system with 'mount' then recorded. Do not forget to remove the medium from the system with umount. Otherwise some data loss might occur. You may use a different file system if you want to read data under other operating systems, too.
If you want to see the page for yourself, you can see it here: http://en.opensuse.org/SDB:Burning_DVDs_with_SuSE_Linux

From the looks of this, you just run mkfs on the dvd-ram.
 
Old 11-15-2006, 11:27 PM   #7
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for that bigrigdriver. My one last query is about the device. I am a bit nervous about using mkfs without being able to confirm that hda is indeed the dvd and not the hard drive! Is there any way to check this?
 
Old 11-16-2006, 05:08 AM   #8
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
Remove the media from DVD-RAM drive then attempt to mount it.
 
Old 11-17-2006, 08:03 AM   #9
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Hi again.
Thanks Lenard. Did that, ( doh, so simple! ) and yes, it is hda.
( I found out why I couldn't delete the files, they didn't have an owner. Not even root can do anything with them it seems. )
So
mke2fs -b 2048 /dev/hda
which worked. Unfortunately, the disk cannot now be mounted from the graphical interface, because it is the wrong kind of file system. That's what the error message says " wrong fs type, bad option, ..."
However, I can mount it from the command line ok.

I'm guessing that some automatic process, automount?, no longer works with this disk, so it won't be so useful as a daily backup. I'm also guessing that it would need to be a udf file system for automount to work.

There is no mkudffs on this system, it doesn't seem to exist in fedora.
I tried making a dos file system, but it just produced a segmentation fault.
I've googled for how to make a udf file system under fedora, but I'm not finding anything, maybe it doesn't exist?
Please could someone tell me what to do next so I can use this disk the way I used to be able to.
 
Old 11-17-2006, 09:14 AM   #10
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 56
You formatted the media as ext2 from what you posted once, is it still ext2 or did you change this??? If the media is formatted as ext2 then is OK and you should be able to read/write/delete files on the media with the proper permissions of course. You might want to edit the /etc/fstab and change the entry to allow writing (see man mount for the details) to the ext2 formatted and mounted media.


I'm not sure if the Fedora Core 6 kernel supports writing to udf formatted media or not, but it is possible (still a bit experimental but does work). Please check your /boot/config-<kernel_version#> file for udf (or packet) write support, your looking for something like;

CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
CONFIG_CDROM_PKTCDVD_WCACHE=y

.
 
Old 11-25-2006, 04:35 PM   #11
vimico
Member
 
Registered: Jan 2004
Distribution: Debian, Ubuntu
Posts: 118

Rep: Reputation: 15
Ubuntu supports UDF packet writing.

The format command is mkudffs. In the Ubuntu repository it is part of the package udftools (I think). Perhaps there is something similar in the Fedora repository.

If you work with DVD-RAM you should use UDF.

UDF is more suitable for DVD-RAM: The number of times you can rewrite a DVD-RAM is limited. If you delete and rewrite a file UDF tries to spread the writes equally over the media, ext2/3 does not.
In other words: DVD-RAMs live longer with UDF :-)
 
Old 11-26-2006, 03:22 AM   #12
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks Lenard. This was what I wanted to do, but I could find no way of formatting a disk with UDF in fedora. I got a bit discouraged in the end. I could write to it as it was, but all my automount stuff was gone, so mounting disks or usb keys was a real pain. Since the whole project was centered around moving off that computer I eventually abandoned that pc and moved on, according to plan. I feel a bit the wiser, but in general I feel like leaving well alone in future!

Last edited by triplemaya; 11-26-2006 at 03:24 AM.
 
Old 11-26-2006, 03:23 AM   #13
triplemaya
LQ Newbie
 
Registered: May 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks vimico. I have done a fair bit of googling, and fedora doesn't seem to have an equivalent of mkudffs, though it certainly uses a UDF disk ok, new disks seem to come formatted in UDF. Each distro certainly has its quirks! I was considering going over to ubuntu, since it is so highly regarded, but it fell at the first hurdle. I did a nice new install of Dapper Drake, changed the screen resolution to 1280x800 to match my widescreen monitor - pttt, total freeze! Had to switch off at the mains. Surely I thought, a momentary glitch, but no. It was a consistent problem. I decided to stay with fedora for the time being!
 
Old 05-12-2010, 12:45 PM   #14
BobRobertson
LQ Newbie
 
Registered: Jul 2002
Location: Rocky Mount, North Carolina
Distribution: Debian
Posts: 12

Rep: Reputation: 0
It works.

Three things I would like to add to the advice on this thread.

1) Make sure that you have the file system you're going to use, or "auto", in your /etc/fstab. When I formatted a DVD-RAM in ext2, it would not mount when there was the following in /etc/fstab:

/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0

but it mounted just fine with:

/dev/hdc /media/cdrom0 auto user,noauto 0 0

2) Make sure that you have read/write permissions on your mount point. I could not write when...

drwxr-xr-x 2 root root 4096 2009-09-12 14:29 cdrom0

but it was writable with:

drwxrwxrwx 2 root root 4096 2009-09-12 14:29 cdrom0

3) fdisk /dev/hdc has as its default partition type 83. I _believe_ that UDF uses partition type a8. Well, that's what I used anyway, then...

# mkudffs -b 2048 /dev/hdc

which has worked fine, and the disk was perfectly accessable on the Win7 machine too.
 
  


Reply

Tags
dvdram, format


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DVD-Ram matthaeus Linux - General 5 11-01-2006 12:05 PM
format DVD for UDF works but DVD is bad jrfk2 Linux - Hardware 2 04-25-2006 10:18 AM
LG DVD+-RW/RAM won't mount after writing DVD (growisofs/k3b) jaws_tas Linux - Hardware 1 03-25-2005 01:52 AM
How to format a DVD+RW? Rohan_mk1 Linux - Hardware 3 09-08-2004 09:04 PM
How to play dvd s in regular user account? DVD-RAM How-To? Outabux Debian 1 07-08-2004 07:51 PM


All times are GMT -5. The time now is 09:22 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration