Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Another messed up grub menu... URGENT

  1. #11
    Join Date
    Sep 2010
    Location
    Toronto, Canada
    Beans
    181
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Another messed up grub menu... URGENT

    nitstorm, I followed that website and was able to update-grub. It showed my operating systems being added to the menu but when I restarted, I'm still stuck at the black screen.

    hedgehog1, I followed that thread link and it wasn't much help. When following the steps in the Troubleshooting Flow Chart, I got stuck on step 1. I answered no for all the points under it and it said to reinstall grub, which I can't do.. =\

    Again, the boot flag for the Ubuntu partition is on bios_grub which doesn't seem right to me since I've never used that boot flag, ever.
    Last edited by lifelike27; May 28th, 2011 at 05:50 AM.
    Dell Studio 1558: Vincere est totum!
    Core i7 720QM | 1GB ATI Radeon 5470 | 4GB DDR3 1333Mhz RAM | 15.6inch ( 1366X768 ) | 500GB HDD | 6 cell LI-ION Battery
    Mark threads as solved if they are, it makes life easier!

  2. #12
    Join Date
    Sep 2010
    Location
    Toronto, Canada
    Beans
    181
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Another messed up grub menu... URGENT

    One more thing to mention. Sometimes when I boot in the live cd and try sudo mount /dev/sda3 /mnt

    I get an error:
    Code:
    ubuntu@ubuntu:~$ sudo mount /dev/sda3 /mnt
    mount: wrong fs type, bad option, bad superblock on /dev/sda3,
           missing codepage or helper program, or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    So I open up GParted and 'check' sda3. After that I can mount it...

    dmesg | tail gives me this:
    Code:
    [  182.356514] scsi 5:0:0:0: Direct-Access     StoreJet TS250GSJ25S-S         PQ: 0 ANSI: 2 CCS
    [  182.357706] sd 5:0:0:0: Attached scsi generic sg2 type 0
    [  182.358639] sd 5:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
    [  182.359576] sd 5:0:0:0: [sdb] Write Protect is off
    [  182.359582] sd 5:0:0:0: [sdb] Mode Sense: 34 00 00 00
    [  182.360686] sd 5:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
    [  182.367489]  sdb: sdb1
    [  182.370222] sd 5:0:0:0: [sdb] Attached SCSI disk
    [  330.795029] CE: hpet4 increased min_delta_ns to 7500 nsec
    [  330.795036] CE: hpet4 increased min_delta_ns to 11250 nsec
    Dell Studio 1558: Vincere est totum!
    Core i7 720QM | 1GB ATI Radeon 5470 | 4GB DDR3 1333Mhz RAM | 15.6inch ( 1366X768 ) | 500GB HDD | 6 cell LI-ION Battery
    Mark threads as solved if they are, it makes life easier!

  3. #13
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Kubuntu

    Re: Another messed up grub menu... URGENT

    Script is showing an EFI partition. Are you booting with BIOS or UEFI? If booting with BIOS you need to have the bios_grub partition. If you have not gotten gdisk, download gdisk from rodbooks site as it is newer.

    Grub then installs without any complaint and shows up in the bios_grub partition.

    The script will show it like this from my sdb1 which is a gpt bios_grub partition, It is not formated so a lot of partition tools just do not see the partition:

    Code:
        File system:       
        Boot sector type:  Grub2's core.img
        Boot sector info:  
        Mounting failed:   mount: unknown filesystem type ''
    Even though it is not really a boot flag some of the partition tools call it that when you set it. Grub2 when installing will automatically find it.

    However, in the GPT setup, there is no space following the 512-byte MBR for embedding the "second stage" core.img. Thus, you must make a separate "BIOS boot partition" to hold core.img. You can set bios_grub flag in gparted or with command line: In GPT fdisk (gdisk), give it a type code of EF02.
    sudo parted /dev/sda set <partition_number> bios_grub on

    It only needs to be about 32 KiB in size, although in most cases make it 1 MiB because of partition alignment issues
    Actually, using ext2 for example, and GParted Live CD, the minimum partition size is 8 MB, or 32 MB for FAT32.

    GPT fdisk Tutorial -srs5694 in forums
    http://ubuntuforums.org/showthread.php?t=1439794
    http://www.rodsbooks.com/gdisk/
    UEFI boot install & repair info - Regularly Updated :
    https://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  4. #14
    Join Date
    Mar 2010
    Location
    Woonsocket, RI USA
    Beans
    3,195

    Re: Another messed up grub menu... URGENT

    Quote Originally Posted by lifelike27 View Post
    Earlier I noticed something as well. When I open GParted and change the boot flag for the ubuntu partition to bios_grub, I'm able to install grub to that partition. When I restart, I'm still stuck with that black screen.
    The first part of the below comments are based on the assumption that you're using a BIOS-based computer, or at least installing Linux using a BIOS compatibility mode (as for instance most instructions for installing Linux on an Intel-based Mac suggest).

    I'm sorry to say you've probably trashed your installation and will have to re-install Ubuntu.

    In post #13 of this thread, oldfred summarized the purpose of the BIOS Boot Partition (what GParted identifies as having a "bios_grub flag"). Setting this flag on a Linux boot partition was inappropriate, and when you re-ran grub-install, it overwrote the first ~30 KiB of your Linux partition. This almost certainly damaged the filesystem on that partition. There's a chance you'll be able to recover it by using fsck, but if not, you may have no choice but to restore from a backup or re-install from scratch.

    If you can fix the damage with fsck, I recommend doing this:


    1. Create a new BIOS Boot Partition by using gdisk and giving the partition a type code of EF02 or by using GParted and creating a partition with the "bios_grub flag" enabled. You've got plenty of space between /dev/sda6 and /dev/sda5, so just create a partition of between 32 KiB and 1 MiB in that space.
    2. Re-install GRUB using grub-install.



    With any luck, the system will boot once you do this.

    If you can't repair /dev/sda2 and have to re-install Ubuntu, be sure to create a BIOS Boot Partition prior to or during installation, or you're likely to run into the same problem again.

    If, OTOH, you're using an EFI-based computer, things might not be so dire, but it really depends on the nature of the GRUB package you've got on your computer. If you're booting using EFI, the BIOS Boot Partition isn't required, and if your GRUB package in Ubuntu is the one for EFI (grub-efi rather than grub-pc), then I'm pretty sure it won't write to the BIOS Boot Partition, so you won't have trashed your installation when you re-installed GRUB. If that's the case, though, I'm not sure why GRUB isn't booting your system, except that GRUB on EFI seems to be rather delicate at the moment.

    If you're using EFI, you might do better to use a combination of rEFIt and ELILO for booting. I've found this works much better on my one UEFI-based PC, although it's not very reliable at booting Ubuntu on my 32-bit Mac Mini or an Ubuntu installation in VirtualBox. (It's fine at booting OpenSUSE in VirtualBox, though; go figure.)
    If I've suggested a solution to a problem and you're not the original poster, do not try my solution! Problems can seem similar but be different, and a good solution to one problem can make another worse. Post a new thread with your problem details.

  5. #15
    Join Date
    Sep 2010
    Location
    Toronto, Canada
    Beans
    181
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Another messed up grub menu... URGENT

    SUCCESS!

    I followed srs5694 and created an unformatted partition with a boot flag bios_grub. Reinstalled grub in the sda3 partiton. It does feel like a dirty process to follow, but it did work. Once in my ubuntu partiton I ran gdisk to get my hybrid MBR partition running again. Now all OSes are working!

    Thank you to all the people who helped me with this. You'll are all truly awesome!

    Wooh!
    Last edited by lifelike27; May 28th, 2011 at 06:43 PM.
    Dell Studio 1558: Vincere est totum!
    Core i7 720QM | 1GB ATI Radeon 5470 | 4GB DDR3 1333Mhz RAM | 15.6inch ( 1366X768 ) | 500GB HDD | 6 cell LI-ION Battery
    Mark threads as solved if they are, it makes life easier!

  6. #16
    Join Date
    Jun 2012
    Beans
    68

    Re: Another messed up grub menu... URGENT

    I don't know what you are talking about
    But I found this
    You need to use the --force option to allow usage of blocklists and should not use --grub-setup=/bin/true (which is similar to simply generating core.img).
    grub-install will give out warnings like which should give you the idea of what might go wrong with this approach:
    Code:
    /sbin/grub-setup: warn: Attempting to install GRUB to a partitionless disk or to a partition. This is a BAD idea.
    /sbin/grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists.
    However, blocklists are UNRELIABLE and their use is discouraged.
    Without --force you may get the below error and grub-setup will not setup its boot code in the partition boot sector:
    Code:
    /sbin/grub-setup: error: will not proceed with blocklists
    With --force you should get:
    Code:
    Installation finished. No error reported.
    The reason why grub-setup does not by default allow this is because in case of partition or a partitionless disk is that grub-bios relies on embedded blocklists in the partition bootsector to locate the /boot/grub/i386-pc/core.img file and the prefix dir /boot/grub. The sector locations of core.img may change whenever the filesystem in the partition is being altered (files copied, deleted etc.). For more info see https://bugzilla.redhat.com/show_bug.cgi?id=728742 and https://bugzilla.redhat.com/show_bug.cgi?id=730915.
    The workaround for this is to set the immutable flag on /boot/grub/i386-pc/core.img (using chattr command as mentioned above) so that the sector locations of the core.img file in the disk is not altered. The immutable flag on /boot/grub/i386-pc/core.img needs to be set only if grub-bios is installed to a partition boot sector or a partitionless disk, not in case of installtion to MBR or simple generation of core.img without embedding any bootsector (mentioned above).
    Best Regards
    Last edited by Deniz343; August 26th, 2012 at 06:50 PM.

Page 2 of 2 FirstFirst 12

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
  •