Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB2 Throwing Error on Attempted Boot
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
jebriggsy
n00b
n00b


Joined: 22 Aug 2013
Posts: 22
Location: New England, USA

PostPosted: Wed Oct 01, 2014 4:19 pm    Post subject: GRUB2 Throwing Error on Attempted Boot Reply with quote

Hello,

I am reinstalling my system from stage3. I usually install using LVM/LUKS for root, ext2 seperate /boot, and swap as another partition within LVM. I also use Hardened Sources - just PaX, not Grsec or SELinux.


Now, the error I am getting is this
Code:

error: Device name required
Loading vmlinuz($version) ...
Loading initial ramdisk($version) ...
press any key to boot...

When I press any key, it runs a normal boot up sequence until it reaches the point where it says something about using tSc clocksource at whatever hertz and then just hangs. I don't think it freezes, because the input bar still blinks, but I can't type anything.


I have used Dracut to generate an initramfs to map & unlock the LVM/LUKS partition like I usually do, but I also added the following lines in /etc/default/grub as suggested by the GRUB2 Wiki Page:

Code:

# Not sure which one this version of GRUB2 uses
# So if error delete non-functional. 
# Tell GRUB2 to look for cryptodisks
GRUB_CRYPTODISK_ENABLE=y
GRUB_ENABLE_CRYPTODISK=y

# Boot from LVM
GRUB_PRELOAD_MODULES=lvm


Everything is named according to GRUB2's naming scheme as far as I can tell:

ls -l /boot:
Code:

-rw-r--r-- 1 root root   96976 Sep 30 15:16 config-3.15.10-hardened-r1
drwxr-xr-x 5 root root    4096 Oct  1 11:55 grub
-rw------- 1 root root 5458800 Sep 30 17:56 initramfs-3.15.10-hardened-r1.img
drwx------ 2 root root   16384 Sep 30 11:37 lost+found
-rw-r--r-- 1 root root 3713554 Sep 30 15:16 System.map-3.15.10-hardened-r1
-rw-r--r-- 1 root root 7905248 Sep 30 15:16 vmlinuz-3.15.10-hardened-r1


And I can't find anything in /boot/grub/grub.cfg that seems off. But then again, I don't really know what's going on in GRUB2's scripting language.
Seems self explanatory, but I have no idea what the error about device name could be. Anyway, this is my grub.cfg

cat /etc/grub/grub.cfg:
Code:

# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod lvm
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
}

if loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
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-6a113a4c-4f95-4989-a3f9-67d83de9471c' {
   load_video
   insmod gzio
   insmod part_msdos
   insmod ext2
   cryptomount -u
   set root='hd0,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  47e65108-4868-459d-9f4b-fb2e376a497d
   else
     search --no-floppy --fs-uuid --set=root 47e65108-4868-459d-9f4b-fb2e376a497d
   fi
   echo   'Loading Linux 3.15.10-hardened-r1 ...'
   linux   /vmlinuz-3.15.10-hardened-r1 root=/dev/mapper/root ro 
   echo   'Loading initial ramdisk ...'
   initrd   /initramfs-3.15.10-hardened-r1.img
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-6a113a4c-4f95-4989-a3f9-67d83de9471c' {
   menuentry 'Gentoo GNU/Linux, with Linux 3.15.10-hardened-r1' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.15.10-hardened-r1-advanced-6a113a4c-4f95-4989-a3f9-67d83de9471c' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
                cryptomount -u
      set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  47e65108-4868-459d-9f4b-fb2e376a497d
      else
        search --no-floppy --fs-uuid --set=root 47e65108-4868-459d-9f4b-fb2e376a497d
      fi
      echo   'Loading Linux 3.15.10-hardened-r1 ...'
      linux   /vmlinuz-3.15.10-hardened-r1 root=/dev/mapper/root ro 
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-3.15.10-hardened-r1.img
   }
   menuentry 'Gentoo GNU/Linux, with Linux 3.15.10-hardened-r1 (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.15.10-hardened-r1-recovery-6a113a4c-4f95-4989-a3f9-67d83de9471c' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      cryptomount -u
                set root='hd0,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  47e65108-4868-459d-9f4b-fb2e376a497d
      else
        search --no-floppy --fs-uuid --set=root 47e65108-4868-459d-9f4b-fb2e376a497d
      fi
      echo   'Loading Linux 3.15.10-hardened-r1 ...'
      linux   /vmlinuz-3.15.10-hardened-r1 root=/dev/mapper/root ro single
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-3.15.10-hardened-r1.img
   }
}

### 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 ###


I can post my kernel .config if neccessary, but I don't think the boot even gets that far. As an aside, is anyone else having trouble with wgetpaste?

# cat /mnt/gentoo/boot/grub/grub.cfg | wgetpaste -v
Code:

Apparently nothing was received. Perhaps the connection failed.
--2014-10-01 16:19:49--  http://bpaste.net/
Resolving bpaste.net... 84.22.98.66, 2a02:2770:13:0:21a:4aff:fef3:978
Connecting to bpaste.net|84.22.98.66|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://bpaste.net/ [following]
--2014-10-01 16:19:49--  https://bpaste.net/
Connecting to bpaste.net|84.22.98.66|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: '/dev/null'

     0K .......... .........                                   39.1M=0s

2014-10-01 16:19:50 (39.1 MB/s) - '/dev/null' saved [19471]



Thanks in advance to anyone who can help me sort this out.
_________________
Hardened Gentoo user
PGP Key ID: 0x839340713B1C9C7B
Back to top
View user's profile Send private message
jebriggsy
n00b
n00b


Joined: 22 Aug 2013
Posts: 22
Location: New England, USA

PostPosted: Wed Oct 01, 2014 5:06 pm    Post subject: Reply with quote

So I got rid of the error: Device name required problem by using a handwritten menu option* in /boot/grub/grub.cfg:
Code:

menuentry 'Gentoo Custom GRUB' --class gentoo --class gnu --class os {
   echo   'Loading Hardened Gentoo kernel...'
   linux    /vmlinuz-3.15.10-hardened-r1 init=linuxrc ramdisk=8192 crypt_root=dev/sys/root realroot=/dev/mapper/root dolvm
   echo   'Loading initrd...'
   initrd    /initramfs-3.15.10-hardened-r1.img
}


* Credit to tw04l124 in thread device-mapper: remove ioctl error


This is just an additional menu option between the generated menu and submenu entries, so the rest of the boot script is still there. But the boot output still stops at the bit about tsc clocksource, so I suspect my problem is with either the initrd or kernel configuration rather than with GRUB2. Unless I still have the GRUB2 menuentry configured incorrectly.

So, here is my kernel config: http://dpaste.com/248NCCS
And output of dracut: http://dpaste.com/2TY09CK
( I got around the wpaste error by changing the service: wgetpaste -s dpaste )

And contents of /etc/dracut.conf:
Code:

# PUT YOUR CONFIG HERE OR IN separate files named *.conf
# in /etc/dracut.conf.d
# SEE man dracut.conf(5)

# Sample dracut config file

#logfile=/var/log/dracut.log
#fileloglvl=6

# Exact list of dracut modules to use.  Modules not listed here are not going
# to be included.  If you only want to add some optional modules use
# add_dracutmodules option instead.
#dracutmodules+=""

# dracut modules to omit
#omit_dracutmodules+=""

# dracut modules to add to the default
add_dracutmodules+="crypt lvm"

# additional kernel modules to the default
#add_drivers+=""

# list of kernel filesystem modules to be included in the generic initramfs
#filesystems+=""

# build initrd only to boot current hardware
hostonly="yes"
#

# install local /etc/mdadm.conf
#mdadmconf="no"

# install local /etc/lvm/lvm.conf
#lvmconf="no"

# A list of fsck tools to install. If it's not specified, module's hardcoded
# default is used, currently: "umount mount /sbin/fsck* xfs_db xfs_check
# xfs_repair e2fsck jfs_fsck reiserfsck btrfsck". The installation is
# opportunistic, so non-existing tools are just ignored.
#fscks=""

# inhibit installation of any fsck tools
#nofscks="yes"

# mount / and /usr read-only by default
#ro_mnt="no"

# set the directory for temporary files
# default: /var/tmp
#tmpdir=/tmp


Again, thanks in advance to anyone who can help.

PS @mods, wondering if I should edit the title or not?
_________________
Hardened Gentoo user
PGP Key ID: 0x839340713B1C9C7B
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