Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
Generate an EXT2 image without being root
- 01-05-2005

Re: Generate an EXT2 image without being root

I'm not aware of any other method, however you can do this without being
root (man mount, man fstab). If you apply the following to a loop back
device, you should be able to get mount to mount an ext2 file system as a
mortal user.
see manual pages for ... losetup, fstab, and mount
(iii) Normally, only the superuser can mount file systems. However,
when fstab contains the user option on a line, then anybody can mount
the corresponding system.
CB

Re: Generate an EXT2 image without being root
But if the file-system needs to contain special files (device nodes, e.g.,
/dev/ttyS0 et all), you'll still need to be root unless I'm missing
something.
Of course, not all EXT2 file systems need nodes owned by someone other
than yourself but if it's a bootable filesystem, I don't think you have
much choice. Root is it.
On Thu, 06 Jan 2005 07:43:29 +0000, Craig Bergren wrote:

/dev/ttyS0 et all), you'll still need to be root unless I'm missing
something.
Of course, not all EXT2 file systems need nodes owned by someone other
than yourself but if it's a bootable filesystem, I don't think you have
much choice. Root is it.
On Thu, 06 Jan 2005 07:43:29 +0000, Craig Bergren wrote:


Re: Generate an EXT2 image without being root

Look at the following links:
http://sourceforge.net/projects/e2fsimage/
http://packages.debian.org/unstable/admin/genext2fs
I have not tried these, but appear to be the type of program
with the characteristics you want.
Also, the ext2 utility program debugfs has all
the tools needed to populate a ramdisk,
using the commands mkdir, mknod, and write.
The filesystem needs to have been created
first by using the traditional dd if=null of=filesys count=4k,
and mke2fs filesys method.
--
John Haller
John Haller
Site Timeline
- » DMA
- — Next thread in » Embedded Linux
-
- » LEON2 or microblaze on uclinux
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Suchbegriff gesucht
- — The site's Newest Thread. Posted in » Electronics (German)
-
- » interessanti novit? da Pine64
- — The site's Last Updated Thread. Posted in » Electronics Hobby (Italian)
-