You are not logged in.

#1 2012-05-30 01:50:51

Relish
Member
Registered: 2012-01-16
Posts: 13

Loop-Install Mount-Shutdown Conundrum

So I have this linux installation in a loopback image on my hfs+ partition.  The problem is that every time the loopback image is mounted on /, the host filesystem must be mounted too (rw), however the OS does not properly unmount the hfs+ partition of my hard drive on shutdown or even remount it as ro.  It tries to, I assume, and I even tried to, but we get the message that it's busy, and as a result the host fs is unmounted uncleanly at every shutdown.

Here is the problem:
/ is mounted ro
/root is mounted rw (hfs+)
/root must be mounted for / to be mounted because the image for / is on /root
"mount -o remount,ro /root" results in the "busy" error message

I know the initramfs I am using has mount/umount binaries and bash, I assume that matters.  What I need to do is somehow get the hfs+ partition (the host partition) unmounted or mounted ro before halt.  So far I have tried some stuff and I am stumped.  (Notably, I tried to "umount -l" everything, but it didn't work)

Last edited by Relish (2012-05-31 01:45:47)

Offline

#2 2012-05-30 02:11:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,511
Website

Re: Loop-Install Mount-Shutdown Conundrum

Relish wrote:

I want to rip my head off and feed it to a bear.  What do I do?

When I first read that I saw "I want to rip my head off and feed it a beer" ... a stunning visual that is.  I'd say do thatwink

Jokes aside, I may be missing something, but could you clarify what you mean by your first line, or how you installed linux to a disk image on a mac partition?  Is this a virtual box setup?  Or might this be that bootcamp thing?


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2012-05-30 03:00:03

Relish
Member
Registered: 2012-01-16
Posts: 13

Re: Loop-Install Mount-Shutdown Conundrum

Trilby wrote:
Relish wrote:

I want to rip my head off and feed it to a bear.  What do I do?

When I first read that I saw "I want to rip my head off and feed it a beer" ... a stunning visual that is.  I'd say do thatwink

Jokes aside, I may be missing something, but could you clarify what you mean by your first line, or how you installed linux to a disk image on a mac partition?  Is this a virtual box setup?  Or might this be that bootcamp thing?

Thanks for the quick reply, anyway what I did is I installed ubuntu to an image file on my mac partition.  I use efi grub to boot the kernel from the image file, then the kernel and initrd do the rest.  The problem is, I found out, is that at shutdown the kernel is not unmounting my mac partition which was required to mount the image.  The mac partition doesn't get unmounted and as a result I get the error on boot.  Now I just need a way to get the scripts to unmount the partition like it does in wubi, but I am clueless to how it is done.

Offline

#4 2012-05-30 03:19:01

Jristz
Member
From: America/Santiago
Registered: 2011-06-11
Posts: 1,048

Re: Loop-Install Mount-Shutdown Conundrum

ER you say Ubuntu or Arch?
if this can help you.
#Arch in /etc/rc.shutdown (if I remmember good) you can append otions right?, Why not try to append a umount option too?
#Ubuntu Wrong forum


Lenovo ThinkPad L420 modified
:: Intel i7 2560QM :: 8 GB RAM :: SSD 256 GB ::
:: DVD read+Writter :: 3 USB 3.0 Expresa Card ::
:: a Favulous 1 mins lasting Io-Li battery ::cry::

Offline

#5 2012-05-30 22:06:11

Relish
Member
Registered: 2012-01-16
Posts: 13

Re: Loop-Install Mount-Shutdown Conundrum

Jristz wrote:

ER you say Ubuntu or Arch?
if this can help you.
#Arch in /etc/rc.shutdown (if I remmember good) you can append otions right?, Why not try to append a umount option too?
#Ubuntu Wrong forum

I was going to do both, but I started with Ubuntu because it was easier.  Then I realized there was a dilemma where the host filesystem and the loop (root) filesystem were the only ones mounted, but how would you unmount either without b0rking the process of unmounting the other?

Offline

Board footer

Powered by FluxBB