dennix
dennix copied to clipboard
import an external file
How to import an external file into the system? I want to copy some projects into the system Dennix running on it and run them. how to do it?
There are two ways to access a file from within Dennix:
-
Adding a file to the initrd. When building Dennix all files in the sysroot directory are packed into the
initrd.tar.xz
file of the iso image. Any files in that initrd are loaded into RAM during boot. New files can be added by creating a new initrd that contains the new files in addition to the files that are there by default. The disadvantage is that you need to create a new iso image whenever you want to add a file. Also changes are not preserved between boots. -
Mounting an ext2 filesystem. This is the more flexible option. Dennix can mount ext2 filesystems and can access ATA disks. Create a ext2 filesystem image containing your files and make it available to Dennix as an ATA disk. Then mount the filesystem using
mount /dev/ata0p1 /mnt
(if the filesystem is on the first partition of the first ATA channel) ormount /dev/ata0 /mnt
(if the filesystem on an unpartitioned disk on the first ATA channel). Then the contents of the filesystem can be accessed in the/mnt
directory. Changes to files are written to the disk. Do not forget to unmount usingumount /mnt
when done, as without it changes to the filesystem might not be saved correctly.