boot OMV from another grub?

  • I successfully installed 2.2.2 to an old MSI KTV6-LSR mobo with just a SATA1 HDD, no problems there. Then I connected three internal IDE disks, formatted them from the OMV Web GUI, and mounted. No problems there. All default settings.


    Here's the issue. When I reboot the mobo BIOS (AMI 3.13a) tries to boot from the IDE disks, so it can't find grub2 there, which is installed on the SATA disk. The BIOS doesn't support setting SATA as the default boot disk when IDE disks are installed. I can still boot SATA but I need to select it manually each time from the BIOS boot menu.


    How can I make OMV boot from the SATA disk automatically?
    The BIOS doesn't support setting SATA as the default boot disk when IDE disks are installed.


    This is what I tried.
    Install grub2 also to the first IDE disk. My hope is that once grub2 is started from IDE 1 it can boot the OMV OS that is installed on the SATA disk. I though it was going to be straightforward, but I got a blocking error:


    root@nas:/boot# grub-install -v
    grub-install (GRUB) 1.99-27+deb7u3
    root@nas:/boot# mount
    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=127328,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=103416k,mode=755)
    /dev/disk/by-uuid/bd01b07d-f110-4d6e-ae44-ea088630a608 on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
    tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
    tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=625840k)
    rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
    /dev/sdb1 on /media/1f72fcd1-3929-a9fd-b5e3-ac9dd5839953 type ext4 (rw,noexec,relatime,user_xattr,barrier=1,data=ordered,jqfmt=vfsv0,usrjquota=aquota.user,grpjquota=aquota.group,_netdev)
    root@n03:/boot# sudo grub-install /dev/sdb
    /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
    /usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.
    root@n03:/boot# ls /media/1f72fcd1-3929-a9fd-b5e3-ac9dd5839953/
    lost+found


    OMV system is updated to 2016-04-13.

  • Thanks. I reformatted the IDE disks with gparted booting RescueLinux. Gparted docs say that gparted defaults to msdos PT for disks smaller than 2TB, which is my case. I rebooted OMV from the SATA disk with the reformatted IDE disks. Then I started ssh and typed


    root@nas:~# grub-install /dev/sda # is the first IDE1 disk
    /usr/sbin/grub-setup: warn: This GPT partition label has no BIOS Boot Partition; embedding won't be possible!.
    /usr/sbin/grub-setup: error: embedding is not possible, but this is required for cross-disk install.


    So, apparently I did something wrong, or gparted docs aren't accurate, and my PT is still GPT. How can I positively change the PT format from within OMV ssh? What's the actual command line I should use?


    Btw, fdisk -l /dev/sda


    Disk /dev/sda: 750.2 GB, 750155292160 bytes
    255 heads, 63 sectors/track, 91201 cylinders, total 1465147055 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000

  • On a side note, I can't edit my own posts, why? The forum let's me edit the post, but when I press Submit I get this cryptic error message


    Error Message
    Access denied. You’re not authorized to view this page.


    Another thing, what's the right way to wrap source code so that it displays as preformatted text? I tried the Source button to no avail. Thanks.

    • Offizieller Beitrag

    Make sure all IDE disks are not mounted in OMV.


    Then in terminal


    fdisk /dev/sdX <---replace X for the letter corresponding to the ide disk. fdisk -l should display all disks and you should recognize the IDE ones by size


    edit: if they already have GPT press "d" and start deleting all partitions until there isn't anything left, finally type "w" and return, type "p" check the disk is clean.

    You'll enter the fdisk console
    type "n", then press return
    Prompted for primary or extented select primary, type "p", then return, then keep going through all default values pressing return, once finished type "w", then return


    run this time parted -l /dev/sdX  check that the partition table is msdos. All good then


    Finally run grub-install /dev/sdX then update-grub


    Reboot and check that if by selecting the BIOS IDE disk it boots correctly.


    Note: This particular disk that is partitioned as msdos CANNOT be formatted through omv webui or i'll reverted to GPT. Format the drive manually in terminal

  • The following is work-in-progress as I go through your instructions. I will mark when I'm done in the end.



    Done. After I 'd' then 'w' fdisk exits. I restart it and it warns that there is a GPT, but it lists no partitions - unlike before I started, when fdisk -l was warning and showing an actual gpt entry in the PT listing.
    Anyway, the conflicting messages leave me wondering, "Is the gpt really gone or isn't?"

    Zitat


    You'll enter the fdisk console
    type "n", then press return
    Prompted for primary or extented select primary, type "p", then return, then keep going through all default values pressing return, once finished type "w", then return


    I did. When I press 'n' fdisk doesn't ask for further input at all. When I press 'w' it says it will correct the device id entry, which is now 0x0.

    Zitat


    run this time parted -l /dev/sdX  check that the partition table is msdos. All good then


    No, it still says there's a gpt but lists no pt entries. Back to square 1.
    So, let me take these same instructions to RescueLinux, see if a different Linux version can make a difference... (goes off to RescueLInux... waiting...)


    edit 1: RescueLinux couldn't do it either. I'm now trying WinXP with various MBR tools, so far no success getting the gpt clearly removed from the disk... (waiting...)

    Zitat


    Finally run grub-install /dev/sdX then update-grub


    Reboot and check that if by selecting the BIOS IDE disk it boots correctly.


    Note: This particular disk that is partitioned as msdos CANNOT be formatted through omv webui or i'll reverted to GPT. Format the drive manually in terminal


    edit 2: I finally got it working, see 4th post down for the summary.

  • Thanks everyone for your suggestions and instructions. I finally got it working. Getting GPT completely removed from the IDE disks was the real hurdle. Even when the PT was apparently empty and clean, each time I started fdisk to create an MSDOS PT, fdisk warned that the device still had a GPT. I tried most of the suggestions given above on OMV and on SystemRescueCD Linux to no avail. I also tried various Window partition table managers, which all failed to clear/replace GPT with MSDOS PT. In the end, what did work for me was
    1. Zero out all IDE PTs using Window command-line utility MBRWiz /disk=# /Wipe=GPT
    2. Create MSDOS PT using SystemRescueCD Linux gparted
    3. Format ext4 using same
    4. On OMV grub-install /dev/sdX where X is the disk letter of the first IDE disk (run fdisk -l to find out)
    5. update-grub


    Again, thanks everyone for helping me out.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!