how to extract file from a ext4 filesystem data?
i have a XXX.img file.
system.img: Linux rev 1.0 ext4 filesystem data, UUID=XXXX (extents) (large files)
i want to extract some file from it, how?
or XXX.subimg.tgz file
first gunzip it, get subimg file, then as image file.
linux filesystems
add a comment |
i have a XXX.img file.
system.img: Linux rev 1.0 ext4 filesystem data, UUID=XXXX (extents) (large files)
i want to extract some file from it, how?
or XXX.subimg.tgz file
first gunzip it, get subimg file, then as image file.
linux filesystems
Mount it as aloopback
filesystem.
– Mark Setchell
Sep 1 '14 at 6:13
oops, how fool am i! i'm not notice img file and iso file are same.Thanks!
– liuyang1
Sep 1 '14 at 6:18
Sometimes we all need more coffee ;-)
– Mark Setchell
Sep 1 '14 at 6:21
add a comment |
i have a XXX.img file.
system.img: Linux rev 1.0 ext4 filesystem data, UUID=XXXX (extents) (large files)
i want to extract some file from it, how?
or XXX.subimg.tgz file
first gunzip it, get subimg file, then as image file.
linux filesystems
i have a XXX.img file.
system.img: Linux rev 1.0 ext4 filesystem data, UUID=XXXX (extents) (large files)
i want to extract some file from it, how?
or XXX.subimg.tgz file
first gunzip it, get subimg file, then as image file.
linux filesystems
linux filesystems
edited Sep 28 '14 at 6:18
liuyang1
asked Sep 1 '14 at 6:11
liuyang1liuyang1
1,0301120
1,0301120
Mount it as aloopback
filesystem.
– Mark Setchell
Sep 1 '14 at 6:13
oops, how fool am i! i'm not notice img file and iso file are same.Thanks!
– liuyang1
Sep 1 '14 at 6:18
Sometimes we all need more coffee ;-)
– Mark Setchell
Sep 1 '14 at 6:21
add a comment |
Mount it as aloopback
filesystem.
– Mark Setchell
Sep 1 '14 at 6:13
oops, how fool am i! i'm not notice img file and iso file are same.Thanks!
– liuyang1
Sep 1 '14 at 6:18
Sometimes we all need more coffee ;-)
– Mark Setchell
Sep 1 '14 at 6:21
Mount it as a
loopback
filesystem.– Mark Setchell
Sep 1 '14 at 6:13
Mount it as a
loopback
filesystem.– Mark Setchell
Sep 1 '14 at 6:13
oops, how fool am i! i'm not notice img file and iso file are same.Thanks!
– liuyang1
Sep 1 '14 at 6:18
oops, how fool am i! i'm not notice img file and iso file are same.Thanks!
– liuyang1
Sep 1 '14 at 6:18
Sometimes we all need more coffee ;-)
– Mark Setchell
Sep 1 '14 at 6:21
Sometimes we all need more coffee ;-)
– Mark Setchell
Sep 1 '14 at 6:21
add a comment |
3 Answers
3
active
oldest
votes
mount -o loop [imgfilename] [path to mount]
just like iso file.
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
add a comment |
mkdir -p /mnt/rootfs
mkdir -p /mnt/disk
mount -o loop rootfs.ext4 /mnt/rootfs
mount /dev/sda2 /mnt/disk
cp -r /mnt/rootfs/* /mnt/disk
umount /mnt/rootfs
1
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
1
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
add a comment |
If you cannot mount (because you don't have root privileges), you can extract the ext4 filesystem data in userspace using extfstools.
To install it, run:
git clone https://github.com/qmfrederik/extfstools
cd extfstools
./autogen.sh
./configure
make
To extract all files from XXX.img
to savedir
:
ext2rd XXX.img ./:savedir
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25599767%2fhow-to-extract-file-from-a-ext4-filesystem-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
mount -o loop [imgfilename] [path to mount]
just like iso file.
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
add a comment |
mount -o loop [imgfilename] [path to mount]
just like iso file.
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
add a comment |
mount -o loop [imgfilename] [path to mount]
just like iso file.
mount -o loop [imgfilename] [path to mount]
just like iso file.
answered Sep 1 '14 at 8:56
liuyang1liuyang1
1,0301120
1,0301120
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
add a comment |
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
And if I cannot mount? (I'm on a KVM VPS, mount is not possibile at all)
– realtebo
Jan 30 '17 at 15:39
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
If you cannot mount, you can use extfstools
– Frederik Carlier
Nov 15 '18 at 14:21
add a comment |
mkdir -p /mnt/rootfs
mkdir -p /mnt/disk
mount -o loop rootfs.ext4 /mnt/rootfs
mount /dev/sda2 /mnt/disk
cp -r /mnt/rootfs/* /mnt/disk
umount /mnt/rootfs
1
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
1
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
add a comment |
mkdir -p /mnt/rootfs
mkdir -p /mnt/disk
mount -o loop rootfs.ext4 /mnt/rootfs
mount /dev/sda2 /mnt/disk
cp -r /mnt/rootfs/* /mnt/disk
umount /mnt/rootfs
1
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
1
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
add a comment |
mkdir -p /mnt/rootfs
mkdir -p /mnt/disk
mount -o loop rootfs.ext4 /mnt/rootfs
mount /dev/sda2 /mnt/disk
cp -r /mnt/rootfs/* /mnt/disk
umount /mnt/rootfs
mkdir -p /mnt/rootfs
mkdir -p /mnt/disk
mount -o loop rootfs.ext4 /mnt/rootfs
mount /dev/sda2 /mnt/disk
cp -r /mnt/rootfs/* /mnt/disk
umount /mnt/rootfs
answered Aug 30 '18 at 7:28
Gopi ShankarGopi Shankar
298
298
1
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
1
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
add a comment |
1
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
1
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
1
1
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
An explanation, why this solves the problem of the OP, would greatly improve this answer.
– Mr. T
Aug 30 '18 at 7:45
1
1
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
While your code may correct as answer But Elaborating what your code does, It can improve the quality of your answer. Checkout the Article : [ How do I write a good answer? ](stackoverflow.com/help/how-to-answer)
– LuFFy
Aug 30 '18 at 8:28
add a comment |
If you cannot mount (because you don't have root privileges), you can extract the ext4 filesystem data in userspace using extfstools.
To install it, run:
git clone https://github.com/qmfrederik/extfstools
cd extfstools
./autogen.sh
./configure
make
To extract all files from XXX.img
to savedir
:
ext2rd XXX.img ./:savedir
add a comment |
If you cannot mount (because you don't have root privileges), you can extract the ext4 filesystem data in userspace using extfstools.
To install it, run:
git clone https://github.com/qmfrederik/extfstools
cd extfstools
./autogen.sh
./configure
make
To extract all files from XXX.img
to savedir
:
ext2rd XXX.img ./:savedir
add a comment |
If you cannot mount (because you don't have root privileges), you can extract the ext4 filesystem data in userspace using extfstools.
To install it, run:
git clone https://github.com/qmfrederik/extfstools
cd extfstools
./autogen.sh
./configure
make
To extract all files from XXX.img
to savedir
:
ext2rd XXX.img ./:savedir
If you cannot mount (because you don't have root privileges), you can extract the ext4 filesystem data in userspace using extfstools.
To install it, run:
git clone https://github.com/qmfrederik/extfstools
cd extfstools
./autogen.sh
./configure
make
To extract all files from XXX.img
to savedir
:
ext2rd XXX.img ./:savedir
answered Nov 15 '18 at 14:20
Frederik CarlierFrederik Carlier
1,3261514
1,3261514
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f25599767%2fhow-to-extract-file-from-a-ext4-filesystem-data%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Mount it as a
loopback
filesystem.– Mark Setchell
Sep 1 '14 at 6:13
oops, how fool am i! i'm not notice img file and iso file are same.Thanks!
– liuyang1
Sep 1 '14 at 6:18
Sometimes we all need more coffee ;-)
– Mark Setchell
Sep 1 '14 at 6:21