Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Sol.] mounting /dev/sda4 on /newroot failed: No such device
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Mon Sep 02, 2019 9:02 pm    Post subject: Reply with quote

Sumun wrote:
Jaglover wrote:
You don't need to reinstall Gentoo to try a different kernel. A custom kernel without initramfs is easier to troubleshoot, IMHO. Remember, there are three things which must be compiled in as <*>, not as module <M>.
First, the HDD controller, it is nowadays AHCI for most PC's, but there are some M.2 devices which use NVME instead. You may try and turn NVME on in your genkernel for testing.
Second, the partition table, it would be GPT or MBR.
Third, root filesystem support, it is F2FS for you.

Tomorrow I am going to try turning on NVME in genkernel, and if that doesn't work, I will compile a custom kernel as you suggested.
I'll report back.



you don't have nvme. it's marketing scheme. your m2 is a a sata drive, detected by kernel as sata. you dont need nvme. or maybe you do... what do I know.
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Mon Sep 02, 2019 9:04 pm    Post subject: Reply with quote

axl wrote:
wait. wait. not a valid root device is another beast. wait.


now you just got an init problem. and my guess you just need to add to kernel command (that grub.conf or edit at boot)


init=/usr/lib/systemd/systemd or init=/lib/systemd/systemd depending on useflags. if you have useflag USE="systemd"

just check which file exists. if /usr/lib/systemd/systemd exists, use that as init. if the other one... well it's obvious.

now. what that error means is that it did mount the root partition but can't start init. which should be either /init or /sbin/init. if you're an openrc guy you should be covered, but if you're on systemd side, this is what you're missing. also to be added in /etc/default/grub at CMDLINE or smth. you'll know when you edit the file. there's also more fancy ways to do it, but let's just start here. and don't give up :)

I'm an openrc guy, I have even set the useflag USE="-systemd" ;)
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Mon Sep 02, 2019 9:07 pm    Post subject: Reply with quote

axl may be right about that new error message. My problem here is my kernels always boot so I'm not familiar with all different errors one might get.
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Mon Sep 02, 2019 9:08 pm    Post subject: Reply with quote

Sumun wrote:
I'm an openrc guy, I have even set the useflag USE="-systemd" ;)


well that's odd, because that particular error not valid root usually means it can't find /sbin/init. if you are an openrc guy you should have a /sbin/init. do you have one?
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Mon Sep 02, 2019 9:15 pm    Post subject: Reply with quote

it should work at least to use init=/bin/bash and try to figure things forward from there, although I can't really figure out this new linuxrc (the generic one from genkernel... the one included in your initramfs file). I was sure I got it. If switch_root can fail it must be because of bad init. at least bash is not bad. these init stuff, it's best tried out as jaglover suggested, boot, edit, add to the linux line ... init bla bla. just to make sure. sorry. don't want to be pedantic.
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7653
Location: Saint Amant, Acadiana

PostPosted: Mon Sep 02, 2019 9:21 pm    Post subject: Reply with quote

I got curious and tried to boot my laptop with incorrect PARTUUID to see the error, it ended up with kernel panic. Since in this case here kernel is not panicking it may well be there is something wrong with that root partition. Just guessing again ...
_________________
Please learn how to denote units correctly!
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Mon Sep 02, 2019 9:23 pm    Post subject: Reply with quote

axl wrote:
Sumun wrote:
I'm an openrc guy, I have even set the useflag USE="-systemd" ;)


well that's odd, because that particular error not valid root usually means it can't find /sbin/init. if you are an openrc guy you should have a /sbin/init. do you have one?

Yes, I have one.

Okay, gonna try init=/bin/bash tomorrow.
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 8:14 am    Post subject: Reply with quote

axl wrote:
it should work at least to use init=/bin/bash and try to figure things forward from there, although I can't really figure out this new linuxrc (the generic one from genkernel... the one included in your initramfs file). I was sure I got it. If switch_root can fail it must be because of bad init. at least bash is not bad. these init stuff, it's best tried out as jaglover suggested, boot, edit, add to the linux line ... init bla bla. just to make sure. sorry. don't want to be pedantic.

When I add init=/bin/bash to the grub.cfg it doesn't change anything.
Also, I have switched on NVMe support in the genkernel menuconfig (though I am not sure whether I did it correctly) and it didn't change anything.
So I guess my only hope left is manually compiling a custom kernel without initramfs.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 9:34 am    Post subject: Reply with quote

http://dpaste.com/0M413F4

Here, try with this config. I took the config you posted somewhere above and menuconfiged it in my own linux-4.19.66 and made sure everything is included in kernel. I had to add sata and kernel automounter 4. f2fs was already included according to the config. Anyway, if you want to try this... do genkernel --config=whereyouputthisconfigfile kernel and remove initramfs file from grub.conf and try to boot. Good luck.
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 10:32 am    Post subject: Reply with quote

axl wrote:
http://dpaste.com/0M413F4

Here, try with this config. I took the config you posted somewhere above and menuconfiged it in my own linux-4.19.66 and made sure everything is included in kernel. I had to add sata and kernel automounter 4. f2fs was already included according to the config. Anyway, if you want to try this... do genkernel --config=whereyouputthisconfigfile kernel and remove initramfs file from grub.conf and try to boot. Good luck.

I get a bunch of errors when trying to pass the config file to the genkernel:
https://pasteboard.co/IvGml1E.jpg
Probably this has something to do with how the text is formatted.
How do I get rid of all the '/r'?
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 10:40 am    Post subject: Reply with quote

wget https://dale.ro/~axl/sumun.config


here. try it this way.
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 10:54 am    Post subject: Reply with quote

axl wrote:
wget https://dale.ro/~axl/sumun.config


here. try it this way.

Ok, no more '/r' complains, but it still shows the last two lines about the /defaults/software.sh.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 10:56 am    Post subject: Reply with quote

uhm... what version of genkernel you are using? emerge -pv genkernel ?
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 11:02 am    Post subject: Reply with quote

axl wrote:
uhm... what version of genkernel you are using? emerge -pv genkernel ?

3.5.3.3
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 11:05 am    Post subject: Reply with quote

or you could do it the old fashioned way.

go in kernel directory

cd /usr/src/linux
make mrproper
cp myconfigfromwhereitis .config
make oldconfig
make -j ${Ncores} bzImage modules
make modules_install
cp arch/x86_64/boot/bzImage /boot/kernel-whateveritis

#### Replace ${Ncores} with the number of cpu cores you have.

I think that's about it. perhaps if you use a proprietary video module, emerge that too afterwards but this is about it, I think.

PS meanwhile I'll try that version of genkernel and try to figure out why that error. I suspect something wrong in /etc/genkernel.conf. perhaps some quotes or smth.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 11:11 am    Post subject: Reply with quote

Yeah. regarding genkernel error, i suspect there's a quote missing in /etc/genkernel.conf

be very careful when editing to respect the syntax. if you can't figure out where is the error, you can delete the file and reinstall the package again to get back the stock config.

source ${GK_SHARE}/defaults/software.sh || small_die "Could not read ${GK_SHARE}/defaults/software.sh"

this is the line that is creating the error. for some reason genkernel doesn't have ${GK_SHARE} initialized. could be the error telling you genkernel.conf is corrupt was way above what you posted.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 11:14 am    Post subject: Reply with quote

or you know... https://dale.ro/~axl/genkernel.conf

since we started this way, might as well go all the way :))
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 11:54 am    Post subject: Reply with quote

axl wrote:
or you could do it the old fashioned way.

go in kernel directory

cd /usr/src/linux
make mrproper
cp myconfigfromwhereitis .config
make oldconfig
make -j ${Ncores} bzImage modules
make modules_install
cp arch/x86_64/boot/bzImage /boot/kernel-whateveritis

#### Replace ${Ncores} with the number of cpu cores you have.

I think that's about it. perhaps if you use a proprietary video module, emerge that too afterwards but this is about it, I think.

PS meanwhile I'll try that version of genkernel and try to figure out why that error. I suspect something wrong in /etc/genkernel.conf. perhaps some quotes or smth.

Tried this and ended up with kernel panic :/
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 11:56 am    Post subject: Reply with quote

OK. what did you use as command line? What error? Could you post a pic of the screen?
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 12:05 pm    Post subject: Reply with quote

axl wrote:
OK. what did you use as command line? What error? Could you post a pic of the screen?

I did not change the kernel command line if you mean that.
https://pasteboard.co/IvGYMom.jpg
https://pasteboard.co/IvGZftP.jpg
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 12:08 pm    Post subject: Reply with quote

please try with /dev/sda4 instead of partuuid.
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 12:10 pm    Post subject: Reply with quote

maybe also add "rootwait" to the whole kernel line (without quotes) although the first screenshot indicated at least one sata was detected.
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 12:14 pm    Post subject: Reply with quote

axl wrote:
please try with /dev/sda4 instead of partuuid.

Still a kernel panic, but it looks different:
https://pasteboard.co/IvH2ueP.jpg
https://pasteboard.co/IvH2LFV.jpg
Back to top
View user's profile Send private message
Sumun
n00b
n00b


Joined: 02 Sep 2019
Posts: 25

PostPosted: Tue Sep 03, 2019 12:19 pm    Post subject: Reply with quote

axl wrote:
maybe also add "rootwait" to the whole kernel line (without quotes) although the first screenshot indicated at least one sata was detected.

Now it waits for device:
https://pasteboard.co/IvH4OuQ.jpg
Back to top
View user's profile Send private message
axl
Veteran
Veteran


Joined: 11 Oct 2002
Posts: 1027
Location: Romania

PostPosted: Tue Sep 03, 2019 12:25 pm    Post subject: Reply with quote

Uhm, that's my fault. I missed a few options in SCSI like scsi disk and I think a few others. I've updated the file: https://dale.ro/~axl/sumun.config if you feel like trying again.
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
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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