LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-23-2006, 12:09 AM   #1
Evans
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Rep: Reputation: 0
Restore /dev/hdd


I accidentally deleted /dev/hdd, I've tried to restore it use pdparm, but failed.

anyone know how to restore this block device, with pdparm? what command should I issue in shell?

Last edited by Evans; 12-23-2006 at 12:10 AM.
 
Old 12-23-2006, 12:39 AM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
/dev/dvd is simply a symlink to whatever device is actually your DVD drive.

You should be able to find the device by doing something like "dmesg | grep DVD", which returns this on my system:

hdc: HL-DT-ST DVDRAM GSA-H10N, ATAPI CD/DVD-ROM drive

So now I know that /dev/hdc is my DVD drive, in which case I just need to do a simple link to restore it:

ln -s /dev/hdc /dev/dvd

You will need root permissions to create the link, by the way.
 
Old 12-23-2006, 01:05 AM   #3
Evans
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
I mean I have deleted /dev/hdd, a block device, not /dev/dvd(a sysmbolic to /dev/hdd)

There is no /dev/dvd in my /dev. I created it before, but now it's been deleted it.

use mknod, I think, am just confused the last 2 args 22 64? what does it mean? any help advice would be appreciated!
 
Old 12-23-2006, 07:12 AM   #4
liquidtenmilion
Member
 
Registered: May 2004
Location: South Carolina
Distribution: Slackware 11.0
Posts: 606

Rep: Reputation: 32
mknod is the way to go. Also, if you're using Udev, a simple reboot will solve the problem.
 
Old 12-23-2006, 07:24 AM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Quote:
Originally Posted by Evans
I mean I have deleted /dev/hdd, a block device, not /dev/dvd(a sysmbolic to /dev/hdd)

There is no /dev/dvd in my /dev. I created it before, but now it's been deleted it.

use mknod, I think, am just confused the last 2 args 22 64? what does it mean? any help advice would be appreciated!
Hi,

You should 'man 1 mknod'. You could even reference, /usr/src/linux/Documentation/devices.txt to get the device information. The numbers you are confused about are the major,minor numbers for the device.

If you had done a google search, you would find something like the mknod reference. The next link on this page also lists the devices.
 
Old 12-23-2006, 07:29 AM   #6
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by Evans
use mknod, I think, am just confused the last 2 args 22 64? what does it mean? any help advice would be appreciated!
The two numbers are the major and minor device numbers for the block device.
Just run
Code:
mknod /dev/hdd b 22 64
chmod 660 /dev/hdd
chown root:disk /dev/hdd
to re-create the device node if you don't use udev.

Eric
 
Old 12-23-2006, 09:19 AM   #7
Evans
LQ Newbie
 
Registered: Jan 2005
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks. Problems solved here.

and

To all: "Merry Christmas!"
 
  


Reply



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
why has udev swapped /dev/hdc and /dev/hdd ? chaosbear Linux - Hardware 2 08-09-2006 03:23 AM
Trying to add a third hard drive (hdd) and get Unable to open /dev/hdd MikeyCarter Linux - Hardware 4 12-26-2005 10:27 PM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
/dev/cdrom constantly linked to /dev/hdd r_jensen11 Linux - Hardware 6 09-24-2004 01:51 PM
how to change /dev/hdd to /dev/zip in Suse 9.0 scarah Linux - Hardware 9 01-15-2004 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:10 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration