Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Boot stuck on initramfs
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
Kostronor
n00b
n00b


Joined: 07 May 2016
Posts: 5

PostPosted: Sat May 07, 2016 10:15 pm    Post subject: [Solved] Boot stuck on initramfs Reply with quote

Hey there,

I am trying to set up gentoo on a root server from https://www.strato.de/ so I have serial console to the server and a rescue system (a debian 8 ). There will be more system info later in this post, if you need anything else, please just ask, I don't want to include everything.

My progress so far:
I got a gentoo install running and working with a working grub2 (with serial working) and can consistently access this system over rescue->chroot

But once I boot into the system, it hangs on
Code:
loading initial ramdisk ...
with no additional info (even with the debug kernel param)


My kernel:
I use the hardened kernel with nothing changed.
Build/configured with
Code:
genkernel all

My ramdisk is build with
Code:
genkernel --lvm --mdadm --install --dmraid initramfs

Also I start my kernel with
Code:
dolvm domdadm



My partition layout:

I use a software raid 1 with two identical drives.
My /boot is an ext2 1Gb partition
My / is an btrfs 495Gb partition

Code:

root# lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda         8:0    0 465.8G  0 disk
|-sda1      8:1    0  1000M  0 part
| `-md126   9:126  0  1000M  0 raid1
|-sda2      8:2    0   3.8G  0 part
`-sda3      8:3    0   461G  0 part
  `-md127   9:127  0 460.9G  0 raid1
sdb         8:16   0 465.8G  0 disk
|-sdb1      8:17   0  1000M  0 part
| `-md126   9:126  0  1000M  0 raid1
|-sdb2      8:18   0   3.8G  0 part
`-sdb3      8:19   0   461G  0 part
  `-md127   9:127  0 460.9G  0 raid1
loop0       7:0    0  48.8M  0 loop


I have all drivers/tools for btrfs and ext2 and genkernel (should) enable kernel modules for btrfs

/boot/grub/grub.cfg

Code:

(chroot)# cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

serial --speed=57600 --unit=0
terminal_input serial
terminal_output serial
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=500
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=500
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-34c335c5-58f4-442b-afee-2ade077742db' {
        load_video
        if [ "x$grub_platform" = xefi ]; then
                set gfxpayload=keep
        fi
        insmod gzio
        insmod part_msdos
        insmod part_msdos
        insmod diskfilter
        insmod mdraid1x
        insmod ext2
        set root='mduuid/9af4d65a7d7537d5a15c8ec2d3600a67'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint='mduuid/9af4d65a7d7537d5a15c8ec2d3600a67'  599bf00a-311b-40b0-9066-a77b9920563e
        else
          search --no-floppy --fs-uuid --set=root 599bf00a-311b-40b0-9066-a77b9920563e
        fi
        echo    'Loading Linux x86_64-4.4.8-hardened-r1 ...'
        linux   /kernel-genkernel-x86_64-4.4.8-hardened-r1 root=UUID=34c335c5-58f4-442b-afee-2ade077742db ro  dolvm domdadm rootfstype=ext3
        echo    'Loading initial ramdisk ...'
        initrd  /initramfs-genkernel-x86_64-4.4.8-hardened-r1
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-34c335c5-58f4-442b-afee-2ade077742db' {
        menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.4.8-hardened-r1' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.4.8-hardened-r1-advanced-34c335c5-58f4-442b-afee-2ade077742db' {
                load_video
                if [ "x$grub_platform" = xefi ]; then
                        set gfxpayload=keep
                fi
                insmod gzio
                insmod part_msdos
                insmod part_msdos
                insmod diskfilter
                insmod mdraid1x
                insmod ext2
                set root='mduuid/9af4d65a7d7537d5a15c8ec2d3600a67'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint='mduuid/9af4d65a7d7537d5a15c8ec2d3600a67'  599bf00a-311b-40b0-9066-a77b9920563e
                else
                  search --no-floppy --fs-uuid --set=root 599bf00a-311b-40b0-9066-a77b9920563e
                fi
                echo    'Loading Linux x86_64-4.4.8-hardened-r1 ...'
                linux   /kernel-genkernel-x86_64-4.4.8-hardened-r1 root=UUID=34c335c5-58f4-442b-afee-2ade077742db ro  dolvm domdadm rootfstype=ext3
                echo    'Loading initial ramdisk ...'
                initrd  /initramfs-genkernel-x86_64-4.4.8-hardened-r1
        }
        menuentry 'Gentoo GNU/Linux, with Linux x86_64-4.4.8-hardened-r1 (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.4.8-hardened-r1-recovery-34c335c5-58f4-442b-afee-2ade077742db' {
                load_video
                if [ "x$grub_platform" = xefi ]; then
                        set gfxpayload=keep
                fi
                insmod gzio
                insmod part_msdos
                insmod part_msdos
                insmod diskfilter
                insmod mdraid1x
                insmod ext2
                set root='mduuid/9af4d65a7d7537d5a15c8ec2d3600a67'
                if [ x$feature_platform_search_hint = xy ]; then
                  search --no-floppy --fs-uuid --set=root --hint='mduuid/9af4d65a7d7537d5a15c8ec2d3600a67'  599bf00a-311b-40b0-9066-a77b9920563e
                else
                  search --no-floppy --fs-uuid --set=root 599bf00a-311b-40b0-9066-a77b9920563e
                fi
                echo    'Loading Linux x86_64-4.4.8-hardened-r1 ...'
                linux   /kernel-genkernel-x86_64-4.4.8-hardened-r1 root=UUID=34c335c5-58f4-442b-afee-2ade077742db ro single
                echo    'Loading initial ramdisk ...'
                initrd  /initramfs-genkernel-x86_64-4.4.8-hardened-r1
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###



Question:
Since the raid is autodetect, could it be that my device numbers change between rescue system and real boot? Would that break my fstab? (But I feel that I should get an error if that happens...)

And is there a way to see where it goes wrong? Like enabling initramfs debugging? Or something from the grub shell to test?


Last edited by Kostronor on Sun May 08, 2016 10:27 am; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7256
Location: almost Mile High in the USA

PostPosted: Sun May 08, 2016 12:52 am    Post subject: Reply with quote

It looks like you don't have a console=ttyS0,57600 in your kernel command line, so likely it's using the emulated virtual consoles (which you can't see)?

Grub's serial console config doesn't necessarily transfer into the Linux kernel. EFI should be able to, however...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Kostronor
n00b
n00b


Joined: 07 May 2016
Posts: 5

PostPosted: Sun May 08, 2016 10:27 am    Post subject: Reply with quote

eccerr0r wrote:
It looks like you don't have a console=ttyS0,57600 in your kernel command line, so likely it's using the emulated virtual consoles (which you can't see)?

Grub's serial console config doesn't necessarily transfer into the Linux kernel. EFI should be able to, however...


Thanks a lot! That I forgot... I feel a little dumb here not doing that... :oops:

everything works as expected, what I felt was a hanging os was my login prompt. Now with a working serial I can login and it works like a charm.
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