Bug 4083 - e2fsprogs: Integrate initial directory into mke2fs
Summary: e2fsprogs: Integrate initial directory into mke2fs
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: deployment (show other bugs)
Version: 1.4
Hardware: x86 Multiple
: Medium+ enhancement
Target Milestone: 1.6 M4
Assignee: Robert Yang
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks: 4106 4661
  Show dependency tree
 
Reported: 2013-03-21 22:47 UTC by Darren Hart
Modified: 2014-03-10 16:18 UTC (History)
7 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darren Hart 2013-03-21 22:47:41 UTC
We can now use debugfs from e2fsprogs to generate ext[34] filesystems without root priveleges and without genext2fs. This is slower than it could be. Ideally this would be integrated into mke2fs from e2fsprogs.

To do this we need to move some of the higher level functions (like copy) from debugfs into libext2fs so it is available to both debugfs as well as other programs, including mke2fs.

There may be additional functionality required, Robert Yang should be able to provide details on what he has found lacking while integrating the debugfs solution.

Once integrated into libext2fs, an argument to mke2fs can be added to populate the newly formatted filesystem from an initial directory. Once merged upstream we can then integrate this method into oe-core's image building routines.
Comment 1 Song Liu 2013-04-08 21:56:11 UTC
Should be 'enhancement' since it's a feature request.
Comment 2 Darren Hart 2013-07-16 18:16:53 UTC
Robert, are you actively working this? Or is this pending the debugfs fixes and integration first?
Comment 3 Robert Yang 2013-07-19 02:48:54 UTC
(In reply to comment #2)
> Robert, are you actively working this? Or is this pending the debugfs fixes
> and integration first?

Yes, I'm working on it now, the debugfs patches have been sent to the ext4 mailing list, I think that what shall we do next:

1) The draft design for this case:
   a) Add a [-d <directory>] option to mke2fs to specify the initial directory
   b) We need copy the following types of files:
      - directory
      - regular file | regular empty file
      - symbolic link
      - block special file
      - character special file
      - fifo

   c) The hard links
   d) The sparse file
   e) Use the following ways to verify the created image:
      - fsck.ext* -fn
      - diff -Nur <initial directory> <mounted image>
      - Verify the sparse file: find -type f -printf "%S\t%p\n" 2>/dev/null | gawk '{if ($1 < 1.0) print $1, $2}'
      - Use runqemu to test the image

2) Talk with the maintainer of e2fsprogs to see whether such a patch is acceptable.

Please feel free to give your comments.
Comment 4 Robert Yang 2013-08-30 01:47:18 UTC
The patches have been sent to linux-ext4 mailing list, but it is not impossible to pass the review in 1.5, so move it 1.6.
Comment 6 Ionut Chisanovici 2014-03-10 16:18:09 UTC
Hi,

Verified with da6926bc6a17478bd38f0df176116b6552c124f6.

Cheers,

Ionut C