Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No boot for me
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
Atra
n00b
n00b


Joined: 12 Oct 2015
Posts: 4

PostPosted: Mon Oct 12, 2015 7:33 pm    Post subject: No boot for me Reply with quote

Hello

I recently bought a netbook (thinnkpad x220t) and decided to install gentoo on it, the thing is I can't boot on it and nothing works
I obviously tried another distro to see if the issue was hardware but nope, my quick debian install worked and booted perfectly.

So here is what I tried, since it has the option to boot with BIOS or UEFI I tried both (and did a lot of them, with the first few ones I tinkered with the kernel and things and then just use genkernel):

BIOS:
Booted my minimal install usb, followed the handbook to the letter, compiled the kernel with genkernel and tried both Grub2 and LILO. Neither did work but it seems to be "seen" by the BIOS because when it failed to boot it gives me the choice to boot on different devices connected and gentoo does appear here (but doesn't load) https://u.teknik.io/Vba9mO.jpg

UEFI:
Now for UEFI I couldn't boot my minimal install usb (I tried different technique to make a bootable usb but none worked under uefi, that's the first thing) So I installed the base system under BIOS following the handbook again stopped before the installation of the booloader.
Then booted a SystemRescueCD usb that directly launched the gentoo that was installed on the hard drive, and finally installed the bootloader from there (I didn't forget to mount the partitions that wasn't mounted, I think) and again tried Grub2, LILO and efibootmgr alone.
And it finally booted or try since it ended in a kernel panic https://u.teknik.io/r6lVQJ.jpg

And that's as far as I went, maybe some other x220 users had the same issues ? I really need some help, thanks for reading me.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Mon Oct 12, 2015 8:02 pm    Post subject: Reply with quote

Welcome to Gentoo.

Your kernel panic looks very straight forward. In the kernel command line you need a line that reads "root=/dev/sdaX" where X is the partition number for your / partition. Don't worry, this is probably the most common mistake new users make.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Atra
n00b
n00b


Joined: 12 Oct 2015
Posts: 4

PostPosted: Mon Oct 12, 2015 8:25 pm    Post subject: Reply with quote

Thanks for the quick reply, but I don't understand what the kernel command line is ?
Should I add "root=/dev/sdaX" as parameter when compiling the kernel, or configuring the bootloader ?
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Mon Oct 12, 2015 8:38 pm    Post subject: Reply with quote

The kernel command line is where you pass information to the kernel for booting. This is done by the bootloader in most cases. Most boot loaders will allow you to edit this "on the fly."

Where you put it depends on how you are trying to boot. I think grub is supposed to auto detect it, lilo puts it in /etc/lilo.conf and for efibootmgr you have to build it directly into the kernel using the built in command line option.

The kernel command line is basically how you can modify the boot behavior of the OS, for example if you pass nox then most systems will recognize that to mean it shouldn't start the X server and so on. This can be used to create a rescue option in case you hose something.

Instructions should be in the handbook under the bootloader section.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Oct 12, 2015 8:39 pm    Post subject: Reply with quote

https://wiki.gentoo.org/wiki/GRUB2

you need to figure out where your root partition is.
sdaX is a synonym for the active partition (please look up linux naming of the harddiscs / partititons)
for example:
sda1 .. means first harddisc, 1 partiton
sdb3 .. means second harddisc, third partioin and such ...

you add the root=/dev/sdaX (where sdax is your root partition, see above) to the kernel line in grub.

e.g. My boot configuration

in the line
linux /4.2.3-gentoo_hotel_2015-10-09 real_root=/dev/mapper/root

starting with linux you have to add the root line. root equals real_root (root is the old naming of the new real_root boot parameter)
in my case because i have a special setup my root is /dev/mapper/root (that is different on every installation ...)




Code:

menuentry 'Gentoo alternative' {
   load_video
   if [ "x$grub_platform" = xefi ]; then
      set gfxpayload=keep
   fi
   insmod gzio
   insmod part_gpt
   insmod fat
        insmod ext2
   set root='hd0,gpt2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt2 --hint-efi=hd0,gpt2 --hint-baremetal=ahci0,gpt2  C14C-BF14
   else
     search --no-floppy --fs-uuid --set=root C14C-BF14
   fi
   echo   'Loading Linux x86_64-4.2.3-gentoo ...   linux   /kernel-genkernel-x86_64-4.2.3-gentoo '
    echo 'testing parameter acpi_osi=!Windows 2012'
        linux /4.2.3-gentoo_hotel_2015-10-09 real_root=/dev/mapper/root  (and many many more parameters in my case, removed)


   initrd   /initramfs-genkernel-x86_64-4.2.3-gentoo
}


you may check parted / sgdisk / fdisk output and see which is your root partition.

when you followed the gentoo handbook, the partition is the root parittion which is the biggest and format usually with ext4. root is the partition where you unpacked the stage3 tarball and did the other step ... root equals main partition for linux, the other partition is boot and not relevant in this case.

keywords to look up
grub2 => probably the bootlaoder you are using
naming of harddiscs in linux / partitions
Back to top
View user's profile Send private message
Irre
Guru
Guru


Joined: 09 Nov 2013
Posts: 340
Location: Stockholm

PostPosted: Tue Oct 13, 2015 7:15 am    Post subject: Reply with quote

If you have Windows a good and not destructive way to learn how to install Linux and the concept of partitioning etc -- is to first install Virtualbox on windows. Under Virtualbox it is easy to test and install different Linux distributions or FreeBSD. Each installation is represented by a map in Windows file system. I run these: Gentoo (stable), Gentoo (unstable), Gentoo-FreeBSD, Arch-linux, Ubuntu :oops: and FreeBSD this way...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Tue Oct 13, 2015 7:00 pm    Post subject: Reply with quote

Atra,

Booting requires that a number of circular dependancies be broken. The location of the root filesystem is one of these.

Its defined in /etc/fstab. However, /etc/fstab is located on the root filesystem, which can't be read until the root filesystem is mounted.
The kernel cannot mount the root filesystem to find out where the root filesytem is ... and so on.

The way around this is to tell the kernel where the root filesystem is on the command line.

If you look at the top of dmesg with
Code:
dmesg | head -n5
You will see something like
Code:
$ dmesg | head -n5
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.2.0-gentoo-r1 (root@NeddySeagoon_Static) (gcc version 4.9.3 (Gentoo 4.9.3 p1.0, pie-0.6.2) ) #1 SMP PREEMPT Tue Sep 22 21:09:01 BST 2015
[    0.000000] Command line: root=UUID=cf559dbe-81bb-45b7-bbdd-0bcdc81e066b vga=0x317 video=vesafb:mtrr:3,ywrap


I have root=UUID=cf559dbe-81bb-45b7-bbdd-0bcdc81e066b. You should have root=/dev/sdXY Where X is the drive and Y is the partition holding your root filesystem. Using UUID= requires an initrd.
_________________
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
Atra
n00b
n00b


Joined: 12 Oct 2015
Posts: 4

PostPosted: Tue Oct 13, 2015 7:50 pm    Post subject: Reply with quote

Ok thanks for your help, I think I know what kind of errors I did not counting that I read this (http://www.thinkwiki.org/wiki/Installing_Gentoo_on_a_ThinkPad_X220) too quickly.
So basically gpt and BIOS on the x220 is a no go, I did try to read the gpt partiotion table as an mbr like it's explained on the handbook but it didn't work.

I think the simplest way to go with gpt will be with UEFI, I tried and ended up with this https://u.teknik.io/UF6zsH.jpg. I'm kind of sad but I'm reinstalling the system with a bigger boot/ partition now.

I see what I will have to do, basically I need to modify the grub.cfg to add the real_root parameter and the roofstype one (since I'm using btrfs for the root partition, and I'm not forgetting to add btrfs-progs and kernel options)

I still have questions:
Why can't the minimal install cd boot under UEFI ?
How come I never had a grub menu when booting ?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Wed Oct 14, 2015 11:55 am    Post subject: Reply with quote

Well I recommend to use sysrescue-cd to install gentoo.

You can use anything to isntall gentoo when it supports the same bit architecture, 64bit for 64bit for example and your hardware. it should also ships certain commands, like chroot, mount, ls, .... and file system / hardware support.

i used to install linux mint and chroot from that.

regarding parttions you can usually shrink / grow those with gparted livecd. no need to reinstall.
i do not know which features btrfs supports. but when you use btrfs you may ask for troubles. ext4 seems to be stable and relyable. btrfs is like very experimental (thats why i do not use it at all).

I recently used the handbook to transplant an existing gentoo installation, and the gentoo handbook / wiki lacks some uefi specials. you may use other bootloaders as grub for uefi, what i have heard / read. grub2 does not work flawless with initramfs and gpt in my expierence (hardly documented what it really wants / needs)

Quote:
Why can't the minimal install cd boot under UEFI ?
How come I never had a grub menu when booting ?


*) Depends on the contents / drivers / kernel of this iso and your box. Not every iso will boot.
For example the flash firmware disc from plextor did not boot at all on uefi asus g75vw notebook. but on my old asus g70sg notebook. and thats just a firmware updater disc. uefi is highly incompatible what i saw on my "new" purchased second hand notebook. uefi has many issues, at least on the bios which asus offers for their hardware. newest installed.
with mbr based boxes i hardly had any issues in past 10-20 years at all, regarding booting.

*) grub.menu depends if you have installed correctly the grub bootloader. when the bios thing never loads the stages of the grub bootloader it will never show up. it also depends on the grub.cfg. when you set a near zero timeout it will also not show up.
depends if the bios loads correctly teh grub stages and if the /boot partititon is accessable for grub. half bios fault / half user configuration fault usually.

--

gentoo is about choice.
the handbook is just a recommendation. you are free to choose something else. grub2 is just one way to boot a box. there are other bootloaders also which should work for uefi. => gentoo wiki may be a source of informations.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Wed Oct 14, 2015 5:02 pm    Post subject: Reply with quote

Atra,

You can mix BIOS and GPT if you wish.

When you use GPT, you get a 'protective' MSDOS partition table for free too.
Even though Linux will use GPT, the BIOS will not.
Some brain dead BIOS's will check the boot flag in the partition table.
They check the flag in the 'protective' MSDOS partition table because thats all that BIOS understands.
The handbook covers setting the bootable flag on the MSDOS partition table.
_________________
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
Atra
n00b
n00b


Joined: 12 Oct 2015
Posts: 4

PostPosted: Wed Oct 14, 2015 6:22 pm    Post subject: Reply with quote

Thanks for all your answers, I managed to boot finally. I guess being frustrated and kind of desperate made me make a lot more mistakes than I thought.

S for the record I did exactly as I said, made a 200mib vfat partition for /boot/efi, btrfs for the root. compiled the kernel with genkernel --menuconfig all to add support for efi and btrfs. Then modified the grub.cfg to add rootfstype=btrfs and real_root=/dev/sda3 (in my case) and voila.

I indeed think the handbook do a poor job of explaining how the different bootloader works, what they need and the differences between UEFI and BIOS, it gets confusing.
Thanks again.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Thu Oct 15, 2015 8:22 am    Post subject: Reply with quote

Good Job and I agree on your statement, as I used up around 2-3 days with moving my box and get it to boot. Most of the time was wasted to read about grub2 / and the boot topics on the net. Poorly documented whats needed.
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