Robert Yang
2014-Nov-21 06:21 UTC
[syslinux] [RFC] make extlinux work without mount the filesystem
Hello syslinux, I'm a newbie to extlinux, and I'm a developer from yocto project (an embedded linux project). The device or filesystem must be mounted before we can install the bootsector to the device if I understand correctly, for example: $ mount /dev/sdcX /tmp/mnt $ extlinux -i /tmp/mnt Usually, the mount command requires the root privilage, we may not have the root privilage when we work on a shared server. And in embedded linux development, usually, we need deploy the system on an file block (not a real device partition), for example: $ dd if=/dev/zero of=test.img count=100k bs=1k $ mke2fs -t ext3 -F test.img It would be great to have something like: (suppose we have a "-d/--device" option) $ extlinux -i -d test.img then the bootsector will be installed without mount the test.img I had added something similar to e2fsprogs' mke2fs: (on master branch) http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/log/ which can copy files into test.img without mount it, for example: $ mke2fs -t ext3 -d <rootfs_dir> -F test.img I'd like to make extlinux can work without mount the filesystem (use libext2fs), is it possible for extlinux, please ? And is such a patch acceptable, please ? (Add a "-d/--device <device>" option, and the option is optional). Any comments is appreciated. -- Thanks Robert
H. Peter Anvin
2014-Nov-21 06:33 UTC
[syslinux] [RFC] make extlinux work without mount the filesystem
On 11/20/2014 10:21 PM, Robert Yang wrote:> > which can copy files into test.img without mount it, for example: > $ mke2fs -t ext3 -d <rootfs_dir> -F test.img > > I'd like to make extlinux can work without mount the filesystem (use > libext2fs), is it possible for extlinux, please ? And is such a patch > acceptable, please ? (Add a "-d/--device <device>" option, and the > option is optional). >I would definitely accept such a patch. It probably makes more sense in the "syslinux" installer rather than "extlinux", since the former already operates on an unmounted filesystem. I would also love to unify the FAT implementation. -hpa
Robert Yang
2014-Nov-21 06:37 UTC
[syslinux] [RFC] make extlinux work without mount the filesystem
On 11/21/2014 02:33 PM, H. Peter Anvin wrote:> On 11/20/2014 10:21 PM, Robert Yang wrote: >> >> which can copy files into test.img without mount it, for example: >> $ mke2fs -t ext3 -d <rootfs_dir> -F test.img >> >> I'd like to make extlinux can work without mount the filesystem (use >> libext2fs), is it possible for extlinux, please ? And is such a patch >> acceptable, please ? (Add a "-d/--device <device>" option, and the >> option is optional). >> > > I would definitely accept such a patch. It probably makes more sense in the > "syslinux" installer rather than "extlinux", since the former already operates > on an unmounted filesystem.Great, thanks for the reply, I will do more investigations on syslinux/extlinux, and ask for help or send a draft design later. // Robert> > I would also love to unify the FAT implementation. > > -hpa > > > >
Ady
2014-Nov-21 08:22 UTC
[syslinux] [RFC] make extlinux work without mount the filesystem
(snip)> It probably makes more sense in > the "syslinux" installer rather than "extlinux", since the former > already operates on an unmounted filesystem. >In other words, the Linux-based "syslinux" installers could / would support ext2/3/4 too. In particular, the (./bios/mtools/) "syslinux" command does not need special permissions (other than write), but it needs "something" else instead (e.g. "mtools" for FAT), and it can use the "--offset" parameter. This could mean, to either: _ modify the current installers; or, _ add a new (./bios/mke2/) {sys,ext}linux installer (the path and file name could be something else; I am focusing on the generic idea). Regards, Ady.
Reasonably Related Threads
- [RFC] make extlinux work without mount the filesystem
- [RFC] make extlinux work without mount the filesystem
- [RFC] make extlinux work without mount the filesystem
- [PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem
- [PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem