Page 3 of 10 FirstFirst 12345 ... LastLast
Results 21 to 30 of 100

Thread: grub can't install, server non bootable

  1. #21
    Join Date
    Feb 2013
    Location
    Paris, France
    Beans
    51
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: grub can't install, server non bootable

    Duh! I'm not sure I understand everything but I now have a grub menu!
    It suggests so:
    Code:
    Ubuntu, with Linux 3.2.0-35-generic
    Ubuntu, with Linux 3.2.0-35-generic (safe mode)
    Memory text (memtest86+)
    Memory test (memtest86+, serial console 115200)
    This corresponds to what showed in that infamous /boot (sdc2) folder.
    Hurray?
    Well, if I choose the first option, it goes blank screen then says:
    Code:
    error: file not found.
    error: you need to load the kernel first.
    and if I choose the second option, it goes blank screen then says:
    Code:
    Loading Linux 3.2.0-35-generic
    error: file not found.
    Loading initial memory disk (<== not sure of the translation!)
    error: you need to load the kernel first.
    This is undoubtedly progress, thanks.

  2. #22
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,737
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: grub can't install, server non bootable

    You don't create any boot folders in live mode, if you are mounting root as /mnt. You simply mount the /boot partition at /mnt/boot.
    Also, making any folders in live mode is not clashing with what I told you because those folders are temporary and exist only in the live session.

    I said not to create boot folder on your actual root partition.

    First, stop trying so many things at once. You can easily mess it up.

    I didn't understand that you moved LVs, that could affect everything since changing only the UUID in fstab is not enough. The UUID is also inside grub.cfg.

    Since at this point we can't understand and track all the mess, lets do a full grub2 purge and reinstall.

    But it is also important whether correct kernels are in sdc2. So first boot in live mode and show me what you have in sdc2:
    Code:
    sudo mount /dev/sdc2 /mnt
    ls /mnt
    ls /mnt/grub
    Don't run anything else, just that and post the result. I will prepare the commands for full grub2 reinstall.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  3. #23
    Join Date
    Feb 2013
    Location
    Paris, France
    Beans
    51
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: grub can't install, server non bootable

    Haha I'm driving you nuts. You're right sorry, I should not have increased the mess, I just did not think it would. That's because I thought the UUID was independent of the LVM fonctioning, and because the grub.cfg file used devices naming using the mapper (i.e. /dev/mapper/binomiale-root and such) so the moving around of the LV should not affect that.
    Anyway, I'll do what you wrote. I just want to point out, in regards to my previous post, that it seems grub is correctly installed but, linked to what you said, it can't find the files in the /boot partition i.e. /dev/sdc2 so maybe a bad pointer?
    ...

    Code:
    $ ls /mnt
    abi-3.2.0-35-generic               lost+found
    config-3.2.0-35-generic            memtest86+.bin
    grub                               memtest86+_multiboot.bin
    initrd.img-3.2.0-35-generic        System.lmap-3.2.0-35-generic
    initrd.img-3.2-35-030235-virtual   vmlinuz-3.2.0-35-generic
    $
    $ ls --hide=*.mod /mnt/grub
    boot.img       efiemu64.o          jfs_stage1_5     pxeboot.img
    cdboot.img     fat_stage1_5        kernel.img       resiserfs_stage1_5
    command.lst    fs.lst              lnxboot.img      stage1
    core.img       g2hdr.img           load.cfg         stage2
    crypto.img     gfxblacklist.txt    locale           terminal.lst
    default        grldr.img           minix_stage1_5   unicode.pf2
    diskboot.img   grub.cfg            moddep.lst       video.lst
    e2fs_stage1_5  grubenv             partmap.lst      xfs_stage1_5
    efiemu32.o     installed-version   parttool.lst
    Yes the grub folder contains many .mod files that I did not (manually) transcript here.

    Sorry got to go for at least 2 hours.
    Thanks
    Last edited by meeshkah; February 12th, 2013 at 10:05 AM.

  4. #24
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,737
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: grub can't install, server non bootable

    OK, you have the -35 kernel which should be fine.

    When you are back, lets try completely reinstall grub2 from live mode, including the activation of LVM again:
    Code:
    sudo apt-get install lvm2
    sudo vgchange -ay
    sudo mount /dev/binomiale/root /mnt
    sudo mount /dev/sda2 /mnt/boot
    sudo mount --bind /proc /mnt/proc
    sudo mount --bind /dev /mnt/dev
    sudo mount --bind /sys /mnt/sys
    sudo chroot /mnt
    Now you should be chrooted inside the installation so everything you run is like run by root from inside (that's why you don't need sudo in this block of commands):
    Code:
    update-initramfs -u
    apt-get remove --purge grub-pc grub-common
    apt-get install grub-pc
    update-grub
    grub-install /dev/sdc
    Exit the chroot and unmount everything:
    Code:
    exit
    sudo umount /mnt/sys
    sudo umount /mnt/dev
    sudo umount /mnt/proc
    sudo umount /mnt/boot
    sudo umount /mnt
    Reboot and hopefully you will have a fully working grub2 on /dev/sdc.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  5. #25
    Join Date
    Feb 2013
    Location
    Paris, France
    Beans
    51
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: grub can't install, server non bootable

    Ok, some error/warning messages:

    update-initramfs -u
    it said it could not find file initrd.img-3.2-35-030235-virtual, but I kept on as I was about to perform a clean install.

    apt-get remove --purge grub-pc grub-common
    when it asked something about config-something-whatever, I went too quickly and chose No, but no config file remains in /boot...

    apt-get install grub-pc
    I'm at the config screen, where it asks where to install GRUB, but the drives order is all different:
    Code:
    /dev/sda (2000398 Mo; ST32000641AS)
    /dev/sdb (2000398 Mo; ST32000641AS)
    /dev/sdc (2000398 Mo; ???)
    /dev/sdd (2000398 Mo; ???)
    /dev/dm-0 (107374 Mo; binomiale-root)
    I suspect sda and sdb are the same order as before I added the two more disks (which was why I restarted and discovered the problem), ans that the 2 unrecognized disks are the 2 new ones. But I'm not sure whether I should install on sda on sdb (sdb, I guess), and whether it would jeopardize the whole thing one more time if I try both

  6. #26
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,737
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: grub can't install, server non bootable

    How can the order be different, isn't sdc the same sdc from the beginning?

    Just a note, in a text menu you select with Space bar and a * will appear to mark the selection.

    I think you should select sdc. It's easy to change it later.

    I saw the file -virtual in sdc2 but I have no idea what it does. I haven't seen such file so far. Usually the initrd image syntax is initrd.img-3.2.0-35-generic and you have a file called like that in sdc2. Not sure if it has something to do with the LVM or not.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  7. #27
    Join Date
    Feb 2013
    Location
    Paris, France
    Beans
    51
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: grub can't install, server non bootable

    I have no idea why the order would be different. As you seem to think it sould not be, I'll select sdc. But it reads if I'm not sure I sould install to all drives. Should I do that?

    Edit: I carried on with sdc. Only error/warning:
    Code:
    Found unknown Linux distribution on /dev/sda1
    / I wonder if I could delete that partition someday.

    Edit2: OK I missed a step (grrr!). I'll start over tomorrow.
    Last edited by meeshkah; February 11th, 2013 at 07:18 PM.

  8. #28
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,737
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: grub can't install, server non bootable

    Yeah, it doesn't hurt installing grub2 on all drives. The thing is that other drives that are GPT and without the bios_grub partition, will give error if grub2 tries to install on them.

    To avoid those errors, it's best to select directly and only the gpt disk that has the bios_grub partition. That was the idea.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

  9. #29
    Join Date
    Feb 2013
    Location
    Paris, France
    Beans
    51
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: grub can't install, server non bootable

    Ok I'll start over that clean install, now. But I don't get the concept of the "bios_grub partition". Is that a full-fledged partition on which the grub is installed or what? Wouldn't that be that sda1 partition then?

    Edit: And I still don't get how you mount /dev/sdc2 to /mnt/boot without creating a mount point (i.e. mkdir /mnt/boot) first. I mean, if I don't create that folder, the mount tool just tells me there's no mount point and will NOT mount the /boot partition. So I understand that there should not be a boot folder on the binomiale-root partition but how do you suggest I cross this step? Create a mount point, mount there, grub-install and alll, then umount and delete the mount point?
    Last edited by meeshkah; February 12th, 2013 at 10:03 AM.

  10. #30
    Join Date
    Nov 2009
    Location
    Mataro, Spain
    Beans
    13,737
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: grub can't install, server non bootable

    The concept of the bios_grub partition on gpt disks is because gpt disks have smaller MBR than msdos disks, so grub2 doesn't fit there. It will look for a partition with bios_grub flag to put part of its files. That partition SHOULD NOT have any filesystem, grub2 uses it in raw format.

    It doesn't necessarily need to be first on the disk, but yes, if it's first it will be sda1. If starting from scratch I would create it as first for example.

    Also, because grub2 is not big, 1MiB is enough for this partition. You can make it 100GiB if you want, but that's waste of space since it has raw format you will not be able to use it for anything else.

    As for the mount point, I actually never needed to use those restore commands myself but we have used them many times on the forum and I don't remember a single time that anyone said he gets an error message it doesn't exist. If you use something else than /mnt/boot you might get that message, but for /mnt/boot it should work.
    Of course, you mount the root partition at /mnt first.

    If your system really complains, you can try creating that folder before you start mounting anything. At the end you don't need to delete it since you are working from live mode anyway and it will be gone after you reboot.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 14.04 LTS 64bit & Windows 10 Pro 64bit

Page 3 of 10 FirstFirst 12345 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •