LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-05-2017, 09:16 AM   #1
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
ext4 file system on regular file


At least it is possible with ext2: to create filesystem ext2 on regular file and mount this as usual, I am interesting is it possible with ext4?
 
Old 10-05-2017, 09:21 AM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,781

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Certainly. You can create any type of filesystem on a file and then mount that file as a loop device. Yes, mkfs.ext4 will ask whether you really want to do that, but will proceed if you say "y".
 
Old 10-05-2017, 09:25 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
Yes. It is possible in the same way.

Code:
dd if=/dev/zero bs=1M count=1024 of=/tmp/foo.ext4
/sbin/mkfs.ext4 /tmp/foo.ext4
sudo mount -o loop /tmp/foo.ext4 /mnt/
 
2 members found this post helpful.
Old 10-07-2017, 09:16 AM   #4
igadoter
Senior Member
 
Registered: Sep 2006
Location: wroclaw, poland
Distribution: many, primary Slackware
Posts: 2,717

Original Poster
Blog Entries: 1

Rep: Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625Reputation: 625
Quote:
Originally Posted by Turbocapitalist View Post
Yes. It is possible in the same way.
[/code]
Great thanks. I remembered that I was reading something similar about ext2 in documentation for Xen.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change file system from ext4 journeying to ext4 writeback ? 5883 Linux - Newbie 6 03-10-2014 08:04 AM
[SOLVED] file system check for ext4 file systems anon091 Linux - Newbie 18 12-24-2012 01:37 PM
Regular file system and a journaling file system? Senthilv Linux - Server 1 10-09-2011 02:11 AM
OS-X and Linux ext4 file system deadbug Other *NIX 3 07-25-2009 06:11 AM
Ext4 File System - Out or Not?? QueenZ Linux - Newbie 12 02-12-2009 04:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration