Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
eMMC support in initramfs
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
lsdaniel
n00b
n00b


Joined: 27 Feb 2016
Posts: 2

PostPosted: Sat Feb 27, 2016 10:19 pm    Post subject: eMMC support in initramfs Reply with quote

Hello there, I just joined the forum, and this question is why.
I was just wondering if there was a way to add drivers/kernel modules to genkernel-next, because when I use the generated image, when I boot it asks me for the location of my device(because it can't find it), and if i drop to a shell, I can see that there are no mmc devices(using 'ls /dev').
This is a Chromebook (Thinkpad 11e aka. GLIMMER), so installing to eMMC or an SD card are my only choices. Also, when I use dracut, and specify the drivers(mmc_block, sdhci, mmc_core, etc) with --drivers="a b c", after a few minutes it gives me the message repeatedly "dracut-initqueue[204]: Warning: dracut-initqueue timeout - starting timeout scripts" about every .5 secs. After, it drops me to a shell.
If I type 'ls /dev' it blanks the screen and I have no idea what is going on. So I either need a way to fix dracut to work or a way to include kernel drivers/modules into my initramfs.

Also it kernel panics within ~.5s if I specify no initramfs.

~Thanks in Advance~ :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Feb 27, 2016 10:26 pm    Post subject: Reply with quote

lsdaniel,

Welcome to Gentoo.

Can't you build Gentoo on a USB drive?
SD cards will be very slow.

genkernel builds a fully modular kernel. With no initrd., it has no way to mount the root filesystem.

If you run genkernel with the menuconfig option, you can fine tune the kernel options before its built.
You can also save the .config and use it as genkernels default .config for next time.
_________________
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
lsdaniel
n00b
n00b


Joined: 27 Feb 2016
Posts: 2

PostPosted: Sat Feb 27, 2016 11:33 pm    Post subject: Reply with quote

Quote:
Can't you build Gentoo on a USB drive?
SD cards will be very slow.


Yes, but I would much prefer to leave one of my two ports open for devices and the similar(also its not very convenient to have to do that, since this is a laptop), and I have an SD card slot, witch I would be using for storage/games, and a 16GB eMMC(Soldered to Motherboard of laptop) that would be for OS only. Right now I am only worried about the eMMC drive.

Quote:
genkernel builds a fully modular kernel. With no initrd., it has no way to mount the root filesystem.


I don't have a seperate /boot partition, but I doubt that is an issue, because Grub2 is able to find the initrd and kernel just fine, but can't mount /dev/mmcblkp2, probably due to the initrd missing a driver(mmc_block, mmc_core). With dracut, I can include these using --drivers="mmc_block mmc_core", and they are included. Is there a way to do this with genkernel. Just to be clear, I am using genkernel-next. It IS loading the initramfs, but is missing the kernel drivers needed to find the root partition, and prompts me to mount it.

Quote:
If you run genkernel with the menuconfig option, you can fine tune the kernel options before its built.

Again, I doubt it is a kernel issue, and an issue with the initramfs missing a driver. I'll keep trying, and let you know if I come up with anything

~Thanks in Advance~ :)
Back to top
View user's profile Send private message
szatox
Veteran
Veteran


Joined: 27 Aug 2013
Posts: 1746

PostPosted: Sun Feb 28, 2016 9:51 am    Post subject: Reply with quote

You say you included the necessary modules with a Dracut's command line option, but it doesn't work, do I get it right?
So... First thing is, when you get to the shell, make sure those modules really are there and they get loaded.
Kernel modules are typically stored under /lib/modules/$(uname -r)
You can list loaded modules with lsmod.
And you can load and unload modules with modprobe <module> and rmmod <module> commands.

Regarding genkernel, it has an option --all-ramdisk-modules, this may be handy (if it works - I had some problems with it).
You can also launch genkernel with --oldconfig --menconfig to load already present .config and then modify it with a convenient text-mode GUI-like app. Good stuff, you can use it to build drivers needed at boot into the kernel so you wouldn't need initrd anymore.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Feb 28, 2016 10:11 am    Post subject: Reply with quote

lsdaniel,

I wasn't clear. You build Gentoo on the USB device and do a binary install from USB to some internal media, so you don't need the USB device to run Gentoo. It saves a lot of space. My 2009 Netbook with an 8G SSD is operated this way. A desktop install fits into 6.5Gb.
If you want to you can use cross distcc to help with the building, so say, your desktop does all the hard work. Anyway, that's bye the by.

You appear to misunderstand the boot process. At the outset, some very simple loader built into firmware loads the first part of grub.
The first part of grub loads the rest of grub, which shows you your boot menu.

When you make your choice, grub loads the kernel and optionally, the initrd. Grub makes its own arrangements to read these files. It can't use the kernel as its whole purpose is to load the kernel.
Once the kernel and initrd are loaded, grub jumps to the kernel start address. What happens next is up to the kernel.
Grub is gone, its done its stuff. Its just the kernel and initrd in RAM and the kernel has control. If those two things between them cannot mount root, its game over.

None of the initrd builders will add kernel modules into the initrd that you did not choose in the kernel.
Its your problem to choose the right kernel modules to mount root. That grub can read your filesystem but the kernel cannot, confirms that grub has all the (grub) modules it needs but the kernel is missing (kernel) modules.
The words in brackets just emphasise that these modules are not related.
_________________
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
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sun Feb 28, 2016 4:48 pm    Post subject: Reply with quote

ISTM the OP just wants to add some built-in modules to the kernel config for genkernel.

How does one do that?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Feb 28, 2016 5:01 pm    Post subject: Reply with quote

steveL,

Pass genkernel the -menuconfig option.
_________________
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
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Mon Feb 29, 2016 10:13 am    Post subject: Reply with quote

Thanks Neddy.

Ah, I see it now (ed):
szatox wrote:
You can also launch genkernel with --oldconfig --menuconfig to load an already present .config and then modify it with a convenient text-mode GUI-like app.

Presumably that's running make nconfig?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Mon Feb 29, 2016 5:27 pm    Post subject: Reply with quote

steveL,

I've never used genkernel.
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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