LinuxQuestions.org
Visit Jeremy's Blog.
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 01-21-2011, 07:41 AM   #1
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
mounting loop device at boot?


hey guys
so, I'm trying to make a persistent ttylinux usb
it doesn't have persistence yet so I'm improvising

First, I gunzipped the ttylinux "filesys.gz", then mounted it
mkdir mnt
mount -o loop filesys mnt

then I edited /mnt/etc/fstab as so

Code:
/dev/ram0    /          ext2     defaults                    0 0
#UUID=858bbfc6-4d93-47f8-a6ad-c59e961a606d    /home       ext3     auto,user,noatime   0 0
#/dev/loop5   none       swap     defaults                    0 0 # /dev/sda_

devpts       /dev/pts   devpts   gid=5,mode=0620             0 0
tmpfs        /dev/shm   tmpfs    rw,noexec,nosuid,size=24k   0 0
proc         /proc      proc     noauto                      0 0
sysfs        /sys       sysfs    noauto                      0 0
and that works great!

However, I would really like to instead mount a ext3 file (think casper-rw) as /home at boot

Code:
UUID=858bbfc6-4d93-47f8-a6ad-c59e961a606d/ttylinux-rw    /home       ext3     loop,user,auto 0 0
but it says "no loop devices loaded"
so it's not doing "modprobe loop" or loading loop modules at startup

How do I get it to load loop at startup??

Can I edit /etc/modprobe.d/modprobe.conf?
add "modprobe loop" or what?
Thanks
 
Old 01-21-2011, 09:29 AM   #2
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Original Poster
Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
OK

I edited /etc/fstab again and made it like this

Code:
UUID=858bbfc6-4d93-47f8-a6ad-c59e961a606d    /tmp      ext3     auto,user,noatime   0 0
/tmp/ttylinux-rw    /home       ext3     loop,user,auto,noatime 0 0
but now it doesn't auto mount /home, I have to issue "mount /home" as root after logging in

why doesn't it automount it??
it does automount UUID=858bbfc6-4d93-47f8-a6ad-c59e961a606d /tmp so why not the other??

thanks
 
Old 01-21-2011, 09:47 AM   #3
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,084

Original Poster
Rep: Reputation: 336Reputation: 336Reputation: 336Reputation: 336
Ok
I got it to automount by editing /etc/rc.d/rc.local and added

/sbin/modprobe loop

mount -a

So, now it mounts the ext3 "ttylinux-rw" 100MB file on usb as /home!

Is there a more elegant or simpler way to do this?
Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mounting loop device as a regular user chriswcristie Linux - General 5 06-06-2012 07:53 AM
mounting a loop device vinaytp Linux - Newbie 5 10-05-2009 12:59 PM
Trying to mount loop device during boot: permission denied openSauce Linux - Newbie 5 10-06-2008 01:07 PM
Gentoo. Problems with the loop device when mounting an iso file Snerkel Linux - Software 4 11-26-2004 04:34 PM
Problem mounting CD image (no loop device)... Slayer Linux - General 1 10-05-2003 10:30 AM


All times are GMT -5. The time now is 12:12 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration