Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Fresh installation kernel stuck after GRUB
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5  Next  
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Wed Jan 25, 2017 8:57 pm    Post subject: Reply with quote

Can I just use a ubuntu live cd and fix from there the gentoo boot?
Afterall installing ubuntu was working
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Wed Jan 25, 2017 10:30 pm    Post subject: Reply with quote

Recommend not getting ubuntu involved. Was part of the problem. Besides this is a nice problem for me. Still hoping for pastebins. :)
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 8:01 am    Post subject: Reply with quote

DONAHUE wrote:
Recommend not getting ubuntu involved. Was part of the problem. Besides this is a nice problem for me. Still hoping for pastebins. :)


Hi...if you intend the links from the procedure of new kernel thode are attached in a previous message.
coming back to you nice problem,
I booted the pc using rEfind and is behaving in the same way...it stuck on the usual message!
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 11:46 am    Post subject: Reply with quote

The most recent links I see:
https://paste.pound-python.org/show/eB3LN7FKZaHs5EjjDG8r
https://paste.pound-python.org/show/8oftbYzK5xVCLxBYe10h
make && make modules_install && make install did not place a kernel in the /boot directory on /dev/sdb6
however grub-install did put an EFI directory in the /boot/efi directory on /dev/sdb6
both these errors were caused by mounting errors resulting from my typos, both these errors need correction.

modified modified guide: hope the comments help your comfort (frustration) level
please be literal except for my typos :oops: If you get an error message please stop and tell me.
boot the sysresccd in UEFI mode.
Code:
mount /dev/sdb6 /mnt/gentoo
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
mount -t proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /tmp /mnt/gentoo/tmp
chroot /mnt/gentoo /bin/bash
/usr/sbin/env-update
source /etc/profile
export PS1="(chroot) $PS1"
#note that /dev/sdb2 is [b]not[/b] mounted as yet/dev/sda7              /tmp      ext4     noatime            0 1
mount /dev/sda3 /var
mount /dev/sda5 /home
#remove grub
emerge -C grub
#remove /boot/efi and all contents from /dev/sda6
rm -rf /boot/efi
#recreate /boot/efi as empty mount point
mkdir /boot/efi
#configure an efi stub kernel as before
cd /usr/src/linux;make menuconfig
#build and install efi stub kernel
make && make modules_install && make install
#verify kernel, config, and system map are present and created near present time
ls -l /boot
#verify /boot/efi is empty
ls /boot/efi
# now mount the ESP at /boot/efi and no where else
mount /dev/sdb2 /boot/efi
#verify that /dev/sdb2 is mounted at /boot/efi by looking for /boot/efi/EFI
ls /boot/efi
#install a stub kernel at the fallback location on the ESP
cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi
#verify it is present and was built near current time
ls -l /boot/efi/EFI/Boot/bootx64.efi
#redo grub
emerge -av grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg
#have i done any good? please run & post url's
ls -alR /boot | wgetpaste -t
efibootmgr -v | wgetpaste -t
exit
reboot

try rEFInd , should have stub kernel on ESP/sdb2, stub kernel on sdb6, and grub on sdb2, try both or all 3 or more or less
_________________
Defund the FCC.


Last edited by DONAHUE on Thu Jan 26, 2017 3:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 1:01 pm    Post subject: Reply with quote

DONAHUE wrote:
what boot choices were available in rEFInd?


Choosing the entry boot from EFI brings me to the grub menu and then pressing return on the kernel entries is blocking with the text "loading...."

what I have seen, when pc is going to start the kernel, Num Lock on the keyboard is blinking twice and then...well we know the outcome
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 1:06 pm    Post subject: Reply with quote

rEFInd displays only one icon? perhaps post a picture of the rEFInd screen?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 1:12 pm    Post subject: Reply with quote

DONAHUE wrote:
rEFInd displays only one icon? perhaps post a picture of the rEFInd screen?


Now I am only connected remotely...there are 3:
The first is to boot the kernel from minimum 488mb
The second is to boot EFI (\EFI\grub\grub.cfg) and this is leading to my grub menu
The third is magnifying glass icon
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 1:23 pm    Post subject: Reply with quote

Quote:
The first is to boot the kernel from minimum 488mb
Try this one. It may be the efi_stub.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 2:25 pm    Post subject: Reply with quote

DONAHUE wrote:
Quote:
The first is to boot the kernel from minimum 488mb
Try this one. It may be the efi_stub.


I have tried both of those, they always stuck on running kernel
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 2:33 pm    Post subject: Reply with quote

Same exactly? Loading kernel vmlinux-4.4.39-gentoo and freezes? Is a path specified for either?
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 2:35 pm    Post subject: Reply with quote

DONAHUE wrote:
Same exactly? Loading kernel vmlinux-4.4.39-gentoo and freezes?


Yes...
just an extra text saying "Loading with options" or similar
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 2:44 pm    Post subject: Reply with quote

if you were able to read the options, the stub kernel would have PARTUUID in it ...
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 2:48 pm    Post subject: Reply with quote

DONAHUE wrote:
if you were able to read the options, the stub kernel would have PARTUUID in it ...


I think I can't read the options used, but even if I can, that is not working anyway.

So what did we learn by now?
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 2:53 pm    Post subject: Reply with quote

ok
note that if it is the efi stub it should try to boot
if not, it should not
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 2:57 pm    Post subject: Reply with quote

DONAHUE wrote:
ok
note that if it is the efi stub it should try to boot
if not, it should not


I mean both entries led to write something about kernel is going to start and then just frozen on that screen
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3076
Location: Illinois, USA

PostPosted: Thu Jan 26, 2017 3:12 pm    Post subject: Reply with quote

When I installed refind on a new drive cloned from an old drive it found kernels on the old drive. Because they weren't UEFI kernels, they wouldn't boot.

I added this line to refind.conf
Code:
dont_scan_volumes WD400_PART1,WD400_PART2
which caused refind to stop showing the kernels from the old (WDC WD400) drive. There are many notes in refind.conf. BTW, I don't boot grub at all anymore. I boot the kernels directly. Therefore I never have to edit a grub menu. When I build a kernel using "make install" refind makes it the default kernel. To make an earlier kernel the default I just have to use "touch". This is handy because the machine is remote.
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 3:53 pm    Post subject: Reply with quote

The most recent links I see:
https://paste.pound-python.org/show/eB3LN7FKZaHs5EjjDG8r
https://paste.pound-python.org/show/8oftbYzK5xVCLxBYe10h
make && make modules_install && make install did not place a kernel in the /boot directory on /dev/sdb6
however grub-install did put an EFI directory in the /boot/efi directory on /dev/sdb6
both these errors were caused by mounting errors resulting from my typos, both these errors need correction.

modified modified guide: hope the comments help your comfort (frustration) level
please be literal except for my typos :oops: If you get an error message please stop and tell me.
boot the sysresccd in UEFI mode.
Code:
mount /dev/sdb6 /mnt/gentoo
mount --rbind /dev /mnt/gentoo/dev
mount --make-rslave /mnt/gentoo/dev
mount -t proc /proc /mnt/gentoo/proc
mount --rbind /sys /mnt/gentoo/sys
mount --make-rslave /mnt/gentoo/sys
mount --rbind /tmp /mnt/gentoo/tmp
chroot /mnt/gentoo /bin/bash
/usr/sbin/env-update
source /etc/profile
export PS1="(chroot) $PS1"
#note that /dev/sdb2 is NOT to be mounted as yet
mount /dev/sda3 /var
mount /dev/sda5 /home
#remove grub
emerge -C grub
#remove /boot/efi and all contents from /dev/sda6
rm -rf /boot/efi
#recreate /boot/efi as empty mount point
mkdir /boot/efi
#configure an efi stub kernel as before
cd /usr/src/linux;make menuconfig
#build and install efi stub kernel
make && make modules_install && make install
#verify kernel, config, and system map are present and created near present time
ls -l /boot
#verify /boot/efi is empty
ls /boot/efi
# now mount the ESP at /boot/efi and no where else
mount /dev/sdb2 /boot/efi
#verify that /dev/sdb2 is mounted at /boot/efi by looking for /boot/efi/EFI
ls /boot/efi
#install a stub kernel at the fallback location on the ESP
cp /boot/vmlinuz-3.4.39-gentoo /boot/efi/EFI/Boot/bootx64.efi
#verify it is present and was built near current time
ls -l /boot/efi/EFI/Boot/bootx64.efi
#redo grub
emerge -av grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi
grub-mkconfig -o /boot/grub/grub.cfg
wgetpaste -t /boot/grub/grub.cfg
#have i done any good? please run & post url's
ls -alR /boot | wgetpaste -t
efibootmgr -v | wgetpaste -t
exit
reboot

try rEFInd , should have stub kernel on ESP/sdb2, stub kernel on sdb6, and grub on sdb2, try both or all 3 or more or less

@Tony currently using a rEFInd cd/usb for trouble shooting. Your point is very well taken but changing the cd/usb :D Problem started with a dual boot windows and ubuntu complicated during gentoo install by conflicting directory structures recommended by handbook and grub wikis. multiple ESP's. Compoundedby some typos by yours truly.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 5:02 pm    Post subject: Reply with quote

Tony0945 wrote:
When I installed refind on a new drive cloned from an old drive it found kernels on the old drive. Because they weren't UEFI kernels, they wouldn't boot.

I added this line to refind.conf
Code:
dont_scan_volumes WD400_PART1,WD400_PART2
which caused refind to stop showing the kernels from the old (WDC WD400) drive. There are many notes in refind.conf. BTW, I don't boot grub at all anymore. I boot the kernels directly. Therefore I never have to edit a grub menu. When I build a kernel using "make install" refind makes it the default kernel. To make an earlier kernel the default I just have to use "touch". This is handy because the machine is remote.


Can I just put those anywhere in the conf file?
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3076
Location: Illinois, USA

PostPosted: Thu Jan 26, 2017 5:30 pm    Post subject: Reply with quote

DevOne wrote:
Can I just put those anywhere in the conf file?
I'm not really sure. These excerpts show where I changed the file. All original starts with #
Code:
# On UEFI PCs, default is internal,external,optical,manual
# On Macs, default is internal,hdbios,external,biosexternal,optical,cd,manual
#
#scanfor internal,external,optical,manual
scanfor internal,manual
Code:
# Partitions (or whole disks, for legacy-mode boots) to omit from scans.
# For EFI-mode scans, you must specify a volume by its label, which you
# can obtain in an EFI shell by typing "vol", from Linux by typing
# "blkid /dev/{devicename}", or by examining the disk's label in various
# OSes' file browsers.
# For legacy-mode scans, you can specify any subset of the boot loader
# description shown when you highlight the option in rEFInd.
# The default is "LRS_ESP".
#
dont_scan_volumes WD400_PART1,WD400_PART2
Code:
#default_selection "+,1,1"
#default_selection Microsoft
#default_selection "+,bzImage,vmlinuz"
#default_selection Maintenance 23:30 2:00
#default_selection "Maintenance,OS X" 1:00 2:30
default_selection vmlinuz
No Windoze on this machine.
My disk layout
Code:
Device       Start       End   Sectors   Size Type
/dev/sda1     2048   2099199   2097152     1G EFI System
/dev/sda2  2099200 488392703 486293504 231.9G Linux filesystem
and fstab
Code:
/dev/sda1       /boot/efi       vfat            auto,noatime    1 2
/dev/sda2       /               ext4            defaults,noatime  0 1
/dev/sdc2       /video          ext4            nofail,auto,relatime  0 1
#/swapfile      swap            swap            defaults        0 0
/dev/sdb3       swap            swap            defaults        0 0
/dev/cdrom      /mnt/cdrom      auto            noauto,user,ro  0 0
#/dev/fd0       /mnt/floppy     auto            noauto,user     0 0
tmpfs           /var/tmp/portage    tmpfs       nofail,noatime,nr_inodes=1M,size=18G    0 0
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 5:33 pm    Post subject: Reply with quote

Tony0945 wrote:
When I installed refind on a new drive cloned from an old drive it found kernels on the old drive. Because they weren't UEFI kernels, they wouldn't boot.

I added this line to refind.conf
Code:
dont_scan_volumes WD400_PART1,WD400_PART2
which caused refind to stop showing the kernels from the old (WDC WD400) drive. There are many notes in refind.conf. BTW, I don't boot grub at all anymore. I boot the kernels directly. Therefore I never have to edit a grub menu. When I build a kernel using "make install" refind makes it the default kernel. To make an earlier kernel the default I just have to use "touch". This is handy because the machine is remote.


I put this line, but nothing changed.
refind is showing 2 entries:
1. is my kernel 4.4.39 on 488mb and there are no extra options or ability to see uuid
2. is starting my efi, so the grub menu

We are completely stuck! I am starting to be angry...
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 3076
Location: Illinois, USA

PostPosted: Thu Jan 26, 2017 5:45 pm    Post subject: Reply with quote

The PARTID's are peculiar to my machine. The kernels have these options:
Code:
gentoo ~ # zcat /proc/config.gz |grep EFI
CONFIG_EFI_PARTITION=y
CONFIG_EFI=y
CONFIG_EFI_STUB=y
# CONFIG_EFI_MIXED is not set
CONFIG_FB_EFI=y
CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
# EFI (Extensible Firmware Interface) Support
CONFIG_EFI_VARS=y
CONFIG_EFI_ESRT=y
CONFIG_EFI_VARS_PSTORE=y
# CONFIG_EFI_VARS_PSTORE_DEFAULT_DISABLE is not set
CONFIG_EFI_RUNTIME_MAP=y
# CONFIG_EFI_FAKE_MEMMAP is not set
CONFIG_EFI_RUNTIME_WRAPPERS=y
CONFIG_EFI_BOOTLOADER_CONTROL=y
# CONFIG_EFI_CAPSULE_LOADER is not set
# CONFIG_EFI_TEST is not set
CONFIG_UEFI_CPER=y
# CONFIG_CACHEFILES is not set
# CONFIG_EFIVAR_FS is not set
# CONFIG_EARLY_PRINTK_EFI is not set
# CONFIG_EFI_PGT_DUMP is not set
Check your menuconfig. Maybe the kernel is not EFI bootable. Also, I don't use an initramfs, if you do, maybe more modification is necessary. I'm no guru, just a user who stumbled his way to a boot. You can see the whole odyssey here:https://forums.gentoo.org/viewtopic-t-1055958-highlight-.html
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 Jan 26, 2017 8:42 pm    Post subject: Reply with quote

DevOne wrote:
DONAHUE wrote:
grub uses its own modules



Ok I agree with this, but when in grub I tried to change "insmod ext2" with ext4, booting the kernel it said module ext4 not found.


The early insmod statement is for the boot partition. which should be anyway according to any guide vfat.
boot files are placed in that vfat partition, and your kenrel should have support for your file-system / hardware controllers to boot your box.
that insmod instruction do not have anyhting to do with root, it has to do with the boot partion!

the rootfstype kernel parameter has to do with the root partion.

--

I gave you full section for grub2 on page1. For your setup, assuming ids have not changed, you have used the gentoo handbook for installation it should work out of the box!
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Thu Jan 26, 2017 8:47 pm    Post subject: Reply with quote

What do you all think of installing window again and try installing grub after it?
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7550
Location: Goose Creek SC

PostPosted: Thu Jan 26, 2017 9:09 pm    Post subject: Reply with quote

What do you think about spending a few minutes running through the modified modified guide of my PostPosted: Thu Jan 26, 2017 10:53 am post?
You appear to have windows installed but the windows ESP has been trashed. Reinstalling windows will rebuild the ESP. If you have a system restore point that you can use or a backup you could even save some persona files if present.
_________________
Defund the FCC.
Back to top
View user's profile Send private message
DevOne
Guru
Guru


Joined: 13 Jul 2005
Posts: 419

PostPosted: Fri Jan 27, 2017 10:48 am    Post subject: Reply with quote

DONAHUE wrote:
What do you think about spending a few minutes running through the modified modified guide of my PostPosted: Thu Jan 26, 2017 10:53 am post?
You appear to have windows installed but the windows ESP has been trashed. Reinstalling windows will rebuild the ESP. If you have a system restore point that you can use or a backup you could even save some persona files if present.


I will try this out next week since I will be busy with other things.
Thanks for now.
_________________
Real-time cooperative softair: http://www.softairrealfight.net
Qt generic-compass contribution: https://codereview.qt-project.org/#/c/92017
Open-source Virtual Keyboard QT widget: https://www.linux-apps.com/p/1132203/
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, 4, 5  Next
Page 3 of 5

 
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