Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dirs disappearing (sic!) from /mnt & empty /usr after reboot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
johnnytheswede
n00b
n00b


Joined: 12 Mar 2010
Posts: 21

PostPosted: Fri Mar 19, 2010 10:26 pm    Post subject: Dirs disappearing (sic!) from /mnt & empty /usr after re Reply with quote

Hello,

I am going through the rite of passage of installation. Various troubles appear and I have started actually writing scripts to make the process of starting over more easy.

Problem 1: What I notice is that during installation, devices mounted under /mnt disappear! I cd out of /mnt/gentoo to go somewhere else and fix something, and when I come back, some directories are missing! This scenario is not uncommon:

ls under /mnt/gentoo/:

boot/
tmp/
usr/
var/
home/

ls under /mnt/gentoo/, a little while later:

var/
home/
lost+found

Where did tmp/ and boot/ go? 8O

Problem 2: I've managed to install Gentoo. (Or so I thought ;-)) But when I reboot, the /usr directory is totally empty! Of course init goes nuts when it wants to run all the startscripts because there are no startupscripts in /usr since usr is empty!

Weird!

I might add that I am using an automated mount-script at the beginning of each new-fresh installation. Maybe I forgot something there, however, I can run through all the installationscripts without any complaints, and I ca also edit config-files during install, so it feels things are properly mounted. Also a check with a Gentoo's gParted CD shows that the device that gets mounted on /usr actually is empty. (It's 12GB with 11.66 GB free, indicating that the only things that's there if the journal file.)

Any ideas?
_________________
I used to be undecided, but, uhm... now I don't really know anymore
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Mar 20, 2010 12:43 am    Post subject: Reply with quote

johnnytheswede,

It sounds like you did the default 3 partitions, untarred the stage3 then some time later decided you wanted /usr on its own partition.
As a result, /usr is empty but mount will quite happily mount the empty partition over your working /usr dir.

You need to build the filesystem tree you want before you untar the stage3, so files end up on the right partition.

You can fix it.

Boot the CD. Mount your root partition at /mnt/gentoo, now look in /mnt/gentoo/usr to see if there are files there.
If so, mount your real /usr partition somewhere, say on /mnt/cdrom and copy the content of /mnt/gentoo/usr to /mnt/cdrom.

If /mnt/gentoo/usr is empty, you did the initial install correctly but omitted the /usr entry from /etc/fstab.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
johnnytheswede
n00b
n00b


Joined: 12 Mar 2010
Posts: 21

PostPosted: Sat Mar 20, 2010 2:09 pm    Post subject: Thank you, however, it was not it. Reply with quote

Thank you for your reply. However, I have taking care setting up the file-hierarchy before untarring. I believe there might be something else going on here. Here's why:

I just started my computer again to resume installation and what I usually do is to first create the tmp-dir under /mnt/gentoo. Then chmod it 1777 and mount /dev/sda6/ to it. This is where I keep my installation scripts. I went into tmp and ran my first setting-up-the-file-hierarchy script. That ran fine. I then cd:ed around to see that everything got set up as I wanted, and BAM! tmp/ was no longer mounted! 8O. How do I know that, well, I ran ls at /mnt/gentoo, first observing that the sticky bit was no longer set on tmp (the chmod 1777 thing) then, I went into tmp and checked its contents... empty. And I just ran a script in there setting up the whole file-hierarchy!

To me it seems that I am haunted by some kind of "random unmounting of devices during install"... some enigmatic "unmounter" that lurks on me... Your comments make sense, but I believe I am seeing something else here. What do you think? (BTW my installations scripts do not touch the /mnt/gentto/tmp dir so there is nothing with the scripts unmounting the /mnt/gentoo/tmp-dir.)

/Johnny
_________________
I used to be undecided, but, uhm... now I don't really know anymore
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Sat Mar 20, 2010 2:27 pm    Post subject: Reply with quote

Yikes poltergeist!

Have you tried without any scripts and just following the Gentoo Handbook exactly, step-by-step?

Could be worth a try. :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Sat Mar 20, 2010 3:08 pm    Post subject: Reply with quote

johnnytheswede,

Oh dear ...
johnnytheswede wrote:
... what I usually do is to first create the tmp-dir under /mnt/gentoo

Lets take that statement at face value. You must always manually mount your root at /mnt/gentoo as the very first thing or when root gets mounted at /mnt/gentoo everything created there is hidden, including your tmp-dir

If you want some helper scripts, put the outside the chroot helper into your / so its available as soon as you do the manual mount.
Put the inside the chroot helpers into your installs /root folder, so they are out of the way. Thats /mnt/gentoo/root roots home dir inside your install.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
johnnytheswede
n00b
n00b


Joined: 12 Mar 2010
Posts: 21

PostPosted: Sun Mar 21, 2010 5:36 pm    Post subject: My nose is touching the sky! Reply with quote

It works! :-D Many thanks! I have no more urgent needs, just a few
questions.

1. The tools I have been using to install everything are

* The minimal x86_64 Gentoo install-CD.
* Sysresccd
* gPartEd

I notice that I cannot chroot from the Sysresccd environment, which
probably means it's x86. I believe www.sysrescd.org [ edit: this was a
faulty URL, the correct one is www.sysresccd.org
] says so also. But,
this CD is so good! It has gPartEd and Partition imaging (my complete
setup is now saved in a <600MB image-file that will go onto a CD soon,
so I can revert back to a working installation at any time.) But isn't
there a x86_64 version of it? (Hope so!)


2. Inspired by your advice i now mount everything in a top-down fashion.

But, I still experience that I cannot access the boot-partition, it is
not mounted after a reboot completes. I can of course access it after a
manual remount though. I have tried to rearrange the lines in /etc/fstab,
thinking that "top-down mounting is good, hence root first!", and also
putting an extra line:

/dev/sda1 /boot ext2 noauto,noatime 1 2 #Mount it goddammit!

in after everything else is mounted, but that does not help. Of course
I'm on the wrong track here. Also in all examples of /etc/fstab, the
boot-partition comes first and only once.

But maybe there is a point in that boot is not mounted during post-
boot system execution? When the system is up and running, we don't need
access to boot do we? Or is there still an error in my installation?

Could I patch that with adding a mount in some well-chosen init-script?
But that sounds artificial, isn't /etc/fstab the place to fix this in?
I have carefully read the man pages for mount and fstab but cannot
find anything that helps. However, this question is not so urgent as the
one before, I now have a working Gentoo-install and this is more of a
fine-tuning, so if you donät have so much time I understand that you
cannot reply.

Thanks again
Johnny


Here is my complete fstab:

Code:

/dev/sda1  /boot             ext2      noauto,noatime 1 2
/dev/sda2  /                 ext3      noatime        0 1
/dev/sda5  none              swap      sw             0 0
/dev/sda6  /tmp              ext3      noatime        0 2
/dev/sda8  /usr              ext3      noatime        0 2
/dev/sda7  /usr/portage      ext3      noatime        0 2
/dev/sda9  /usr/local        ext3      noatime        0 2
/dev/sda10 /var              reiserfs  noatime        0 2
/dev/sda11 /var/tmp/portage  reiserfs  noatime        0 2
/dev/sda12 /home             ext3      noatime        0 2

/dev/sda13 /vms              xfs      noatime      0 2
/dev/sda14 /windows          xfs      noatime      0 2
/dev/sda15 /databkp          xfs      noatime      0 2
/dev/sda4  /instbkp          xfs      noatime      0 2

/dev/cdrom   /mnt/cdrom   auto      noauto,ro   0 0

shm      /dev/shm   tmpfs      nodev,nosuid,noexec   0 0


_________________
I used to be undecided, but, uhm... now I don't really know anymore


Last edited by johnnytheswede on Mon Mar 22, 2010 1:30 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21706

PostPosted: Sun Mar 21, 2010 7:37 pm    Post subject: Re: My nose is touching the sky! Reply with quote

johnnytheswede wrote:
I notice that I cannot chroot from the Sysresccd environment, which
probably means it's x86. I believe www.sysrescd.org says so also. But,
this CD is so good! It has gPartEd and Partition imaging (my complete
setup is now saved in a <600MB image-file that will go onto a CD soon,
so I can revert back to a working installation at any time.) But isn't
there a x86_64 version of it? (Hope so!)
You referenced an incorrect site in your post, which appears to be a domain squatter. You need another c.

From the kernel document on the System Rescue CD site:
Quote:
the two kernel images are rescuecd (32bit) and rescue64 (64bit)
The shipped tools are always 32-bit, but if you boot the 64-bit rescue kernel, then you should be able to chroot into an amd64 Linux system.
johnnytheswede wrote:
/dev/sda1 /boot ext2 noauto,noatime 1 2 #Mount it goddammit!
Most users do not leave /boot mounted, because it is seldom needed. Leaving it unmounted avoids the need to fsck it after a system crash. If you want it to mount automatically at boot, you should remove the noauto keyword. ;)
Back to top
View user's profile Send private message
johnnytheswede
n00b
n00b


Joined: 12 Mar 2010
Posts: 21

PostPosted: Mon Mar 22, 2010 1:28 pm    Post subject: Thank you everyone, everything is pristine now. Reply with quote

Yes, another c in the domain-name, www.sysresccd.org is the name. (Will edit my post to add the correct link.)

And, YES :-), I could chroot when booting the excellent sysresccd with a 64-bit image. (I pressed F2 to see the available images.)

and, also, YES, taking away "noauto" in fstab made boot remain mounted after a reboot. (But I will probably leave it umounted in the future when I am not doing kernel work for the reasons you describe.)

This is most satisfying. Many thanks again.

I feel that I am receiving so much support from this community, is there anything I could do to support you? I could maybe be a software tester or whatever, help with upgrading handbook-formulations and such... How can I help forums.gentoo.org or other gentoo-related site?

Johnny
_________________
I used to be undecided, but, uhm... now I don't really know anymore
Back to top
View user's profile Send private message
Mike Hunt
Watchman
Watchman


Joined: 19 Jul 2009
Posts: 5287

PostPosted: Mon Mar 22, 2010 4:20 pm    Post subject: Reply with quote

First get your box running perfectly, then feel your way around for a while, to see where you feel suited to contribute something.
Some feel better suited do do some documentation work, others prefer helping out at bugzilla, others as arch testers and developers, and some helping users get their systems installed and working perfectly here, and there are more things that can be done.
Back to top
View user's profile Send private message
dE_logics
Advocate
Advocate


Joined: 02 Jan 2009
Posts: 2253
Location: $TERM

PostPosted: Tue Mar 23, 2010 5:26 am    Post subject: Reply with quote

Are you sure your HDD is ok?

Boot from a feature rich Live CD like rescueCD and -

smartctl -a <your harddrive device>

If you have Ubuntu live CD (9.04 or above), you can do it the GUI way.
_________________
My blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum