Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED It works, but "ls" says all folders are under "/boot"
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
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Tue May 27, 2014 2:15 am    Post subject: SOLVED It works, but "ls" says all folders are und Reply with quote

Please help,

I believe the following problem was caused by doing both:

Code:
mount /dev/sda2 /mnt/gentoo/

and:
Code:
mount /dev/sda2 /mnt/gentoo/boot


before doing the stage 3 tarball install to a drive that has only 2 partitions:

Code:
Device    Boot     Start       End   Blocks  Id System
/dev/sda1           2048   2099199  1048576  82 Linux swap / Solaris
/dev/sda2        2099200  33554431 15727616  83 Linux


After going through everything without any problems (there was only a little warning message about /dev/sda2 already being mounted), and rebooting a few or so times and syncing-up the install (I only did the basic 'Desktop'--profile3; nothing GUI), I started to add a few other things, then when checking on the existence of some files with "ls" it displayed this ridiculous data about the whole filesystem appearing in 2 places; I have what we'd expect at the root (i.e., "/"):

Code:
bin   dev  home  lib32  lost+found  mnt  proc  run   sys  usr
boot  etc  lib   lib64  media       opt  root  sbin  tmp  var


But when I tried to find out what was inside my /boot folder, I got/get EXACTLY what you see above! Everything repeated under "/boot/". And where are my boot files; well here's where the system thinks they are:

Code:
gentoo / # ls -la /boot/boot
total 9008
drwxr-xr-x  3 root root    4096 May 24 23:18 .
drwxr-xr-x 21 root root    4096 May 25 00:21 ..
drwxr-xr-x  2 root root    4096 May 25 09:05 grub
-rw-r--r--  1 root root 3499368 May 24 21:44 initramfs-genkernel-x86_64-3.12.20-gentoo
-rw-r--r--  1 root root       0 May 21 18:50 .keep
-rw-r--r--  1 root root 3602640 May 24 21:25 kernel-genkernel-x86_64-3.12.20-gentoo
-rw-r--r--  1 root root 2103299 May 24 21:25 System.map-genkernel-x86_64-3.12.20-gentoo


My first reaction to this has ended up wasting the rest of my whole 3-day weekend (apart from deciding to set up Gentoo in the first place!). I thought: 'Hmm... it appears that something in my setup... (remember I went through "emerge --sync" multiple times and installed everything I could for this profile... plus "mc" and "hexedit")... so something must have duplicated all my files under the "/boot" folder, right? To verify that, to be sure, I ran an md5sum on all the files in "/bin" and in "/boot/bin" -- they were exactly the same -- the next step should have been to BACK UP FILES, but I was trusting what I was seeing on the screen!

So I started to delete the bin folder shown under the /boot folder (/boot/bin)! WRONG THING TO DO!!! When I looked again, I couldn't believe it: There were no files at all in the "/bin" folder! Rebooting of course meant I could no longer boot up since doing so eventually depends upon something in "/bin"!!! (Surprisingly for some of you, it got all the way to the login PROMPT, but without a hostname, and wouldn't do anything after that.)

AFTER using the minimal CD to copy the required files from its "/bin" folder (I had an md5sum of them, so I could see most of the files were exactly the same and did "ln -s" where needed), I'm finally back to where I was before! SO WHAT SETTING WITHIN Gentoo is causing this odd behavior??? It boots-up just fine, installs programs, runs them, but ls shows a weird file structure for anything supposed to be right under "/boot"!

Let me know any config files you want to see--I'll try searching on my own too.


Thank you... I'm sure many of you know exactly how to fix this (but no, I'm not going all through the install again!),
TheStarman.


Last edited by thestarman on Tue Jun 17, 2014 11:26 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13830

PostPosted: Tue May 27, 2014 2:41 am    Post subject: Reply with quote

Nothing in Gentoo causes this behavior. According to what you posted, you mounted the same filesystem in two places, so any files in that filesystem appear in both places. If the double mount is recurring after a reboot, then you likely configured /etc/fstab to do this. You mentioned some warnings were shown. Generally, when you get a warning, you should resolve the issue unless you know the warning is bogus.
Back to top
View user's profile Send private message
wraeth
Developer
Developer


Joined: 08 May 2007
Posts: 71
Location: Australia

PostPosted: Tue May 27, 2014 3:02 am    Post subject: Re: It works, but "ls" says all folders are under Reply with quote

As per what Hu said above, your issue would likely be that you've mounted the filesystem twice.
thestarman wrote:
...install to a drive that has only 2 partitions:

Code:
Device    Boot     Start       End   Blocks  Id System
/dev/sda1           2048   2099199  1048576  82 Linux swap / Solaris
/dev/sda2        2099200  33554431 15727616  83 Linux

In your configuration (one swap partition and one for everything else) you do not need to mount anything at /boot - it's all contained on the root filesystem. Your /etc/fstab should probably look something like this:
Code:
# /etc/fstab: static file system information.

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
/dev/sda2               /               ext#            noatime         0 1
/dev/sda1               none            swap            sw              0 0

Note that you would obviously need to update "ext#" to the appropriate filesystem, and add any other static filesystems you have mounted (like a permanent shared media directory).
Back to top
View user's profile Send private message
thestarman
n00b
n00b


Joined: 27 May 2014
Posts: 14
Location: Los Angeles

PostPosted: Tue May 27, 2014 5:50 am    Post subject: Re: It works, but "ls" says all folders are under Reply with quote

wraeth wrote:
As per what Hu said above, your issue would likely be that you've mounted the filesystem twice.
thestarman wrote:
...install to a drive that has only 2 partitions:

Code:
Device    Boot     Start       End   Blocks  Id System
/dev/sda1           2048   2099199  1048576  82 Linux swap / Solaris
/dev/sda2        2099200  33554431 15727616  83 Linux

In your configuration (one swap partition and one for everything else) you do not need to mount anything at /boot - it's all contained on the root filesystem. Your /etc/fstab should probably look something like this:
Code:
# /etc/fstab: static file system information.

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pass>
/dev/sda2               /               ext#            noatime         0 1
/dev/sda1               none            swap            sw              0 0

Note that you would obviously need to update "ext#" to the appropriate filesystem, and add any other static filesystems you have mounted (like a permanent shared media directory).


Thank you "wraeth"; that's exactly what the fix was! It's been way too long since I've worked with fstab, and I blindly followed what was on the install page (where they used a separate /boot partition). I should have done everything like they showed it, instead of starting to follow this guy's 5 part videos on youtube!
Once again, problem solved: I had too many lines in the fstab file! Thank you, TheStarman.
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