How to exclude paths from being extracted when extracting an iso using xorriso
0
votes
1
answer
661
views
As an example I'm trying to extract all the files from the ubuntu live iso **except** the path
/casper/filesystem.squashfs
. According to the man page:
Normally xorriso only writes to disk files which were given as stdio:
pseudo-drives or as log files. But its alter ego osirrox is able to
extract file objects from ISO images and to create, overwrite, or
delete file objects on disk.
Disk file exclusions by -not_mgt, -not_leaf, -not_paths apply.
I can extract all paths on the iso fine using:
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -extract / extract_dir
But I've been attempting to use the disk file exclusions but to no avail. I've tried different variations or not_leaf
and not_paths
in different orders both before and after the -extract
action. They all extract all paths. Here's a few that I've tried.
Using not_leaf
:
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_leaf 'filesystem.squashfs' -extract / extracted_dir
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -extract / extracted_dir -not_leaf 'filesystem.squashfs'
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_leaf 'filesystem.squashfs' -extract / extracted_dir
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -extract / extracted_dir -not_leaf 'filesystem.squashfs'
Using not_paths
with reorderings as above:
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_paths 'casper/filesystem.squashfs' -- -extract / extracted_dir
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_paths '/casper/filesystem.squashfs' -- -extract / extracted_dir
xorriso -osirrox on -indev ubuntu-21.04-desktop-amd64.iso -not_mgt on -not_paths 'extracted_dir/casper/filesystem.squashfs' -- -extract / extracted_dir
I would accept an answer with not_leaf
or not_paths
, but would prefer both. And an explanation of the logic behind how this is supposed to work (ie why am I not getting it?) would be nice.
Asked by crass
(398 rep)
Aug 31, 2021, 08:19 AM
Last activity: Sep 6, 2021, 03:38 PM
Last activity: Sep 6, 2021, 03:38 PM