LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-06-2023, 04:39 PM   #1
banderas20
Member
 
Registered: Aug 2018
Posts: 138

Rep: Reputation: Disabled
Question dev/loopX when mounting a regular file


Hi!

I have created a filesystem inside a regular file:

1. Created a dummy 2GB file.
2. Created the partition with
Code:
fdisk <file>
3. Formatted it with
Code:
mkfs.ext4 <file>
4. Checked it with
Code:
file <file>
. I got the UUID.
5. Added it to
Code:
/etc/fstab
starting with the UUID.
6. Remounted all with
Code:
mount -a
But I can't find any reference to the file. Neither with
Code:
lsblk
nor
Code:
df -h
. Instead, I see a new /dev/loopX device.

I don't know how to interpret this. Moreover, am I missing something?

Thanks a lot!

Last edited by banderas20; 04-06-2023 at 04:42 PM. Reason: typo
 
Old 04-06-2023, 06:33 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,764

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
Use the absolute path to the file not the UUID. /etc/fstab line like:

Code:
/path/to/file /mount/point  ext4 loop 0 0

Last edited by michaelk; 04-06-2023 at 06:35 PM.
 
Old 04-07-2023, 06:44 AM   #3
banderas20
Member
 
Registered: Aug 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Use the absolute path to the file not the UUID. /etc/fstab line like:

Code:
/path/to/file /mount/point  ext4 loop 0 0
I will

Anyway, what does the "loop" mean? I have plenty of /dev/loopX in the system.

Thanks!
 
Old 04-07-2023, 06:52 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,764

Rep: Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931Reputation: 5931
Those loops are used for other stuff. A loop let's the system use a file like a block device, filesystem.
 
Old 04-07-2023, 10:47 AM   #5
banderas20
Member
 
Registered: Aug 2018
Posts: 138

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by michaelk View Post
Those loops are used for other stuff. A loop let's the system use a file like a block device, filesystem.
Understood. Thanks!
 
  


Reply

Tags
disk, fstab



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Older computer boot failure. Running Ubuntu. Err.Msg=mounting /dev on /root/dev failed no such file or directory drmjh Linux - General 6 12-28-2015 06:24 PM
What creates /dev/pts, /dev/loopx, and other /dev devices - Fedora Core 2 rickpo12 Linux - General 5 02-11-2012 08:50 PM
pseudo terminals: /dev/ptmx <-> /dev/pts/ vs. /dev/ptyp <-> /dev/ttyp rtspitz Linux - Software 2 12-02-2011 02:07 PM
/dev/null is a regular file Wynd Linux - General 2 01-24-2008 12:29 PM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:19 AM.

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