Unable to boot the operating system

9,351

Boot from a Live CD. Go to root prompt.

#grub
grub> root (hd0,0) //for first hard disk, first partition
grub> find /boot/grub/stage1
grub> setup (hd0)
grub> quit

You should start working again. you can then change the menu.lst

If your /boot is located on some other disk or some other partition you should change (hdN,n) accordingly

Share:
9,351

Related videos on Youtube

xralf
Author by

xralf

Updated on September 18, 2022

Comments

  • xralf
    xralf over 1 year

    I installed Lubuntu 11.10 and it run without problems. I decided to install Ubuntu 11.10 mini instead of Lubuntu 11.10.

    After the installation the operating system didn't boot. I only saw the black screen. I used sysresccd and tried to repair grub according to this guide and I tried solution 2. It didn't help.

    I tried to repair it with lilo. I remembered that at some time in the past I repaired mbr with lilo and everything was OK. After using the command:

    lilo -M /dev/sda mbr

    I restarted the laptop and a message appeared (I don't remember what it said). I understood that I had to install grub again and repeated the procedure with sysresccd, which didn't help.

    EDIT: fdisk -l /dev/sda

    EDIT: content of /boot directory of sda1 partition

    EDIT: I used google and found this link. It seems that this is my problem. It was only sufficient to press ctrl+alt+F1 and Ubuntu started booting. After commenting the line containing vt.handoff in /etc/grub.d/10_linux everything was OK. How to close this question?

    • Rizwan Khan
      Rizwan Khan about 12 years
      It will be much easier for someone to help you if you reboot the machine again and take note of the error message.
    • xralf
      xralf about 12 years
      the error message was something like "no operating system found". You won't get more information from it. I understood it that lilo cleared mbr, so I reinstalled grub.
    • Nils
      Nils about 12 years
      Please boot from rescue-cd and post the output of fdisk -l /dev/sda.
    • xralf
      xralf about 12 years
      @Nils See question edit
    • rslemos
      rslemos about 12 years
      Can you post your /etc/fstab ?
    • Coffeee
      Coffeee about 12 years
      no need to post fstab, it is loaded after the kernel and thus after the bootmanager is loaded, which in this case is not loaded. question is if there were any erros while installing grub @xralf?
    • xralf
      xralf about 12 years
      @WalterMaier-Murdnelch When I installed the Ubuntu mini from ISO image the last thing I have to choose was some question about installing grub, so I confirmed it and after restart there was problem with booting. I haven't noticed nothing suspicious.
    • rslemos
      rslemos about 12 years
      I wanted to see where the /boot is mounted.however from fdisk -l it looks like /boot is in same partition
    • xralf
      xralf about 12 years
      @NeelBasu /boot is on /dev/sda1 partition.
    • Coffeee
      Coffeee about 12 years
      @xralf: as pointed out in post #4 of the ubuntu forums this is a bug of the mini cd, have you tried editing your config according to that posting?
    • xralf
      xralf about 12 years
      @WalterMaier-Murdnelch Yes, it worked. I was too busy to read the whole thread, my fault. Though, I'm not sure how to close this solved question.
    • John S Gruber
      John S Gruber almost 12 years
      Why don't you write up as an answer and document what you did to fix the problem and where you got the information? Then you can accept that answer since you know it worked.
  • xralf
    xralf about 12 years
    the command find /boot/grub/stage1 prints Error 15: File not found
  • xralf
    xralf about 12 years
    I appended to question the content of /boot directory.
  • kmacdonald
    kmacdonald about 12 years
    find /boot/grub/stage1 will fail if /boot is on its own partition (as it many times is, to overcome buggy BIOS limitations (ever heard of INT13h?)), maybe unless a symbolic link exists (boot/ -> /), depending on how grub is able to handle those. In this case, you can use find, just replace it by find /grub/acpi.mod (a file that your list shows). From your file tree, it's possible to see that grub was never completely installed at the right place (/grub) and is scattered across /boot.
  • psusi
    psusi about 12 years
    That is for grub-legacy. Ubuntu has been using grub2 since 9.10.
  • psusi
    psusi about 12 years
    @njsg, int13 grew extensions to see disks > 2gb back around 1997, so unless you have a 486 or early pentium based computer, you don't need a separate /boot.
  • kmacdonald
    kmacdonald about 12 years
    @psusi: int13 was just an example of what has been one of the early issues with disk size. There were some other limitations after that one. In fact, I never faced the int13 one myself, but one on 30-something GB. Separate boots may also be used for stuff like / on SATA drives when the BIOS is unable to boot from SATA. Oh, in a nutshell, it's a frequent workaround for issues with poor boot systems.
  • Coffeee
    Coffeee about 12 years
    Can you explain what problem you are talking about? Aligning partitions to cylinders is not reccommended, not only parted will hate you for doing so.
  • Nils
    Nils about 12 years
    The old problem might be that grub has to be within the first 1023 cylinders (with "older" BIOSes). I did not say anything about aligning.