Debian installer problem with GRUB

OpenMediaVault is using the Debian installer d-i to install the core system. The install process is preseeded to reduce user interaction and to do not allow the user to choose incorrect settings. While testing i realized that the installation of GRUB fails when the following parameters are given:

  • The system is installed on sde for example
  • sda-sdd are empty disks

In this case the installation fails with the message that it is not possible to install GRUB on sda. What? sda? I have choosen /dev/sde to install the core system. Why the hell is GRUB trying to install itself on sda?

Is this a bug or do i miss something?

The following options are used in the preseed.cfg file:

Any tipps or suggestions?

Update:
The bug also appears when using the latest Squeeze netinst ISO. A bug has been reported to Debian grub-installer package.

24 Comments

  1. Hi Volker, I like the project. I am curious what you are using to build this build and also what you are using to build the web ui. I want to build my own custom mail server based on debian. I want to use your distro for my home file server. But I need a nice build for a mail/dns server and am at the point were I would rather build my own much like you did. Keep up the good work!

    eric,

  2. Hi Volker,
    could the problem be solved by using a specific udev rule to get the OS Disk always as /dev/sda (or whatever you prefer?). Should be solvable with some modifications to initrd.
    Best regards,
    Thomas.

  3. Kriss

    I had the same problem with the netinstall iso. But when i use the regular CD or DVD iso i’m able to install Grub on SDE. I’m using real hardware no VM.

  4. idelectrik

    I think we have to try on real server (not vmware).
    In fact, grub is installed on the first detected hard drive in the bios, and I don’t if you can modify the boot order in vmware.
    I saw a lot of issues like this. (ex : people who install ubuntu from usb key on HDD : if bios first detect the usb key, it will be sda and hard drive will be sdb, people install Ubuntu on sdb, and grub is installed on sda by default.. when they reboot without usb key… they find a boot error)

    So, do configure the hard drive where you install OMV to be the first HDD in the boot order of your server ?
    I will try to find some hardware to do this…

    • phuzz

      You can change the default boot order in a VMWare machine by going into the BIOS (if it’s booting too quick there’s an option to boot straight to BIOS).

  5. Thomas

    Hi Volker,
    by searching for a new homeserver OS to replace my MS Windows Home server (WHS), I found the Amahi HDA (=Home Digital Assistant) project including greyhole. Greyhole is like the drive extender in WHS, which will not be included anymore in the new MS WHS version. That’s the reason why a lot of people will not change to the new MS WHS version.
    Are planning to include Greyhole in the OMV?

    Regards,
    Thomas

  6. unl34shed

    had the same problem with Ubuntu 10.4 Server on my NAS, my Raid 5 was pluged in to SDA to SDC and OS HDD was in SDD. I just switched the HDDs and installed all on the SDA and it worked.

    But seems to be a Grub problem.

  7. idelectrik

    I have the same issue if I install Debian on /dev/sde.
    I tried to install grub2 with Rescatux, but it doesn’t work for the moment…

    • idelectrik

      I deleted grub-installer from d-i, install Squeeze on sde, and I have the same issue with Grub.
      During the installation, after fails message, I try to install Grub on /dev/sde manually, I’ve got no error, but it doesn’t work. My debian can’t boot…
      Do you have this issue too ?

        • idelectrik

          And to complete these tests, if sda is partitionated, and I try to install Squeeze on sde, grub installation works (on sda)
          But I’ve now a issue with grub at startup with the rescue mode…

          • volker

            That’s what i’ve expected. But that’s not what i wanted to have. I’m not a GRUB expert, but it should be possible to install it into the MBR of sde or some other hdd other than sda, right? i do not whant to have the boot manager on a RAID array that is used to store data and might be removed or something else, it should be located on the disk where the OS is located.

  8. jmcainzos

    From http://lists.debian.org/debian-user/2010/04/msg00105.html

    > Eric,
    >
    > the next time you try a Squeeze install I would suggest using the latest
    > “daily build” development version of the Debian installer. That is the
    > only thing I would trust at this point to do a direct install of Squeeze.
    > The fact that you were able to install Lenny and upgrade successfully
    > indicates that the problem is likely to be in the installer.
    >
    > By the way, if you can somehow, by hook or by crook, get everything from
    > /lib/modules/… used by the Debian Installer copied to your production
    > system, that would be a good thing. If you ever have to use the installer
    > as a rescue system, having matching kernel modules on the hard disk
    > makes things much easier in a rescue environment. It is often difficult,
    > if not impossible, to do a chroot or pivot_root without those modules.
    > The last time I checked, the installer was using a 2.6.30 kernel, which is
    > no longer available in the Debian archive. I hope that by the time that
    > Squeeze becomes the stable release the installer will be using the same
    > kernel version as Squeeze does. Test doing a rescue with a chroot and make
    > sure it works before you mess with your boot loader.

    Could be the kernel of d-i 2.6.30 vs. grub2?

  9. idelectrik

    I try to reproduce this in vmware with Debian Lenny and 4*2Gb (sda -> sdd).
    Do you use d-i partman to make partition without confirmation, or do you use manual partition ?
    Thanks for these informations.

    • volker

      The preseed.cfg file looks like

      ### Preseed file for Debian Squeeze

      ### Account setup
      # Skip creation of a normal user account
      d-i passwd/make-user boolean false
      # Root password, either in clear text
      d-i passwd/root-password password openmediavault
      d-i passwd/root-password-again password openmediavault

      ### Partitioning
      # This makes partman automatically partition without confirmation.
      d-i partman-auto/method string regular
      d-i partman-auto/init_automatically_partition select Guided - use entire disk
      d-i partman-auto/choose_recipe select All files in one partition (recommended for new users)
      d-i partman/choose_partition select Finish partitioning and write changes to disk
      d-i partman/confirm boolean true

      ### Boot loader installation
      # This is fairly safe to set, it makes grub install automatically to the MBR
      # if no other operating system is detected on the machine.
      d-i grub-installer/only_debian boolean true

      # This one makes grub-installer install to the MBR if it also finds some other
      # OS, which is less safe as it might not be able to boot that other OS.
      d-i grub-installer/with_other_os boolean true

      Please do not wonder about how some d-i statements look. With Lenny i was not able to preseed the installer with statements like

      d-i partman/choose_partition select finish

      I had to use the following instead to get it working
      d-i partman/choose_partition select Finish partitioning and write changes to disk

  10. johnysketo

    I am not sure if this helps:

    In page: d-i.alioth.debian.org/tmp/en.i386/apbs04.html
    at the boot loader installation section

    # To install to a particular device:
    #d-i grub-installer/bootdev string /dev/sda

    Hope this helps and not be totally stupid

  11. starbetrayer

    Volker,

    Will openmediavault be available as a deb package ?
    Pardon the stupid question, but why do you try to create a mini distrib to run it ?

    Regards,

    Starbe

    • volker

      There will be various deb packages that contain the OMV core + plugins. The mini distro is because OMV is a out-of-the-box solution.

  12. pierre

    Ubuntu prefers sda1 as well it seems.
    Is sda4 an extended partition or primary ? Just throwing ideas around….
    it’s a NAS, why would you want to install it on sda4 ? Or am I totally beside the point ?

    • volker

      While reading your post i realized that i had a typo in the article. It should be sdX for the ATA/IDE DOM module.

    • volker

      Removing the 3 or 4 drives used for the RAID will solve the problem (only the OS drive is plugged). Anyway, in my opinion the GRUB installer should use the previously selected drive where the Debian OS is installed.

Leave a Reply

Your email address will not be published. Required fields are marked *