# [SOLVED] Missing partitions in /dev, et al

## statikregimen

Howdy,

I have just installed Gentoo to an MSI GT72S-G220 gaming laptop. I've noticed a series of issues that may or may not be related. 

The kernel was built using a Pappy Preconfig, then hardware detected using sys-kernel/kergen. I then went over it following the AMD64 Handbook (and generally looked over it) to ensure I had at least all the basics. This is essentially the procedure I used for the first laptop I set up which seems to have worked out quite well. I pretty much configured the rest of the system per the handbook.

First, I noticed that when doing my first emerge @world, I was somehow missing /lib/gentoo/functions.sh (the entire directory was actually missing).... I am using a Sabayon XFCE live USB to install actual Gentoo, and was able to copy the directory from there and proceed. Now I wonder if that wasn't a symptom of something else. And worse, if it exacerbated that underlying condition...............

Later, I noticed that unlike the other aforementioned laptop, my wifi modules are not auto-auto-loading and when I manually modprobe them, I get wlan0 instead of the more modern wlp0s1 style (or however it goes). I can't work out how/why the other laptop loads them automatically.

Soon after, I noticed that while drives are listed in /dev (e.g. /dev/sda exists and is associated with the disk I would expect), there are no entries for the 2 partitions (i.e. /dev/sda1 and sda2 are missing). When I attach a USB drive, again it gives me a /dev/sdb but no partitions. My mSATA drives and software raid is OK - all partitions and devices accounted for.

However, fdisk -l /dev/sda:

```

Device     Boot  Start        End    Sectors   Size Id Type

/dev/sda1  *      2048     206847     204800   100M  7 HPFS/NTFS/exFAT

/dev/sda2       206848 1953523119 1953316272 931.4G  7 HPFS/NTFS/exFAT

```

The partitions also show up just fine in other distributions' /devsda1 and sda2 as normal. And again: attaching a USB drive also results in a /dev/sdb but no partitions (except in fdisk, parted, etc).

Lastly, this is less likely to be related, but maybe: I'm trying to install Xorg and when it tries to build x11-proto/xproto-7.0.31 it fails with 

```
error: cannot run C compiled programs
```

So I'm thinking either my Stage3 did not unpack fully/correctly (although I did not observe any errors; the md5sums matched when I downloaded the tarball), and/or I"m missing some critical items in kernel config and/or somehow I've messed up udev (even though to my recollection, I have not deviated from default configs on either computer I've set up recently).

Here is my kernel config

lspci -nnk

I am not sure what else you might need.

Thank you in advance!Last edited by statikregimen on Mon Aug 21, 2017 8:49 pm; edited 4 times in total

----------

## Jaglover

```
# CONFIG_MSDOS_PARTITION is not set
```

This is one of your problems.

----------

## statikregimen

Brilliant. Thank you.

The partitions are listed now, so one problem is solved....

----------

## Jaglover

From this point your emerge --info would be useful.

----------

## statikregimen

 *Jaglover wrote:*   

> From this point your emerge --info would be useful.

 

emerge --info

Thank you so much!

----------

## Jaglover

Have you done emerge -e @system after install?

----------

## statikregimen

 *Jaglover wrote:*   

> Have you done emerge -e @system after install?

 

I did not...However, I don't recall having to do that on the last machine?

Anyway, I just ran it, and it started doing 342 things, and failed on sys-apps/baselayout-2.3

```
die "non-empty dir found where we needed a symlink: ${prefix}lib"
```

Here's the full log fwiw...

and also emerge --info '=sys-apps/baselayout-2.3::gentoo'

So it seems something is fundamentally wrong with this install but I can't imagine what I did wrong  :Sad: Last edited by statikregimen on Mon Aug 21, 2017 5:57 pm; edited 1 time in total

----------

## fedeliallalinea

You can post output of ls -l /

----------

## statikregimen

 *fedeliallalinea wrote:*   

> You can post output of ls -l /

 

```

total 80

drwxr-xr-x   2 root root  4096 Aug 21 13:42 bin

drwxr-xr-x   4 root root  4096 Dec 31  1969 boot

drwxr-xr-x  16 root root  6640 Aug 21 12:56 dev

drwxr-xr-x  54 root root  4096 Aug 21 13:42 etc

drwxr-xr-x   2 root root  4096 Aug 10 17:06 home

drwxr-xr-x   4 root root  4096 Aug 20 16:31 install-stuffs

drwxr-xr-x   6 root root  4096 Aug 21 13:41 lib

drwxr-xr-x   2 root root  4096 Aug 17 14:56 lib32

drwxr-xr-x  12 root root  4096 Aug 21 13:42 lib64

drwx------   2 root root 16384 Aug 17 10:19 lost+found

drwxr-xr-x   2 root root  4096 Aug 10 17:06 media

drwxr-xr-x   2 root root  4096 Aug 10 17:06 mnt

drwxr-xr-x   2 root root  4096 Aug 10 17:06 opt

dr-xr-xr-x 150 root root     0 Aug 21 12:55 proc

drwx------   5 root root  4096 Aug 21 12:11 root

drwxr-xr-x  10 root root   400 Aug 21 12:59 run

drwxr-xr-x   2 root root  4096 Aug 21 13:41 sbin

dr-xr-xr-x  12 root root     0 Aug 21 12:55 sys

drwxrwxrwt   4 root root  4096 Aug 21 13:42 tmp

drwxr-xr-x  13 root root  4096 Aug 17 13:49 usr

drwxr-xr-x   9 root root  4096 Aug 10 17:06 var
```

----------

## fedeliallalinea

You can also post also 

```
# ls -l /lib*
```

normally lib directory is a symlink to lib64

----------

## statikregimen

 *fedeliallalinea wrote:*   

> You can also post also 
> 
> ```
> # ls -l /lib*
> ```
> ...

 

It's a bit long so I've placed the output here: http://bitblizzard.com/forum_requests/ls2.txt

Thanks!

----------

## fedeliallalinea

Try with

```
# cd /

# mv lib lib.bck

# ln -s lib64 lib
```

mv line is for backup current lib directory, although I don't know where it came from.

----------

## Jaglover

Probably from Sabayon as mentioned in OP.

----------

## statikregimen

 *fedeliallalinea wrote:*   

> Try with
> 
> ```
> # cd /
> 
> ...

 

This looks very promising. running emerge -e @system as prescribed above and it's definitely gotten a lot further this time.

 *Jaglover wrote:*   

> Probably from Sabayon as mentioned in OP.

 

I can't imagine how I would have done that, but it's not impossible. I only used the Sabayon USB drive to boot the system and connect to the internet. I followed the handbook 1:1 thence forth (except I had to emerge temporarily into Sabayon app-portage/cpuid2cpuflags and app-portage/mirrorselect, but I checked the mirrors to be sure they were proper gentoo mirrors).

EDIT: Yea, it's really bugging me now...wtf did I do lol! Booze was likely involved....Anyway, so far so good on this emerge...almost done!

----------

## statikregimen

Ok, so here's where we're at:

After creating the proper symlink for /lib,

- emerge -e @syetem completed successfully

- my installation of Xorg has now completed (xproto, as I mentioned was originally failing, now compiles). Nvidia drivers have failed to compile, however, this may be due to the fact that I am using a hardened kernel - someone mentioned in another thread that it may be incompatible. That's perfectly fine - pretty sure I can figure out what to do from here (or is a topic for another thread).

After rebooting, I notice now I am getting the enp5s0 style of devices listed by ifconfig, so now that is working as expected. And I think it was the last issue of my OP!    :Very Happy: 

I can't thank you guys enough! <3

EDIT: Oh, the other issue in the OP was wifi modules not auto-auto-loading. This was also resolved, but only after I re-emerged linux-firmware and copied the modules folder from the backup of the phantom lib directory. 

I still have no clue what caused this.... Most likely a user failure but we may never know  :Sad:   :Embarassed: Last edited by statikregimen on Tue Aug 22, 2017 3:37 pm; edited 1 time in total

----------

## fedeliallalinea

 *statikregimen wrote:*   

> Nvidia drivers have failed to compile, however, this may be due to the fact that I am using a hardened kernel - someone mentioned in another thread that it may be incompatible.

 

See here

----------

## statikregimen

 *fedeliallalinea wrote:*   

>  *statikregimen wrote:*   Nvidia drivers have failed to compile, however, this may be due to the fact that I am using a hardened kernel - someone mentioned in another thread that it may be incompatible. 
> 
> See here

 

Awesome, thanks! I got up and running with Nouveau but that is bookmarked for when I get ready to start installing games  :Very Happy: 

----------

## fedeliallalinea

When all work on your system you can delete lib.bck directory

----------

