0

How to create a browsable rootfs image in Ubuntu? E.g. that I can extract files that I need in a matter of minutes?

Have already considered dd and tar-gzing root fs, but both don’t answer the criteria for browsability (latter because of speed for ungzing the archive every time).

P.S. Sector precision is not the case. Need just files and permissions to be persisted.

Denis Kulagin
  • 379
  • 1
  • 3
  • 9

2 Answers2

0

A way to go, free and totally Ubuntu-based:

  1. Create disk image using Clonezilla. It supports creating Live CD/USB to create a clean copy. Works quicker than creating a tarball/zip-archive particularly bcs it operates on a lower level.
  2. To access the image, restore it from the compressed files using steps from here and mount it using mount tool.

P.S. Clonezilla produces a compressed image, so in order to browse it you have to uncompress and restore. The suggesed approach could be convenient both for storing a backup with respect to disk space and browsing the image while unpacking it only upon necessity.

If one needs to access the image frequently (not my case, I just need a backup), there is an option to keep raw uncompressed ready-to-mount image only.

P.P.S It seems that Clonezilla tool has an option for creating an uncompressed raw image right away.

Denis Kulagin
  • 379
  • 1
  • 3
  • 9
0

Even better solution for the case (than using Clonezilla) it to use SquashFS. It:

  1. Creates a compressed image of the whole rootfs or particular directories using modern tool with support for multithreading. Operates much faster than classic tar utility.
  2. One can mount the resulting image with no need for additional manupulations (like in case with using Clonezilla) and explore it like an ordinary filesystem.

To summarize, it enables creating a compressed browsable image in a convenient and fast way. Seems like a right tool for the task.

P.S. To whom it might be important: SquashFS has an unsquashing tool to list/extract files/directories from a filesystem image that doesn’t require root privileges.

Denis Kulagin
  • 379
  • 1
  • 3
  • 9