SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-10-03 17:01:33

gatchi
Member
Registered: 2011-10-03
Posts: 13

GRUB won't finish on boot up

On boot-up, I get a "Welcome to GRUB!" and then a hang.  No response from keyboard, and I can't get to the GRUB command line.  It's a fresh install of Statler, which seemed to install ok.  The partitions are there and root is mountable, so I feel like it might be a config file error, but I'm not very sure.  I tried having the config file point to /dev/sda1 instead of a UUID, but got the same thing.  I also enabled debug mode and saw it constantly opening and closing sda1 with some other random lines like a couple of malloc lines and other stuff.

I can boot into a live session using the USB (I'm in it right now).  I even tried reinstalling GRUB from within the live-session.  Any ideas?

Here's grub.cfg:

#
# 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 ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
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 {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 720c056d-1272-44fb-9538-e1320d75300c
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 720c056d-1272-44fb-9538-e1320d75300c
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set 720c056d-1272-44fb-9538-e1320d75300c
insmod png
if background_image /usr/share/images/desktop-base/grub-splash-crunchbang.png ; then
  set color_normal=light-gray/black
  set color_highlight=black/white
else
  set menu_color_normal=light-gray/black
  set menu_color_highlight=black/white
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'CrunchBang Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    #search --no-floppy --fs-uuid --set 720c056d-1272-44fb-9538-e1320d75300c
    echo    'Loading Linux 2.6.32-5-686 ...'
    linux    /boot/vmlinuz-2.6.32-5-686 root=/dev/sda1 ro  quiet splash
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.32-5-686
}
menuentry 'CrunchBang Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set 720c056d-1272-44fb-9538-e1320d75300c
    echo    'Loading Linux 2.6.32-5-686 ...'
    linux    /boot/vmlinuz-2.6.32-5-686 root=UUID=720c056d-1272-44fb-9538-e1320d75300c ro single 
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.32-5-686
}
### 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  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

Offline

Be excellent to each other!

#2 2011-10-03 18:55:20

xaos52
The Good Doctor
From: Planet of the @s
Registered: 2011-06-24
Posts: 4,290

Re: GRUB won't finish on boot up

In that situation, I would try to
1. boot into live session using the usb
2. chroot to the #! on disk
3. in chroot:
grub-install /dev/sda
update-grub

Need help with chroot? http://crunchbanglinux.org/forums/topic … -via-grub/

Last edited by xaos52 (2011-10-03 19:23:54)

Offline

#3 2011-10-03 20:33:42

gatchi
Member
Registered: 2011-10-03
Posts: 13

Re: GRUB won't finish on boot up

xaos52 wrote:

In that situation, I would try to
1. boot into live session using the usb
2. chroot to the #! on disk
3. in chroot:
grub-install /dev/sda
update-grub

Need help with chroot? http://crunchbanglinux.org/forums/topic … -via-grub/

Like I said, I already tried that.  hmm  That was one of the first things I tried, actually. xD  No change whatsoever.  Maybe the installer on my usb is bad?  I feel like that's not likely it, though.

Offline

#4 2011-10-03 23:57:20

ColInvictus
#! Member
From: μ
Registered: 2011-01-08
Posts: 96

Re: GRUB won't finish on boot up

In /etc/default/grub, uncomment

GRUB_TERMINAL=console

then update grub and try again. It might not be pretty, but if it works...

Last edited by ColInvictus (2011-10-03 23:58:07)

Offline

#5 2011-10-06 02:27:41

gatchi
Member
Registered: 2011-10-03
Posts: 13

Re: GRUB won't finish on boot up

ColInvictus wrote:

In /etc/default/grub, uncomment

GRUB_TERMINAL=console

then update grub and try again. It might not be pretty, but if it works...

OMG.  Me and my friend were trying to find some way to drop into the Grub terminal and I can't believe we missed this...  Thanks.

Not completely off the ground yet, though.  Managed to get it to start booting but ran into a kernel panic.

The commands I posted were such:

grub>root (hd0,msdos1)
grub>linux /vmlinuz root=/dev/sda1 ro initrd /initrd.img
grub>boot

The last few lines before panic were:

List of all partitions:
No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unkown-block(0,0)

I feel like I've run into this particular error before... I'll try to fix it myself, but in the mean time, if anyone has any further advice, I'd appreciate it.

Offline

#6 2011-10-06 03:19:16

gatchi
Member
Registered: 2011-10-03
Posts: 13

Re: GRUB won't finish on boot up

Ok.... huh.  I went ahead and added "insmod part_msdos" and "insmod ext2" and everything worked.  So, basically, I inputted the entire entry in the grub.cfg into the command line, and it booted fine.  Which means it just plain doesn't like the running GRUB2 NOT from the command line.  I'm perplexed by this.  I'd rather it deal with the scripts instead of me typing those lines everytime i want to boot, so.... I guess I'll leave this thread open for a couple more days for anymore suggestions on how to get this running fluidly.

Offline

#7 2011-10-06 03:51:55

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: GRUB won't finish on boot up

^ I would run the installer again from LiveCD/USB - and of course make a checksum check of the iso first. If you can afford it (the drive only contains #!) first format the whole drive (maybe even with ext3 instead of ext4), run a fscheck before installing and double-check that the installer puts GRUB on the right partition (sda instead of sda1 - I am sure you know this already, but it's my duty to mention it big_smile )

A good reference is http://www.dedoimedo.com/computers/grub-2.html and the Debian Installer Boot Parameter site: http://www.debian.org/releases/stable/s … 02.html.en

Good luck!

Last edited by machinebacon (2011-10-06 03:52:09)


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#8 2011-10-06 13:44:47

ColInvictus
#! Member
From: μ
Registered: 2011-01-08
Posts: 96

Re: GRUB won't finish on boot up

And if you run into the same issue on reinstalling, you might want to try grub-legacy or lilo, rather than grub-pc.

Offline

#9 2011-10-06 14:06:55

GuruX
#! Die Hard
Registered: 2009-01-18
Posts: 527

Re: GRUB won't finish on boot up

If you are using Grub2, there are a lot of different guides out there with loads if commands. I usually do this from a live cd/usb. What you do here is to mount your root partition in the live session and then install grub, defining your root partition as the root partition of the install

mkdir /mnt/root
sudo mount /dev/sdXY /mnt/root
grub-install --root-directory=/mnt/root /dev/sdX

Substitue XY for your root partition in the mount command and then your root device in the grub install command (if you are installing to MBR).
That's imho the easiest way to reinstall grub from a live session.

Offline

#10 2011-10-06 14:35:09

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: GRUB won't finish on boot up

^ In #3 he states he had done it already.

I agree with Collnvictus, a different bootloader is a good idea to try.

I would also zero the drive with dd. Maybe there is something written in the first block.


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#11 2011-10-06 14:38:53

GuruX
#! Die Hard
Registered: 2009-01-18
Posts: 527

Re: GRUB won't finish on boot up

^^
Yeah, but chroot sometimes needs mounting of /proc and something more I can't remember, to work properly.

Offline

#12 2011-10-06 14:51:44

gatchi
Member
Registered: 2011-10-03
Posts: 13

Re: GRUB won't finish on boot up

GuruX wrote:

^^
Yeah, but chroot sometimes needs mounting of /proc and something more I can't remember, to work properly.

Yeah, you need to "mount --bind" /dev, /sys, and /proc to those directories on the mounted partition before installing.  Then I chroot'd and then ran the grub2 installation.

Wouldn't installing grub2 to the MBR overwrite that block anyway, so a dd would be redundant?  I mean, if it doesn't, then it didn't really install to the MBR, and it shouldn't start at all.

I'm tempted to download grub2 by itself and install, especially now that my USB key is free since I don't need the Live ISO anymore (woo!).

Can you run scripts from the grub2 command line?  I would be completely content forever booting grub non-graphically if I could just execute a script after I hit the command line (I know that's basically what graphical grub is SUPPOSED to do, which is funny).  But yeah, I could deal with a work around like that if a second re-install doesn't work.

Offline

#13 2011-10-06 15:02:04

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: GRUB won't finish on boot up

I think grub2 does not write zeros in the first (466?) bytes of the disk - but I have no evidence big_smile I just remember that this is a kind of recommendation if you prepare a rewrite of the MBR to clean the space, so it would make sense.


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#14 2011-10-06 15:14:39

gatchi
Member
Registered: 2011-10-03
Posts: 13

Re: GRUB won't finish on boot up

machinebacon wrote:

I think grub2 does not write zeros in the first (466?) bytes of the disk - but I have no evidence big_smile I just remember that this is a kind of recommendation if you prepare a rewrite of the MBR to clean the space, so it would make sense.

It doesn't write zeros in the first bytes, but then reads from them?  That doesn't make sense.  >.<

Offline

#15 2011-10-06 15:20:37

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: GRUB won't finish on boot up

^ Of the 512 bytes it uses 466. Maybe doesn't make sense to you.


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#16 2011-10-06 15:46:04

gatchi
Member
Registered: 2011-10-03
Posts: 13

Re: GRUB won't finish on boot up

Well duh, of course it doesn't.  Hence the inquiring statement.

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo