Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Grub2 freezes without any error message
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
redcap
n00b
n00b


Joined: 10 Jul 2010
Posts: 35

PostPosted: Wed Mar 26, 2014 2:07 pm    Post subject: [Solved] Grub2 freezes without any error message Reply with quote

Hi there,

I'm currentlyin the process of installing Gentoo on a new system. It's been a while since my last install and according to
the handbook, Grub2 is now the default bootloader to use. However, I'm experiencing some problems with Grub2 that I'm not
able to solve. More precisely, Grub2 freezes when trying to load the initramfs that I provide. It fiddled around a little o the Grub command
line and I get freezes in other situations as well, e.g. when using TAB-completion or issuing some commands like ls.

The machine has one harddrive and is partioned as follows



Code:


root@sysresccd /root % parted
GNU Parted 3.1
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                           
Model: ATA ST500LM012 HN-M5 (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name   Flags
 1      1049kB  3146kB  2097kB               grub   bios_grub
 2      3146kB  137MB   134MB   ext4         boot
 3      137MB   500GB   500GB                crypt


The second partition is the boot partition. on the Grub command line a ls (hd0,gpt1) or ls (hd0,gpt3) causes a freeze.
ls (hd0,gpt2) works fine. Using tab completion to get the kernels file name works fine. Tab completion to get the initramfs file name
causes a freeze as well. Loading the kernel form the command line seems to work fine. Loading the initramfs from the command line however causes a freeze.
The third partition is a Luks encrypted device with several lvm logical volumes. Logical volumes are mounted using the following
init in intramfs.

Code:

#!/bin/busybox sh
read -p "Press any key to continue..."

rescue_shell() {
   echo "Something went wrong. Dropping you to a shell!"
      busybox --install -s
   exec /bin/sh
}

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev

sleep 3
cryptsetup -T luksopen /dev/sda3 sda3_crypt
lvm vgscan --mknodes
lvm lvchange -aly volumeGroup1/root
lvm lvchange -aly volumeGroup1/var

mount -o ro /dev/mapper/volumeGroup1-root /mnt/root || rescue_shell
mount -o ro /dev/mapper/volumeGroup1-var /mnt/root/var || rescue_shell

umount /proc
umount /sys
umount /dev

exec switch_root /mnt/root /sbin/init


I have inserted the prompt for a keypress to see if the script is executed at all which it isn't.

The kernel .config can be found at

http://pastebin.com/TVdMDKEZ

I tried to install Grub2 several times with no success. I'd be very grateful vor any advice on how to troubleshoot this issue further.

On a slightly different note, the wiki https://wiki.gentoo.org/wiki/GRUB2 mentions that /boot should be mounted
from inside the chroot whereas in the handbook /boot is mounted from outside the chroot. Which is the preferred way to go?


Last edited by redcap on Fri Mar 28, 2014 12:43 am; edited 1 time in total
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Wed Mar 26, 2014 2:54 pm    Post subject: Reply with quote

You are free to pick another boot loader if you want to. That the `ls ...` commands not work sounds like a bug to me. The wiki is written as a collaborative effort of users (which occasional corrections by the maintainer of grub), the handbook by the Gentoo documentation team (with reviewed contributions submitted by users); up to you with you consider, I think its preferable to use the handbook if you are doing a new install whereas it is preferable to use the wiki if you are switching, fixing and/or upgrading the boot loader.
Back to top
View user's profile Send private message
redcap
n00b
n00b


Joined: 10 Jul 2010
Posts: 35

PostPosted: Fri Mar 28, 2014 12:42 am    Post subject: Reply with quote

Thanks for your advice. I tried to reinstall grub a few more times but the problems persisted. I then switched to Lilo which 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