Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partitioning on a chromebook
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Sun Oct 16, 2016 8:16 pm    Post subject: Reply with quote

Neither the usb keyboard or built-in keyboard seem to be working at the initial shell, I've been looking up common keyboard problems but they all seem to have to do with x11. There couldn't be anything missing from the kernel, could there?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Oct 16, 2016 9:44 pm    Post subject: Reply with quote

Bladesy,

From the kernel or the initrd, if you have one.
If you don't have an initrd, you can't load any modules until root is mounted. All you USB and keyboard things need to be built into the kernel.
_________________
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
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Sun Oct 16, 2016 10:45 pm    Post subject: Reply with quote

I do have an initrd, which I'd like to use with my keyboard, but it just doesn't work.
What I did notice in the messages onscreen, was that usb was included after the "Loading modules" statement.
So this must mean that my usb drivers are modular? I can't remember doing so, but the initrd says so.
Does this mean that my usb drivers are loaded or not?
If they are loaded, why isn't my keyboard working?
There's really no other way for me to access the initrd commandline, as I'm not sure if I even could have ssh before the root is mounted.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Oct 16, 2016 11:29 pm    Post subject: Reply with quote

Bladesy,

If you have an initrd and it was made by one of the automagic tools, your modules should be loading.
That the keyboard doesn't work points to a kernel or initrd issue.

Until root is mounted, its just the kernel and the initrd. The initrd is normally a very simple root filesystem that does no more that is needed to get the real root filesystem mounted.
It does not normally contain networking support, so ssh is not normally an option.
However, an initrd is just a root filesystem in a file. It can contain anything you want.
_________________
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
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Mon Oct 17, 2016 10:53 pm    Post subject: Reply with quote

Progress has finally been made - I went into the kernel and found that there were a few chromebook specific options, so I enabled all of them, in hopes that my root would be detected.
The root wasn't detected on boot, but I actually managed to get the keyboard working - I suspect this is due to the usb 3.0 driver, since it wasn't enabled before, and those are the only ports I have. Plus, xhci_hcd comes up at boot for detecting a few hardware components.
The chrome kernel options seem to have enabled my HD camera too, which gives me hope that I could actually get this chromebook fully enabled.
It first tells me to specify another value for root, but it also offers an ash shell.
A few other interesting lines I noticed was something about write protecting the kernel, and /bin/ash not being able to access tty, due to the job being turned off.
So now there's access to the initrd - where do I go from here?
Quick edit just to clarify: the error I'm getting is "Could not find the root block device in UUID=..." and "Block device /dev/mmcblk0p3 is not a valid root device..." depending on how I refer to the partition. I get the feeling that because my arch usb can access the device, the problem is a lack of kernel support for maybe the drive's controller or something - but I'm really not sure.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Oct 18, 2016 8:47 am    Post subject: Reply with quote

Bladesy,

The keyboard and terminal should still work from the initrd. Look in /dev

Are there any block devices at all?
Code:
/bin/ash not being able to access tty, due to the job being turned off
means that devpts is not mounted, so you don't have any pseudo terminals.
That's mostly harmless.

If you can see some block devices, what are they?
You can continue and even complete the boot from the shell.
Code:
cat init
find the bit where it tried to mount root but failed and gave you a shell instead.
Type out the commands from mounting root until the end of init.
Repeat mount/umount root until you either run out of block devices or what mounts looks like a root filesystem.

I don't know the layout of your initrd, so the init script may not be in the PWD.
_________________
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
324874
Apprentice
Apprentice


Joined: 26 Jul 2014
Posts: 168

PostPosted: Tue Oct 18, 2016 8:52 am    Post subject: Reply with quote

Hello Bladesy!

This software architecture is interesting (my feeling)! I would like clarify some things.
Quote:
I hope the panic doesn't have anything to do with the ssd or its controllers, because I have no idea how to configure seabios.

Do you have replaced the system firmware (BIOS, etc.)? Could you give the disk layout? (GPT?, MBR?, partition types, fstab file)

Best regards, feng.

New edition: grammar correction.
Back to top
View user's profile Send private message
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Tue Oct 18, 2016 8:36 pm    Post subject: Reply with quote

Hi feng, I have the BIOS replaced with SeaBIOS, through the only possible method on the Lenovo N22 - using RW_LEGACY.
As for the disk I'm booting from, I was under the impression it was a 32GB SSD, but in lsblk it appears the way an SD card would - as mmcblk0.
As for all the other components, I've gathered a few files below.
Output of:
blkid http://pastebin.com/aPg3JZC0
ls /dev http://pastebin.com/DXXvynpd (Note that this is from chroot, where /dev was mounted by --rbind - which I believe just makes it a mirror of the arch usb's /dev)
fstab http://pastebin.com/9EiMiWwN
lsblk http://pastebin.com/5FTdVHKR
lspci -v http://pastebin.com/sqeJtKnk
Back to top
View user's profile Send private message
heiwa
n00b
n00b


Joined: 24 Oct 2012
Posts: 70

PostPosted: Tue Oct 18, 2016 10:31 pm    Post subject: Reply with quote

Maybe the problem is a typo: it should be "/dev/mmcblk" and not "/dev/mmcdlk".
Back to top
View user's profile Send private message
324874
Apprentice
Apprentice


Joined: 26 Jul 2014
Posts: 168

PostPosted: Wed Oct 19, 2016 9:03 am    Post subject: Reply with quote

Hello!

Bladesy, you have confused SSD and memory card. The Chromebook has a 32GB eMMC card.
Bladesy wrote:
As for the disk I'm booting from, I was under the impression it was a 32GB SSD, but in lsblk it appears the way an SD card would - as mmcblk0.

Bladesy wrote:
In the article for the T2, it's mentioned that the card is eMMC, but they also refer to using an SD card.
My current install must be on the eMMC card, but is it possible that I must have to boot from an SD card?

I suppose the SD card is used (in the wiki article) to increase storage space.

Does GRUB2 really load the kernel (yes, certainly*)? Is an eMMC card can be loaded by (Coreboot? + SeaBIOS)*?
* It's "surprising" that GRUB2 can load the kernel on the eMMC card and the kernel can't find the root filesystem.

Best regard, feng.
New edition: I made a mistake between memory card formats and I know the mistake thanks to NeddySeagoon's answer! :)


Last edited by 324874 on Wed Oct 19, 2016 11:58 am; edited 2 times in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Oct 19, 2016 10:37 am    Post subject: Reply with quote

Grub2 has to make its own arrangements for reading block storage devices. It can't use the kernel because the kernel is not in even RAM.
Once grub2 has loaded the kernel and initrd, grub2 has gone and its up to the kernel how it reads block devices for itself.
Clearly, one or more pieces of the eMMC driver that the kernel needs is/are missing.

All the drivers listed in lsci are needed.
The mmc and or sdcard block drivers are required.

The e in eMMC means embedded. Its an MMC card with a built in controller soldered to the PCB.
The big unknown is what bus is the eMMC attached to?
_________________
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
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Wed Oct 19, 2016 4:57 pm    Post subject: Reply with quote

Is there anyway I can find out what bus the eMMC is attached to?
I did find out what driver mmcblk0 was using on my arch usb - I can't remember the exact command, but it gave the output "DRIVER=sdhc-acpi".
I believe I enabled support for this in the MMC section of the kernel settings, so maybe it goes back further than this?
I also looked in the /dev directory through the initrd, and found that there was no mmcblk0 at all.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Oct 19, 2016 8:06 pm    Post subject: Reply with quote

Bladesy,

I think you mean sdhci-acpi.
The kernel option is
Code:
config MMC_SDHCI_ACPI
        tristate "SDHCI support for ACPI enumerated SDHCI controllers"
        depends on MMC_SDHCI && ACPI
        select IOSF_MBI if X86
        help
          This selects support for ACPI enumerated SDHCI controllers,
          identified by ACPI Compatibility ID PNP0D40 or specific
          ACPI Hardware IDs.

          If you have a controller with this interface, say Y or M here.

          If unsure, say N.


That's from /usr/src/linux/drivers/mmc/host/Kconfig

I don't trust the auto module loading much in this area of the kernel, so if this option is anything other than =y
Try changing it and rebuilding the kernel.
_________________
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
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Wed Oct 19, 2016 11:00 pm    Post subject: Reply with quote

I have that setting on already, is there anything that it maybe depends on that I'm not fulfilling?
Back to top
View user's profile Send private message
heiwa
n00b
n00b


Joined: 24 Oct 2012
Posts: 70

PostPosted: Wed Oct 19, 2016 11:17 pm    Post subject: Reply with quote

To repeat: Have you checked whether your kernel command line has the typo
"/dev/mmcdlk0p3" (instead of "/dev/mmcblk0p3")?
Back to top
View user's profile Send private message
324874
Apprentice
Apprentice


Joined: 26 Jul 2014
Posts: 168

PostPosted: Thu Oct 20, 2016 7:21 am    Post subject: Reply with quote

Hello Bladesy!

The second and fourth paragraph of the Hardware section suggests a way to configure hardware.
(See the chapter seven from "Linux Kernel in a Nutshell" - Greg Kroah-Hartman).

The Linux (the kernel) configuration requires a level of technical expertise. :( / 8)
Free operating systems require also technical knowledges because devices may be misconfigured. :roll: / :idea: / :arrow:
As it is said you get to keep the pieces. :? / :wink: | -- (1, 2) |


Best regards, feng.
Back to top
View user's profile Send private message
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Fri Oct 21, 2016 8:15 pm    Post subject: Reply with quote

I really have no idea what to do next - it seems like whatever fix I make to the kernel just doesn't work.
Aside from the internal memory, there's also the fact that the keyboard and trackpad don't work either.
I thought that maybe genkernel would've fulfilled all of the requirements, but it just blackscreens on me when I try that.
Is there any way I can compile a kernel with support for absolutely everything? Not in modules either, but built in too?
I really do appreciate all the help - I've been reading through feng's wiki links and I definitely have checked for typos in my grub configuration files - but a lot of the time I haven't been posting because I was playing around with kernel settings and trying to dig up information on the chromebook or the memory itself.
Quick edit: Should I maybe try installing different distribution if there's no way to make an all-encompassing kernel? I think that more popular distribution could support more hardware out of the box, as they mightn't promote custom kernels as much. Just an idea though - I wouldn't know which distribution would be best suited for this.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Oct 21, 2016 8:44 pm    Post subject: Reply with quote

Bladesy,

Well, grub loads a kernel and initrd. That's about all its supposed to do.
Oh, it passes the kernel command line too. We know that's OKish, since the kernel complains about can't find/mount root.

You have had a kernel that works, since you were able to install Gentoo.
Use the .config from that kernel. In fact, use that kernel, initrd and its modules.

The kernel and initrd are easy. They are just files in boot.
Modules are a bit harder. You need to copy the working kernels /lib/modules/<kernel-ver> to the same place on your root filesystem.

If you only want to see if root mounts, you don't need the modules, they can't be read until root is mounted anyway.

There are several make targets that set the kernel up in various ways.
Code:
make help
at the top of the kernel tree will tell what you want to know.
_________________
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
324874
Apprentice
Apprentice


Joined: 26 Jul 2014
Posts: 168

PostPosted: Sat Oct 22, 2016 8:34 am    Post subject: Reply with quote

Bladesy, I don't know what happens after modifications on the firmware.

However, I think SeaBIOS is used as a Compatibility Support Module (CSM) for UEFI (cf. Wikipedia).
Indeed, there was an ESP (EFI System Partition) before you wipe some partitions on the eMMC card.

You should search in this direction too, because, the firmware is used during the boot process.
How to enter in UEFI setup menu? How to enter in the SeaBIOS menu? Is the CSM enabled?

Best regards, feng.
Back to top
View user's profile Send private message
Bladesy
Tux's lil' helper
Tux's lil' helper


Joined: 04 Apr 2015
Posts: 113

PostPosted: Sun Oct 23, 2016 4:00 pm    Post subject: Reply with quote

I'm not sure whether this would be marked as solved, but I do have a fair idea why I wasn't getting root to mount, and I also have a working linux system on my chromebook after all the partitioning I did to the eMMC memory.
After my last kernel fixes, I did some searching on make as Neddy suggested, and found exactly what I seemed to be looking for - the yesallconfig option. It took ages to compile, and I was hoping that it wouldn't black screen on me like genkernel did (I thought that genkernel's modular settings were perhaps causing problems) but it was unfortunately the case.
I was reluctant about trying another distribution to see how it would fare after arch linux refused to chroot the last time I tried on the chromebook, but this time I got it all set up in about 10 minutes. The reason I chose arch was purely because the usb I use for installing stage3 systems is arch, and it was successfully detecting the eMMC memory. I was expecting an error about not being able to find root when I first booted in, and I wasn't let down.
However, I did notice that it was detecting and mounting the swap partition - displayed as /dev/mmcblk0p2. This got me curious, so I used the "emergency mode" (which I suppose must be comparable to the initrd I was using on gentoo) to take a look at the fstab file that arch generated. I found that the swap was the only partition not using UUID, so I simply changed the others to use file notation and booted into a fully working environment.
Very early on in the trouble shooting process I tried this fix on gentoo, but I imagine at the time I didn't have all the chromebook and eMMC kernel settings enabled, and I must've forgot to try it again with all those fixes enabled. Either that, or the gentoo kernel isn't the best for chromebooks unfortunately - although, this probably could just be fixed by simply using a different kernel source. The latter could very well be true, especially since none of the chromebook keyboard kernel options seemed to work, yet the keyboard worked flawlessly on arch (despite not even the arch usb not supporting the keyboard), which surprised me.
If there's nothing anyone else is hung up on in this thread, the summary would be to partition normally but use a different kernel if you have a chromebook. It might also be worth noting that seabios is very restrictive when trouble shooting - the grub boot menu didn't seem to work at all, and I couldn't find any options at all aside from the enumerated boot list.
Thanks for all the suggestions in the thread - I can't imagine I'll be using arch for too long before I attempt to install gentoo again, maybe after noting what the kernel seems to be using.
Quick edit about EFI: I'm not sure if I said this already in the thread, but I couldn't get EFI booting in seabios working at all - I'm not even sure if it supports it. I say this as chromeos seemed to be booting by EFI, yet when I first installed seabios, it refused to boot - and when I first booted my arch usb, it went straight into bios booting despite being formatted for EFI booting. I was sure seabios supported bios booting after this, so I never tried EFI (which I normally use on everything else), which I saw fail to boot. Again, this is just my anecdotal evidence, there could be a way to get it all configured, but I've honestly no idea how.
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
Page 2 of 2

 
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