[syslinux] [RFC] make extlinux work without mount the filesystem

Robert Yang liezhi.yang at windriver.com
Thu Nov 20 22:21:30 PST 2014


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


More information about the Syslinux mailing list