cd-rom

LiveCD及Casper调研

限于喜欢 提交于 2020-02-19 08:22:14
1.LiveCD 原理 LiveCD 本质上是 ISO 9660/El Torito 格式的 CD-ROM 。 下面对 LiveCD 涉及的各种技术做了简单的调研。 1.1. CD-ROM CD-ROM 是一种光盘存储介质。 与磁盘类似, CD-ROM 被划分为多个 track , track 又被划分为多个 sector 。 sector 大小为 2352 字节,随着 sector 所采用的编码方式的不同,其内部结构也不同,见下图。 CD digital audio 格式是 CD 唱片采用的方式, CD-ROM Mode1/2 是 CD-ROM 数据盘 (LiveCD 属于此种情况 ) 采用的方式。 1.2. ISO9660 CD-ROM 中,每个 track 上都可以构建一个独立的文件系统。 ISO 9660 便是一种构建在 CD-ROM 之上的文件系统,专为光盘存储介质而设计,又被称为 CDFS(Compact Disk File System) 。 ISO 9660 考虑了 CD-ROM 的顺序访问及只读的特性,将文件连续存储在 CD-ROM 的 track 上,对文件名的格式、属性、大小、数量、目录的层次等都作了限制。 ISO 9660 文件系统的存储格式如下 在 Data Area 的头部,有多个 Volume Descriptor ,其功能类似于 ext4

Check CD-ROM Tray Status

本小妞迷上赌 提交于 2020-01-11 06:16:30
问题 I have written a small piece of code to open/close a cd/dvd drive tray using the DeviceIoControl API and the proper IOCTL but I don't seem to be able to check the tray status. According to the msdn page (http://msdn.microsoft.com/en-us/library/aa363404%28v=VS.85%29.aspx), IOCTL_STORAGE_CHECK_VERIFY is supposed to succeed if the drive is loaded with a valid media and fail otherwise with an appropriate error code. So when DeviceIoControl fails, I expected 21 as lasterror when the tray was

How to issue a READ CD command to a CD-ROM drive in Windows?

非 Y 不嫁゛ 提交于 2020-01-02 07:29:22
问题 I'm working on an application that needs to issue raw SCSI commands to a CD-ROM drive. Currently, I'm struggling with sending a READ CD ( 0xBE ) command to the drive and getting back the data from a given sector of the CD. Consider the following code : #include <windows.h> #include <winioctl.h> #include <ntddcdrm.h> #include <ntddscsi.h> #include <stddef.h> int main(void) { HANDLE fh; DWORD ioctl_bytes; BOOL ioctl_rv; const UCHAR cdb[] = { 0xBE, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0 }; UCHAR buf

How to identify the type of disc in a CD-ROM drive using WinAPI?

邮差的信 提交于 2020-01-01 10:28:35
问题 I'm writing an application that's going to work with audio CDs and mixed CDs. I would like to have a method of determining whether there is an audio or mixed-type (with at least one audio track) disc currently in the drive that the application uses. So far, I was able to identify that the drive is a CD-ROM by GetDriveType . However, it turns out that identifying the media that is actually inside the drive is not that easy. This is what I've got so far : int drive_has_audio_disc(const char

How to eject CD using WMI and Python?

狂风中的少年 提交于 2020-01-01 04:50:29
问题 Using Windows' WMI library, how can I eject CD rom mounted in a specific CD/DVD drive? I am asking for sources from WMI docs or examples since I am using wmi.py library on Python. It would be great if solution satisfies Windows computer newer than Windows 2000 and having multi CD-ROMs. (i.e. I have D: F: drives and both are CD-ROM drives. I might want to eject cd in F: specifically.) Searched on the net but could not find anything relevant. The last solution must be having 3rd party binaries

How do I call ICDBurn::GetRecorderDriveLetter() in VS2008 C++? (Solving XP CD write to root)

萝らか妹 提交于 2019-12-25 03:16:01
问题 I am trying to implement the solution given in GetSaveFileName() not returning path of CD burning staging area on XP I'm trying to implement this in VS2008 C++. The ICDBurn::GetRecorderDriveLetter() method is not static and thus cannot be called as written ( ICDBurn::GetRecorderDriveLetter ) in the above answer. ICDBurn can't be instantiated because it's an abstract class. How do I call ICDBurn::GetRecorderDriveLetter() from C++? 回答1: You need to create the COM object first. ICDBurn* pICDBurn

Identify CD drive and eject using bat or vbs while in WinPE without external files

淺唱寂寞╮ 提交于 2019-12-11 05:09:07
问题 I need to identify the CD drive and eject the tray. This is executed while booted in WinPE, so the WMP eject function is not available. This script will be used on various computer models/configurations. I'm currently using this: For Each d in CreateObject("Scripting.FileSystemObject").Drives CreateObject("Shell.Application").Namespace(17).ParseName("D:\").InvokeVerb("Eject") Next It works, but sometimes it errors and requires user interaction before it ejects. I suspect that it's because of

How to mount Android as CD-ROM?

烂漫一生 提交于 2019-12-08 09:41:27
问题 I have Galaxy S4 with custom ROM and kernel. I need to mount ISO image from sdcard to Windows/Linux PC as CD-ROM. There's a "DriveDroid" app that works fine, but I need to do it manually (as a study). Windows 8 writes that "Device needs to be formatted". code (bash script) # Disable USB echo 0 > /sys/class/android_usb/android0/enable # Set Vendor and Product IDs echo 0x04e8 > /sys/class/android_usb/android0/idVendor echo 0x6860 > /sys/class/android_usb/android0/idProduct # Set mass_storage

Kali Linux 2.0 U盘安装错误 无法加载光驱

女生的网名这么多〃 提交于 2019-12-05 05:02:09
2.用U盘安装的过程中,出现cd-rom无法挂载。提示错误Your installation CD-ROM couldn't be mounted。 3.在谷歌搜索后,参考国外的方法。 4.经过一番摸索。得到解决方案,本机测试成功。如下: 安装kali2.0过程中,安装界面(就是选择语言,设置用户名密码,分区等引导的界面)倒数第二个会有个execute a shell选项。 选择execute a shell后,会有执行shell的窗口。 第一步:df -m 此时会看到挂载信息,最下面的是/dev/xyz /media 这个是U盘设备挂载到了/media,导致cd-rom不能被挂载。 第二步:umount /media 上面那个国外的解决方案还要继续mount /dev/xyz /cd-rom 但本机测试不用自己挂载,安装程序会自己挂载。自己挂载反而会引起后面出现GRUB安装失败。 第三步:exit 退出命令窗口后,继续安装。 来源: oschina 链接: https://my.oschina.net/u/2308739/blog/518333

Linux:如何挂载CD-ROM光盘驱动器

戏子无情 提交于 2019-12-04 04:49:17
如何在linux操作系统的命令行下挂载光盘驱动器呢?你需要使用mount命令来挂载CD或者DVD光盘驱动器,首先,你需要先插入CD或者DVD到光盘驱动器里,然手输入下面的mount命令来挂载光盘。 获取CD/DVD的设备名 使用下面的命令来获取DVD/CD-ROM/Writer设备的名字: #lsblk 或者 #dmesg | egrep -i --color 'cdrom|dvd|cd/rw|writer 命令输出: ata2.00: ATAPI: VMware Virtual IDE CDROM Drive, 00000001, max UDMA/33 sr0: scsi3-mmc drive: 1x/1x writer dvd-ram cd/rw xa/form2 cdda tray 在linux系统里挂载DVD/CDROM的参数 #mount -t iso9660 -o ro /dev/设备名 /挂载目录名 创建挂载点,输入mkdir命令: #mkdir -p /mnt/cdrom 挂载/dev/cdrom 或者/dev/sr0: #mount -t iso9660 -o ro /dev/cdrom /mnt/cdrom 或者 #mount -t iso9660 -o ro /dev/sr0 /mnt/cdrom 使用下面的两个命令来验证光驱是否挂载在/mnt/cdrom上