[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: chroot: wiped my home directory



Matthias Julius wrote:

> Jonathan Kaye <jdkaye10@yahoo.es> writes:
> 
>> Actually this has turned out to be a disaster. I bind-mounted my
>> 32bit home directory, which was also mounted normally. Both these
>> mounts were in the fstab file. I chrooted from the 64bit system and
>> su - mylogin name and set the display. I tried running openoffice
>> and wonder of wonders it opened!  The one thing that was strange was
>> it acted as if my 32bit home directory was empty (gave my the
>> running for the first time routine). Hmm. Well the result of all
>> this was that my 32bit home directory was wiped clean. Dead!  Gone
>> forever! Damned inconvenient that. Suicide became a serious option
>> but
> 
> Is it empty where it is directly mounted, too?  Make sure you
> bind-mount your home _after_ it is mounted in its original location.
> Otherwise you bind-mount the empty mount point.
> 
Here's what my mount looked like (looking from my amd64 installation):
/dev/hda1       /i386    ext3    defaults        0       0
# ia32 chroot
/home           /i386/home none  bind            0       0
/tmp            /i386/tmp none   bind            0       0
proc            /i386/proc proc  defaults        0       0

The first /i386 mount was always there and never caused  problems. I then
did
#chroot /i386
and
#su - mylogin
then I ran
$export DISPLAY=:0
and then $/opt/openoffice.org1.9.125/program/swriter
and the OOo logo appeared but it acted as if it couldn't find
the /i386/home. I quickly exited from chroot and unmounted all the mount
bind stuff and searched (by locate) files that would only be in my original
32bit home directory. Nothing, nada, niente. I rebooted and booted directly
into the 32 bit system but of course I couldn't log on because there was
no /home/mylogin directory; in fact /home was completely empty. Again I did
a locate search for all kinds of files that were in /home and all the
searches turned up empty. Something that I did caused the /home directory
in /hda1 to be replaced null.


> I bind-mount /home and other directories, too.  And I did not yet have
> any problem with that.
> 
I guess I'm just jinxed. I can't explain it either.
> Matthias

Thanks for the concern,
Jonathan



Reply to: