Loopback Device: Difference between revisions
[unchecked revision] | [unchecked revision] |
Content deleted Content added
(7 intermediate revisions by 4 users not shown) | |||
Line 8:
=== Floppy Disk Images With GRUB and EXT2 ===
First, lets create
dd if=/dev/zero of=floppy.img bs=512 count=2880
Line 69:
mount -t msdos /dev/loop0 /mnt/myfloppy
=== Floppy Disk Images With FAT12 ===
The steps mentioned below will be useful for the BrokenThorn Entertainment tutorials
Create an empty image.
dd if=/dev/zero of=floppy.img bs=512 count=2880▼
Set it up for mounting.
Format it to FAT12.
mkdosfs -F 12 /dev/loop0
Mount!
mount /dev/loop0 /mnt -t msdos -o "fat=12"
Unmount
Destroy loopback device
losetup -d /dev/loop0
=== Hard Disk Images ===
Line 191 ⟶ 218:
|-
| mke2fs
| Create an
|-
| -b1024
Line 203 ⟶ 230:
|}
This gives us a clean
Note: mke2fs is smart enough to figure out block size and #blocks for itself, but if you ever want to use multiple partitions you'll need to know how to use those values.
Line 314 ⟶ 341:
mount /mnt/wherever
umount /mnt/wherever
==== The End ====
Line 325 ⟶ 351:
* losetup -o type command will give you the equivalent of a raw partition device (Eg /dev/hda1)
Don'
== Loopback Device under FreeBSD ==
FreeBSD uses mdconfig. First, use DD to create an empty floppy image (1.44 MB in size). Memdisks are allocated dynamically, and the name is displayed after the mdconfig command. This assumes that "md0" is printed.
▲ dd if=/dev/zero of=floppy.img bs=512 count=2880
▲ vnconfig vn0 floppy.img
▲ umount /mnt/myfloppy
▲Memdisks are allocated dynamically, and the name is displayed after the mdconfig command. This assumes that "md0" is printed.)
To mount:
|