Use floppy on Solaris

Solaris磁盘操作指南
本文介绍了在Solaris操作系统中如何进行软盘的各种操作,包括读取、写入、格式化以及创建文件系统等。文章详细说明了使用volcheck、tar、dd、cpio和fdformat等命令的具体步骤。
Solaris supports a number of operations on floppy disks. It can mount floppy disks with DOS (or Unix) filesystems so the files on the floppy can be accessed just like any other files. It can read and write floppy disks using commands like tar, dd and cpio. It can format floppy disks and create DOS (or Unix) filesystems on them. Below are descriptions of how to do these operations.

To access files on a floppy disk formatted with a DOS filesystem

  1. Insert the disk into the floppy drive and run volcheck:
    	% volcheck
    This will mount your floppy disk in the directory /floppy. You can make sure it's there like this:
    	% ls -F /floppy
    floppy0@ noname/
    or this:
    	% df
    [ df will print all of the regular file systems and somewhere
    amongst them (usually at the end) will be something like: ]
    /vol/dev/diskette0/noname
    1423 1156 267 81% /floppy/noname
    or:
    	/floppy/noname (/vol/dev/diskette0/noname): 534 blocks 0 files
    depending on which version of df you are using.
  2. Now you can access the files on your floppy disk just like regular files. You can ls them, cat them, rm them, cp them, etc.
    	% ls /floppy/noname
    bin4.tgz dosemu.tgz image.tgz sc.tgz term107.tgz
    diska2 faq.tar lilo.tgz shlibs.tgz
  3. When you are done, run the eject command which will unmount your floppy from the filesystem and eject it:
    	% eject
    If it doesn't eject your floppy, and instead complains about `/vol/dev/rdiskette0/noname: Device busy' or something like that, that means some process is still using a file on the floppy. If your current directory is somewhere on the floppy, cd somewhere else. If you are running any processes that are accessing the floppy kill them. After that you should be able to eject your floppy.

To access a floppy disk using commands such as tar, dd and cpio

  1. Insert the disk into the floppy drive and run volcheck:
    	% volcheck
    This will setup special device files in the /vol/dev/diskette0 and /vol/dev/rdiskette0 directories which you can use to access your floppy:
    	blaze-dev$ ls -l /vol/dev/diskette0/ /vol/dev/rdiskette0/
    /vol/dev/diskette0/:
    total 0
    brw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled

    /vol/dev/rdiskette0/:
    total 0
    crw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled
  2. Most documentation says to use the special files such as /dev/rfd0, /dev/rfd0c or /dev/rdiskette0 to access a floppy with programs like tar, dd and cpio. The volume manager program is using these files so if you try to access them you will get a `Device busy' error. You have to use the other special files that the volume manager created, such as /vol/dev/rdiskette0/unlabeled. You can tar stuff onto the floppy disk:
    	% tar cf /vol/dev/rdiskette0/unlabeled prog.c prog.C prog.f
    and verify that it is OK:
    	% tar tvf /vol/dev/rdiskette0/unlabeled
    If you're writing a Linux boot floppy of the bare Slackware bootdisk, you would do it something like this:
    	% dd if=bare of=/vol/dev/rdiskette0/unlabeled obs=18k
  3. When you are done with your disk, eject it:
    	% eject

To format a floppy disk

  1. Insert the disk into the floppy drive and run volcheck:
    	% volcheck
    This will setup special device files in the /vol/dev/diskette0 and /vol/dev/rdiskette0 directories which you can use to format your floppy:
    	blaze-dev$ ls -l /vol/dev/diskette0/ /vol/dev/rdiskette0/
    /vol/dev/diskette0/:
    total 0
    brw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled

    /vol/dev/rdiskette0/:
    total 0
    crw-rw-rw- 1 nobody nobody 91, 3 Feb 24 11:40 unlabeled
  2. If you're going to use a floppy disk with commands like tar, dd and cpio, you only have to format it. If you're going to use it as a DOS filesystem, then you have to format it and create a DOS filesystem on it. The fdformat command does both of these.

    To format a disk to be used by tar, dd and cpio, use this command:

    	% fdformat /vol/dev/rdiskette0/unlabeled
    To format a disk and create a DOS filesystem on it, use this command:
    	% fdformat -t dos /vol/dev/rdiskette0/unlabeled
    This will take a few minutes.
  3. After you've formatted the disk you can eject it with the eject command:
    	% eject
    If you've created a DOS filesystem on the floppy then you have to eject the floppy, and then re-insert and re-run volcheck to have it mounted on /floppy. If you're going to use the floppy with commands like tar, dd and cpio it is not necessary to eject the floppy, re-insert it and run volcheck, you can just continue using the floppy, although the fdformat command may have changed the device name of the floppy (it might be called /vol/dev/rdiskette0/unnamed_floppy instead of /vol/dev/rdiskette/unlabeled).
 
【无人机】基于改进粒子群算法的无人机路径规划研究[和遗传算法、粒子群算法进行比较](Matlab代码实现)内容概要:本文围绕基于改进粒子群算法的无人机路径规划展开研究,重点探讨了在复杂环境中利用改进粒子群算法(PSO)实现无人机三维路径规划的方法,并将其与遗传算法(GA)、标准粒子群算法等传统优化算法进行对比分析。研究内容涵盖路径规划的多目标优化、避障策略、航路点约束以及算法收敛性和寻优能力的评估,所有实验均通过Matlab代码实现,提供了完整的仿真验证流程。文章还提到了多种智能优化算法在无人机路径规划中的应用比较,突出了改进PSO在收敛速度和全局寻优方面的优势。; 适合人群:具备一定Matlab编程基础和优化算法知识的研究生、科研人员及从事无人机路径规划、智能优化算法研究的相关技术人员。; 使用场景及目标:①用于无人机在复杂地形或动态环境下的三维路径规划仿真研究;②比较不同智能优化算法(如PSO、GA、蚁群算法、RRT等)在路径规划中的性能差异;③为多目标优化问题提供算法选型和改进思路。; 阅读建议:建议读者结合文中提供的Matlab代码进行实践操作,重点关注算法的参数设置、适应度函数设计及路径约束处理方式,同时可参考文中提到的多种算法对比思路,拓展到其他智能优化算法的研究与改进中。
### Creating a Floppy Disk Image from a Binary File #### Using dd on Linux On Linux systems, the `dd` command can be used to create a floppy disk image from a binary file. The general syntax is as follows: ```bash dd if=your_binary_file of=floppy_image.img bs=1k ``` In this command: - `if=your_binary_file` specifies the input file, which is the binary file you want to use to create the floppy image. - `of=floppy_image.img` specifies the output file, which will be the floppy disk image. - `bs=1k` sets the block size to 1 kilobyte. #### Using hdiutil on macOS On macOS, the `hdiutil` command can be used. First, create a blank disk image of the appropriate size (usually 1.44MB for a standard floppy). Then, use `dd` to copy the binary file into the disk image. ```bash # Create a blank disk image hdiutil create -size 1440k -type UDIF -fs MS-DOS -volname FLOPPY floppy_image.dmg # Mount the disk image hdiutil attach floppy_image.dmg # Find the device name (e.g., /dev/disk2s1) diskutil list # Use dd to copy the binary file to the mounted image dd if=your_binary_file of=/dev/disk2s1 bs=1k # Unmount the disk image hdiutil detach /dev/disk2s1 ``` ### Using the Floppy Disk Image to Boot a New Virtual Machine #### In VirtualBox 1. Open VirtualBox and create a new virtual machine. 2. During the creation process, when it asks for a bootable disk, select "Use an existing virtual hard disk file" and navigate to the floppy disk image file you created (`floppy_image.img` or `floppy_image.dmg`). 3. Complete the virtual machine creation process. 4. Start the virtual machine, and it should attempt to boot from the floppy disk image. #### In VMware 1. Create a new virtual machine in VMware. 2. When configuring the virtual machine settings, add a floppy drive. 3. Select the option to use a floppy image file and point it to the floppy disk image you created. 4. Start the virtual machine, and it will try to boot from the floppy disk image.
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值