LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1300|回复: 4

不小心删除/dev/cdrom后如何再挂载光驱?

[复制链接]
发表于 2004-2-15 10:24:12 | 显示全部楼层 |阅读模式
由于不小心删除了/devcdrom及/dev/hdc0(我的光驱对应的物理块)
请问如何再该挂载光驱?

系统: Fedora Core 1

If you have some ideas about this , please share them, and you will be greately appreciated !
发表于 2004-2-15 10:56:28 | 显示全部楼层
#mknod /dev/hdc b 22 0
#ln -s /dev/hdc /dev/cdrom

Sorry, I can't figure out why your CD-ROM has a 0th(?) partition,
so, your may want /dev/hdc1 in fact (I guess)
to bring it back:
#mknod /dev/hdc1 b 22 1
 楼主| 发表于 2004-2-16 11:04:42 | 显示全部楼层
Thanks very much for you help !
According to your idea, I succefully solved the problem , and
My CDROM can mount again !

By the way, I'm sorry to make a mistake when I describe the problem.
The physical block my CD-ROM has is not /dev/hdc0, it should be /dev/hdc . Thanks to point this out !

The whole process:
If [ rm -f /dev/hdc ] && [ rm -f /dev/cdrom ] ;
then "you wanna to bring them back ", just do as follows :
# mknod /dev/hdc b 22 0
# ln -s /dev/hdc /dev/cdrom
now try "# mount -t iso9660 /dev/cdrom /mnt/cdrom"
fi
 楼主| 发表于 2004-2-16 11:39:48 | 显示全部楼层
mknod 的使用方法可以参见其帮助,不过它并没有关于[MAJOR MINOR]两个选项的详细信息。也没有具体的例子。很难理解[MAJOR MINOR]两个数字的涵义。
偶然在网上搜到一个关于mknod的详细资料,相信对大家有些帮助:

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?注册

x
发表于 2004-2-16 20:01:23 | 显示全部楼层
呵呵~,coolend 真是个有心人!
不过天书(TFM)就在你的硬盘上
/usr/src/linux/Documentation/devices.txt
我现在就在读,;-)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表