2

I have installed Xen on Debian following the official manual from debian.org. After that I runned grub-update and some time later removed Xen, including xen kernel. I runned grub-update one more time, it says

discarding improperly nested partition...

After reboot, system doesn't want to boot:

Loading linux 2.6.26-2-686. Error: cannot read linux header. Loading initial ramdisk... Error: you need to load the kernel first.

initrd and kernel exists in /boot. The filesystems are /boot in /dev/sda1 (ext2) and / in /dev/sda2 (lvm2).

my grub.cfg:

### 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 lvm
insmod part_msdos
insmod ext2
set root='(stat.ax-host.ru-root)'
search --no-floppy --fs-uuid --set bf95a21c-f7b6-40dd-92c9-dbebff28250e
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 8e5ebc99-a0c3-4f82-b7fe-4878273d709c
set locale_dir=($root)/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-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 8e5ebc99-a0c3-4f82-b7fe-4878273d709c
    echo    'Loading Linux 2.6.26-2-686 ...'
    linux   /vmlinuz-2.6.26-2-686 root=/dev/mapper/stat.ax--host.ru-root ro  quiet splash
    echo    'Loading initial ramdisk ...'
    initrd  /initrd.img-2.6.26-2-686
}
menuentry 'Debian GNU/Linux, with Linux 2.6.26-2-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 8e5ebc99-a0c3-4f82-b7fe-4878273d709c
    echo    'Loading Linux 2.6.26-2-686 ...'
    linux   /vmlinuz-2.6.26-2-686 root=/dev/mapper/stat.ax--host.ru-root ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /initrd.img-2.6.26-2-686
}
### END /etc/grub.d/10_linux ###

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

/etc/grub.d/ 00_header 05_debian_theme 10_linux 30_os-prober 40_custom 41_custom

1
  • You marked my answered as the answer to your question, but did you solve it? Your config files don't show the Xen entries I suspected were there.
    – Halfgaar
    May 31, 2011 at 19:12

1 Answer 1

2

When you install Xen, it changes your boot config to start the Xen hypervisor instead of the Linux kernel. Can you boot into a live CD and show the contents of /boot and /boot/grub/grub.cfg (or menu.lst, depening on which grub you have)?

And what is the contents of /etc/grub.d/?

1
  • added grub.cfg contents
    – artem
    May 29, 2011 at 13:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .