[syslinux] [PATCH 0/8] extlinux: support unmounted ext2/3/4 filesystem

Ady
Thu, 25 Dec 2014 05:43:21 -0000

>
>
> On 12/25/2014 04:33 AM, H. Peter Anvin wrote:
> > On 12/24/2014 12:16 AM, Robert Yang wrote:
> >> Hello syslinux,
> >>
> >> Merry Christmas! These patches will make extlinux work with
umounted
> >> ext2/3/4 filesystem, for example:
> >>
> >> $ extlinux -i /dev/sdXN
> >> or
> >> $ extlinux -i file_block
> >>
> >> Also it can work with something like:
> >> $ extlinux /dev/sdXN  --reset-adv
> >> or
> >> $ extlinux file_block --reset-adv
> >>
> >> We don't use a new option (I planed to use "-d" but
it is already in
> >> use), it will check whether the target is a directory or device
and
> >> decide what to do, it would stop and error if the device is
mounted.
> >>
> >> I put these patches on github so that you can easily get them in
case
> >> you'd like to test them. (The repo's name is sys_tmp,
which avoids
> >> confusing others, I will remove the repo when these patches are
> >> reviewed).
> >>
> >> More info:
> >> * It will use libext2fs to read and write the file.
> >> * It will be used when the target is a extX device or file block,
and
> >>    work as before when the target is a directory.
> >> * It will be used for both modifing the existing adv when
> >>    update_only == -1, and install the files to the filesystem.
> >>
> >> We will begin to use this feature in Yocto Project once it is fine
to
> >> the syslinux community.
> >>
> >
> > I believe we should unify this with the syslinux installer, which is
> > used for unmounted FAT filesystems.  Ideally we should unify that with
> > the extlinux installer too, but that may be a later project.
>
> Hello hpa,
>
> What does "unify that with the extlinux installer too" mean,
please ? And
> I will add the patches to syslinux (not syslinux-mtools), and we don't
require
> the root privilege if it is ext2/ext3/ext4 since it doesn't need mount,
what's
> your opinion, please ?
>
> // Robert
>
> >
> > 	-hpa
> >
> >
> >
> >
>

If I may...

Note: Please do _not_ accept the following descriptions as accurate
without confirmation that the installers are indeed currently working
as described here.

_ All the 'syslinux' commands use "device" as argument.

_ The 'linux/syslinux-nomtools' installer uses system calls.

_ The 'mtools/syslinux' installer requires unprivileged write
permissions and mtools.

So to continue with the same reasoning:

_ An installer capable of writing to extN-formatted "devices" would
seemingly mean adding extN support to 'linux/syslinux-nomtools'. This
installer shall still be "standalone".

_ An installer capable of writing to extN-formatted "devices" while
requiring less permissions (i.e. unprivileged write permissions only)
would seemingly mean an equivalent to the current 'mtools/syslinux'
installer, but for extN. Perhaps this would mean a new "e2fs/syslinux"
installer? (Note that I don't mention the "libext2fs" term here,
as it
is "too-long" and some distros might use a slightly-different
(package)
name for the same library/capability/support/tool).

This would also maintain current documentation and so-called
"tutorials" still (mostly) relevant, avoiding confusions (to final
users) about the features and usage of the 'extlinux' command.

Regards,
Ady.