如何在由BusyBox创建的简单Linux initrd文件系统中访问CDROM?

huangapple go评论59阅读模式
英文:

How to access CDROM in a simple Linux initrd filesystem made by busybox?

问题

这是我的情况:

我制作了一个简单的适用于x86-64架构的可引导ISO文件,其中包括了6.3-rc1版本的Linux bzimage、由busybox创建的简单initrd文件系统和grub引导程序。

我在VirtualBox上启动它,并尝试挂载/dev/sr0,但出现了错误消息:“mount: 挂载/dev/sr0到/mnt/cdrom失败:无效的参数”。此外,内核显示错误:“[时间戳] /dev/sr0: 无法打开块设备”。

因此,我的问题是,我在这种情况下如何访问CDROM?我尝试过在Google上搜索,但没有找到有用的信息。

提前感谢!

英文:

Here's my situation:

I made a simple bootable ISO file for x86-64 architecture using 6.3-rc1 Linux bzimage, a simple initrd filesystem made by busybox and grub.

I boot it up with virtualbox, and I tried to mount the /dev/sr0, it shows error mount:mounting /dev/sr0 on /mnt/cdrom failed: Invalid argument. Also, the kernel shows error: [ timestamp] /dev/sr0: can't open blockdev
So my question is that how can I access the CDROM in this situation? I trid googled but found nothing useful.

Thanks in advance!

答案1

得分: 1

我无法挂载/dev/sr0在initrd模式下的原因是,我编译的内核配置文件将iso9660文件系统设置为“m”,而我没有加载iso文件系统模块。所以在加载isofs.ko之后,问题得以解决。

英文:

The reason why I can't mount the /dev/sr0 in initrd mode is that The configuration file for the kernel I compiled sets the iso9660 file system to "m", and I didn't load the iso file system module.

So after I load the isofs.ko, problem solved.

huangapple
  • 本文由 发表于 2023年4月4日 17:15:10
  • 转载请务必保留本文链接:https://go.coder-hub.com/75927571.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定