LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   install Crux 3.2 in Virtualbox, grub broken? (https://www.linuxquestions.org/questions/linux-newbie-8/install-crux-3-2-in-virtualbox-grub-broken-4175562332/)

mshlinux 12-25-2015 06:36 AM

install Crux 3.2 in Virtualbox, grub broken?
 
Anyone tried Crux 3.2 in Virtualbox?
I install Crux 3.2 in Virtualbox many time. Grub is broken everytime after installed finish. I follow its handbook and run
Code:

# grub-install /dev/sda
and
Code:

# grub-mkconfig -o /boot/grub/grub.cfg
without any error. But when I reboot it from hardisk, grub broken error page appears. How can I fix it?

jpollard 12-25-2015 05:20 PM

Depends on what the error is.

I know in one case the VM used virtio for disk, and grub didn't have the proper driver for that. I don't know if it has been added since. You might check what kind if driver is being used (if it isn't a SATA, pick that for the VM and try again).

mshlinux 12-26-2015 01:42 AM

I tested it with SATA. Not work.
I also tested EFI and Lilo as well.
Not work.

colorpurple21859 12-26-2015 04:16 AM

what is the error that your getting? Did you get the grub prompt?

mshlinux 12-27-2015 04:57 AM

Yes I get grub prompt. Then I get grub rescue> screen.

colorpurple21859 12-27-2015 03:57 PM

Quote:

Yes I get grub prompt. Then I get grub rescue> screen.
Not sure what this mean. Are you saying at first you got a grub prompt and no menu, and now you get a grub rescue prompt? Grub will have to be reinstalled if it is a grub rescue prompt. If it is just a grub prompt you will need to create a /boot/grub/grub.cfg either automatically or manually

Quote:

I tested it with SATA. Not work.
I also tested EFI and Lilo as well.
Not work.
are you currently booting in bios or efi mode?

mshlinux 12-27-2015 08:51 PM

I mean "grub prompt" is that when I reboot it, grub appears very very short time and then "Grub Rescue >" screen appears.
Yes I did, boot from iso and reinstall grub. But same issue.
I am currently trying to boot from bios using grub.
sure I did
Code:

# grub-install /dev/sda
# grub-mkconfig > /boot/grub/grub.cfg

without any error.

colorpurple21859 12-27-2015 10:18 PM

what is your partition layout? what is the output of
Code:

fdisk -l
?

avangel 03-31-2018 01:06 AM

I have run into the same problem with CRUX 3.3 (installing to virtualbox). I chose grub because I installed it to btrfs filesystem (with compression).
In my case the problem was that grub-mkconfig did not generate a working configuration.
Then I typed in a minimal /boot/grub/grub.cfg as per the handbook which worked. Note that I installed CRUX to /dev/sda1.
Code:

$ cat /boot/grub/grub.cfg
set timeout=10
set default=0
menuentry "CRUX 3.3" {
        linux (hd0,msdos1)/boot/vmlinuz root=/dev/sda1 quiet
}

For the record, I copy the generated config (which did not work).
Code:

# grub-mkconfig
Generating grub configuration file ...
#
# 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
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 [ x$feature_default_font_path = xy ] ; then
  font=unicode
else
insmod part_msdos
insmod btrfs
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  43419b93-1d45-427e-a8b8-176c64249f52
else
  search --no-floppy --fs-uuid --set=root 43419b93-1d45-427e-a8b8-176c64249f52
fi
    font="/usr/lib/grub/fonts/unifont.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
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 ###

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


hazel 03-31-2018 05:26 AM

Crux uses lilo, not grub. I can't remember if the installer gives you the choice of where (or whether) to install it. But this could screw up your grub, especially in a virtual machine.


All times are GMT -5. The time now is 06:34 PM.