Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Boot fails and unable to repair it

  1. #1
    Join Date
    Feb 2013
    Beans
    6

    Boot fails and unable to repair it

    Hi guys,

    I'm hoping that you can help me out with this.

    A few days ago I had a problem with some upgrade install which ended up messing things up quite bad. I ended up having a problem getting a message telling me that my disk was full while I new I still had some space. Realized that it was due to having my inodes full. And after trying to clean up to have some space I must have done something wrong as after that I have been unable to boot.

    Got my hand on a Live USB and after a bit of googling understood that I had to repair Grub in order to have my system booting normally. Seemed that I had to options to do that:
    - using boot-repair
    - chrooting to install Grub 2 (as explained here http://ubuntuforums.org/showthread.php?t=1581099)

    When using boot-repair after trying to repair by just clicking on the recommended repair, it ends up telling me that the repair failed.

    Here is the output:
    http://paste.ubuntu.com/1630064/

    I noticed this which may explain what went wrong:
    PHP Code:
     =================== os-prober: /dev/sda6:Ubuntu 12.04.2 LTS (12.04):Ubuntu:linux  =================== blkid: /dev/loop0TYPE="squashfs" /dev/sda1UUID="a36bf37c-8f72-4055-92c4-5fd86c4c5c59" TYPE="ext2" /dev/sda5UUID="1f96528e-03cc-4121-bec1-4cbdb8ac005c" TYPE="swap" /dev/sda6UUID="3b2e8ea1-18bf-41ad-8417-2652ea656ca7" TYPE="ext4" /dev/sda7UUID="fe8237ae-f0fe-4c2d-8f64-1e7e88526db8" TYPE="ext4" /dev/sdb1LABEL="PENDRIVE" UUID="1CF1-2B37" TYPE="vfat"   1 disks with OS1 OS 1 Linux0 MacOS0 Windows0 unknown type OS.  Warningextended partition does not start at a cylinder boundaryDOS and Linux will interpret the contents differently. =================== No kernel in /mnt/boot-sav/sda1/bootgrub    =================== sda1recordfail=1/grub/grubenv recordfail=
    And the recommended repairs:
    PHP Code:
     =================== Recommended repair Recommended-Repair This setting will reinstall the grub2 of sda6 into the MBR of sdausing the following options:        sda1/bootAdditional repair will be performedunhide-bootmenu-10s   Mount sda1 on /mnt/boot-sav/sda6/boot chrootfailed to run command `grub-install': No such file or directory ,.  Reinstall the GRUB of sda6 into the MBR of sda chroot: failed to run command `grub-install': No such file or directory grub-install /dev/sda: exit code of grub-install /dev/sda:127 Failed to run command grub-install detected. chroot: failed to run command `type'No such file or directory lrwxrwxrwx 1 root root 32 Jan 22 19:19 /mnt/boot-sav/sda6/usr/sbin/grub-install -> ../lib/grub/i386-pc/grub-install lrwxrwxrwx 1 root root 32 Jan 22 19:19 /mnt/boot-sav/sda6/usr/sbin/grub-install -> ../lib/grub/i386-pc/grub-install chrootfailed to run command `grub-install': No such file or directory grub-install /dev/sda: exit code of grub-install /dev/sda:127  chroot /mnt/boot-sav/sda6 update-grub chroot: failed to run command `update-grub': No such file or directory  An error occurred during the repair.  You can now reboot your computer.  pastebinit  packages needed dpkg-preconfigure: unable to re-open stdin: No such file or directory 
    I have also tried to use boot-repair by using the advanced settings but I always end up getting in a loop telling me:
    Please enable a repository containing the [linux] packages in the software sources of The OS now in use - Ubuntu 12.04 (sda6). Then try again
    and
    Please enable a repository containing the [grub2] packages in the software sources of The OS now in use - Ubuntu 12.04 (sda6). Then try again
    And it always comes back to these message whatever the repository I choose.


    When trying the Chrooting method I manage to mount the partitions and the Ubuntu installations on /mnt/temp correctly but when I type the command
    Code:
    sudo chroot /mnt/temp
    I get the following message telling me that it fails.
    Code:
     chroot: failed to run command `/bin/bash': No such file or directory
    I'm feeling stuck now and don't know how to resolve my problem. I already backed up all my files but would really prefer to avoid having to do an fresh install :-/
    Last edited by FonkyM; February 9th, 2013 at 08:37 PM.

  2. #2
    Join Date
    Jan 2007
    Beans
    3,202

    Re: Boot fails and unable to repair it

    Take a look at this and see if you followed all the steps -- it looks like you didn't on the final step: http://basictheprogram.blogspot.com/...t-archive.html
    Intel Core i7-950 / Asus P6X58D-E / Nvidia GTX480 / siduction 64-bit on OCZ Revodrive SSD / KDE4.10.2/ Kubuntu 13.04

  3. #3
    Join Date
    Feb 2013
    Beans
    6

    Re: Boot fails and unable to repair it

    Quote Originally Posted by dabl View Post
    Take a look at this and see if you followed all the steps -- it looks like you didn't on the final step: http://basictheprogram.blogspot.com/...t-archive.html
    Tried the command as suggested in the link but even the first one gives me an error

    ubuntu@ubuntu:~$ sudo mkdir /mount/point
    mkdir: cannot create directory `/mount/point': No such file or directory

  4. #4
    Join Date
    Jan 2007
    Beans
    3,202

    Re: Boot fails and unable to repair it

    Try it like this:

    Code:
    sudo mkdir -p /mnt/chroot
    Intel Core i7-950 / Asus P6X58D-E / Nvidia GTX480 / siduction 64-bit on OCZ Revodrive SSD / KDE4.10.2/ Kubuntu 13.04

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

    Re: Boot fails and unable to repair it

    I think the link leaves off the extra command to mount your separate /boot and you need to use /mnt not /mount as dabl has already suggested.

    Not sure why Boot-Repair did not work? Do you have any settings in BIOS that lock MBR? Virus protection or bit locker built into BIOS?

    You might try these before the full chroot. We suggest these first and then if they do not work the full chroot method.
    #If separate /boot
    $ sudo mount /dev/sda6 /mnt
    $ sudo mount /dev/sda1 /mnt/boot
    $ grub-install --root-directory=/mnt /dev/sda

    OR

    #If separate /boot & Natty or later
    $ sudo mount /dev/sda6 /mnt
    $ sudo mount /dev/sda1 /mnt/boot
    $ sudo grub-install --boot-directory=/mnt/boot /dev/sda

    Newer version of grub2 suggest the --boot-directory but the older --root-directory type still seems to work.

    Reinstall grub2 - Short version & full chroot version
    https://help.ubuntu.com/community/Grub2#Reinstalling GRUB2
    Grub2 info & full chroot version - also METHOD 3 - CHROOT:
    https://help.ubuntu.com/community/Grub2
    https://wiki.ubuntu.com/Grub2#Recover Grub 2 via LiveCD
    chroot version:
    http://www.ubuntu-inside.me/2009/06/...r-windows.html
    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.

  6. #6
    Join Date
    Feb 2013
    Beans
    6

    Re: Boot fails and unable to repair it

    Ok so I managed to solve my chroot issue and can now chroot from terminal.

    But I still have a problem at the next step as running the command apt-get purge grub grub-pc grub-common tells me I have unmet dependencies and can't solve it to purge grub.

    Here is the output:

    root@ubuntu:/# apt-get purge grub grub-pc grub-common
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Package grub is not installed, so not removed
    Package grub-common is not installed, so not removed
    Package grub-pc is not installed, so not removed
    You might want to run 'apt-get -f install' to correct these:
    The following packages have unmet dependencies:
    apt-utils : Depends: libapt-inst1.4 (>= 0.8.0) but it is not going to be installed
    Depends: libapt-pkg4.12 (>= 0.8.16~exp12ubuntu10.7) but it is not going to be installed
    Depends: libc6 (>= 2.4) but it is not going to be installed
    Depends: libdb5.1 but it is not going to be installed
    Depends: libgcc1 (>= 1:4.1.1) but it is not going to be installed
    Depends: libstdc++6 (>= 4.4.0) but it is not going to be installed
    debconf-i18n : Depends: debconf but it is not going to be installed
    Depends: liblocale-gettext-perl but it is not going to be installed
    libtext-charwidth-perl : Depends: libc6 (>= 2.1.3) but it is not going to be installed
    Depends: perl-base (>= 5.14.2-3) but it is not going to be installed
    Depends: perlapi-5.14.2
    libtext-iconv-perl : Depends: libc6 (>= 2.1.3) but it is not going to be installed
    Depends: perl-base (>= 5.14.2-6) but it is not going to be installed
    Depends: perlapi-5.14.2
    multiarch-support : Depends: libc6 (>= 2.13-0ubuntu6) but it is not going to be installed
    tzdata : Depends: debconf (>= 0.5) but it is not going to be installed or
    debconf-2.0
    xz-utils : Depends: libc6 (>= 2.7) but it is not going to be installed
    Depends: liblzma5 (>= 5.1.1alpha+20110809) but it is not going to be installed
    E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
    and when I run apt-get -f install

    root@ubuntu:/# apt-get -f install
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following extra packages will be installed:
    coreutils debconf dpkg libacl1 libapt-inst1.4 libapt-pkg4.12 libattr1
    libbz2-1.0 libdb5.1 libgcc1 liblocale-gettext-perl liblzma5 libselinux1
    libstdc++6 perl-base tar zlib1g
    Suggested packages:
    debconf-doc debconf-utils whiptail dialog gnome-utils
    libterm-readline-gnu-perl libgtk2-perl libnet-ldap-perl libqtgui4-perl
    libqtcore4-perl apt bzip2 ncompress
    The following NEW packages will be installed:
    coreutils debconf dpkg libacl1 libapt-inst1.4 libapt-pkg4.12 libattr1
    libbz2-1.0 libdb5.1 libgcc1 liblocale-gettext-perl liblzma5 libselinux1
    libstdc++6 perl-base tar zlib1g
    0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
    9 not fully installed or removed.
    Need to get 3,941 kB/12.2 MB of archives.
    After this operation, 25.8 MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://be.archive.ubuntu.com/ubuntu/ precise-proposed/main libc6 i386 2.15-0ubuntu10.4 [3,941 kB]
    Fetched 3,941 kB in 37s (105 kB/s)
    E: Cannot get debconf version. Is debconf installed?
    debconf: apt-extracttemplates failed: No such file or directory
    Selecting previously unselected package libc6.
    (Reading database ... 2338 files and directories currently installed.)
    Preparing to replace libc6 2.15-0ubuntu10.4 (using .../libc6_2.15-0ubuntu10.4_i386.deb) ...

    A copy of the C library was found in an unexpected directory:
    '/lib/i386-linux-gnu/libc-2.15.so'
    It is not safe to upgrade the C library in this situation;
    please remove that copy of the C library or get it out of
    '/lib/i386-linux-gnu' and try again.

    dpkg: error processing /var/cache/apt/archives/libc6_2.15-0ubuntu10.4_i386.deb (--unpack):
    subprocess new pre-installation script returned error exit status 1
    /bin/df: `/run/lock': No such file or directory
    /bin/df: `/run/shm': No such file or directory
    /bin/df: `/home/emmanuel/.gvfs': No such file or directory
    dpkg: regarding .../libgcc1_1%3a4.6.3-1ubuntu5_i386.deb containing libgcc1, pre-dependency problem:
    libgcc1 pre-depends on multiarch-support
    multiarch-support is unpacked, but has never been configured.
    dpkg: error processing /var/cache/apt/archives/libgcc1_1%3a4.6.3-1ubuntu5_i386.deb (--unpack):
    pre-dependency problem - not installing libgcc1
    Errors were encountered while processing:
    /var/cache/apt/archives/libc6_2.15-0ubuntu10.4_i386.deb
    /var/cache/apt/archives/libgcc1_1%3a4.6.3-1ubuntu5_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

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

    Re: Boot fails and unable to repair it

    You have a partial upgrade and now it is very confused.

    If you do not yet have a good backup I would make sure you do. All your data and all of /home at the minimum.

    List sources and are they consistent?
    cat /etc/apt/sources.list

    # If still errors after fixing sources
    # Repair sources issues, delete old/obsolete & refresh:
    http://ubuntuforums.org/showthread.php?t=2037992
    sudo rm /var/lib/apt/lists/* -vf
    sudo apt-get update

    # Then this one:
    sudo apt-get update && sudo apt-get dist-upgrade


    http://ubuntuforums.org/showthread.php?t=1858451
    Update another link
    http://ubuntuforums.org/showthread.php?t=1978554
    Last edited by oldfred; February 10th, 2013 at 05:57 PM. Reason: more info
    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.

  8. #8
    Join Date
    Feb 2013
    Beans
    6

    Re: Boot fails and unable to repair it

    So this is what I get for the sources list

    Code:
    root@ubuntu:/# cat /etc/apt/sources.list
    # deb cdrom:[Ubuntu 11.04 _Natty Narwhal_ - Release i386 (20110427.1)]/ natty main restricted
    
    # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
    # newer versions of the distribution.
    deb http://be.archive.ubuntu.com/ubuntu/ precise main restricted
    deb-src http://be.archive.ubuntu.com/ubuntu/ precise main restricted
    
    ## Major bug fix updates produced after the final release of the
    ## distribution.
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
    ## team. Also, please note that software in universe WILL NOT receive any
    ## review or updates from the Ubuntu security team.
    deb http://be.archive.ubuntu.com/ubuntu/ precise universe
    deb-src http://be.archive.ubuntu.com/ubuntu/ precise universe
    
    ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
    ## team, and may not be under a free licence. Please satisfy yourself as to 
    ## your rights to use the software. Also, please note that software in 
    ## multiverse WILL NOT receive any review or updates from the Ubuntu
    ## security team.
    deb http://be.archive.ubuntu.com/ubuntu/ precise multiverse
    deb-src http://be.archive.ubuntu.com/ubuntu/ precise multiverse
    
    ## Uncomment the following two lines to add software from the 'backports'
    ## repository.
    ## N.B. software from this repository may not have been tested as
    ## extensively as that contained in the main release, although it includes
    ## newer versions of some applications which may provide useful features.
    ## Also, please note that software in backports WILL NOT receive any review
    ## or updates from the Ubuntu security team.
    # deb http://be.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
    # deb-src http://be.archive.ubuntu.com/ubuntu/ natty-backports main restricted universe multiverse
    
    deb http://security.ubuntu.com/ubuntu precise-security main restricted
    deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
    deb http://security.ubuntu.com/ubuntu precise-security universe
    deb-src http://security.ubuntu.com/ubuntu precise-security universe
    deb http://security.ubuntu.com/ubuntu precise-security multiverse
    deb-src http://security.ubuntu.com/ubuntu precise-security multiverse
    
    ## Uncomment the following two lines to add software from Canonical's
    ## 'partner' repository.
    ## This software is not part of Ubuntu, but is offered by Canonical and the
    ## respective vendors as a service to Ubuntu users.
    deb http://archive.canonical.com/ubuntu precise partner
    # deb-src http://archive.canonical.com/ubuntu natty partner
    
    ## This software is not part of Ubuntu, but is offered by third-party
    ## developers who want to ship their latest software.
    deb http://extras.ubuntu.com/ubuntu precise main
    deb-src http://extras.ubuntu.com/ubuntu precise main
    
    #==================================
    # Paissad Repository (pms-linux)  =
    #==================================
    # deb http://deb.paissad.net/ unstable main contrib non-free # disabled on upgrade to oneiric
    # deb-src http://deb.paissad.net/ unstable main contrib # disabled on upgrade to oneiric
    
    #=============
    # mediainfo  =
    #=============
    # deb http://ppa.launchpad.net/shiki/mediainfo/ubuntu oneiric main # disabled on upgrade to oneiric
    deb http://be.archive.ubuntu.com/ubuntu/ precise-proposed restricted main multiverse universe
    And after the suggested commands to refresh, I get this as the last part after it checks the different sources

    Code:
    Fetched 316 B in 6s (47 B/s)                                                                             
    Reading package lists... Done
    W: GPG error: http://ppa.launchpad.net precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2EA8F35793D8809A
    sudo: unable to resolve host ubuntu
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     apt-utils : Depends: libapt-inst1.4 (>= 0.8.0) but it is not installed
                 Depends: libapt-pkg4.12 (>= 0.8.16~exp12ubuntu10.7) but it is not installed
                 Depends: libdb5.1 but it is not installed
                 Depends: libgcc1 (>= 1:4.1.1) but it is not installed
                 Depends: libstdc++6 (>= 4.4.0) but it is not installed
     debconf-i18n : Depends: debconf but it is not installed
                    Depends: liblocale-gettext-perl but it is not installed
     libc6 : Depends: libgcc1 but it is not installed
     libtext-charwidth-perl : Depends: perl-base (>= 5.14.2-3) but it is not installed
                              Depends: perlapi-5.14.2
     libtext-iconv-perl : Depends: perl-base (>= 5.14.2-6) but it is not installed
                          Depends: perlapi-5.14.2
     tzdata : Depends: debconf (>= 0.5) but it is not installed or
                       debconf-2.0
     xz-utils : Depends: liblzma5 (>= 5.1.1alpha+20110809) but it is not installed
    E: Unmet dependencies. Try using -f.
    I've already made a backup and have all my important files saved on an external drive, that was the first thing I did after having managed to boot via a LiveUSB.

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

    Re: Boot fails and unable to repair it

    It looks like everything is precise and ppa's are all commented out.

    Another thread with some suggestions.
    http://ubuntuforums.org/showthread.php?t=1983220

    See post #5 also on adding keys
    http://ubuntuforums.org/showthread.php?t=2062472
    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.

  10. #10
    Join Date
    Feb 2013
    Beans
    6

    Re: Boot fails and unable to repair it

    Managed to add the missing key, thanks

    But I'm still stuck with the missing dependencies problem. Basically any other command than apt-get update pretty much comes back with the following:

    Code:
    root@funkymaestro-1000H:~# apt-get dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     apt-utils : Depends: libapt-inst1.4 (>= 0.8.0) but it is not installed
                 Depends: libapt-pkg4.12 (>= 0.8.16~exp12ubuntu10.7) but it is not installed
                 Depends: libdb5.1 but it is not installed
                 Depends: libgcc1 (>= 1:4.1.1) but it is not installed
                 Depends: libstdc++6 (>= 4.4.0) but it is not installed
     debconf-i18n : Depends: debconf but it is not installed
                    Depends: liblocale-gettext-perl but it is not installed
     libc6 : Depends: libgcc1 but it is not installed
     libtext-charwidth-perl : Depends: perl-base (>= 5.14.2-3) but it is not installed
                              Depends: perlapi-5.14.2
     libtext-iconv-perl : Depends: perl-base (>= 5.14.2-6) but it is not installed
                          Depends: perlapi-5.14.2
     tzdata : Depends: debconf (>= 0.5) but it is not installed or
                       debconf-2.0
     xz-utils : Depends: liblzma5 (>= 5.1.1alpha+20110809) but it is not installed
    E: Unmet dependencies. Try using -f.

    Btw, instead of having to chroot each time and because the LiveUSB I was using wasn't persistent and didn't have that much memory, I'm now using Suber Grub 2 (http://www.supergrubdisk.org/super-grub2-disk/ ). Guess it's not changing much.

Page 1 of 2 12 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
  •