2

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?

hildred
  • 5,759
  • 3
  • 30
  • 43
xralf
  • 16,149
  • 29
  • 101
  • 149
  • It will be much easier for someone to help you if you reboot the machine again and take note of the error message. – admirabilis Feb 06 '12 at 17:18
  • 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`. – xralf Feb 06 '12 at 17:35
  • Please boot from rescue-cd and post the output of `fdisk -l /dev/sda`. – Nils Feb 09 '12 at 21:18
  • @Nils See question edit – xralf Feb 10 '12 at 09:26
  • Can you post your `/etc/fstab` ? – Neel Basu Feb 10 '12 at 11:01
  • 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? – Baarn Feb 10 '12 at 11:09
  • @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. – xralf Feb 10 '12 at 13:42
  • I wanted to see where the `/boot` is mounted.however from `fdisk -l` it looks like `/boot` is in same partition – Neel Basu Feb 10 '12 at 17:06
  • @NeelBasu `/boot` is on `/dev/sda1` partition. – xralf Feb 10 '12 at 17:42
  • @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? – Baarn Feb 12 '12 at 11:18
  • @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. – xralf Feb 14 '12 at 09:12
  • 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. – John S Gruber May 22 '12 at 03:42

4 Answers4

1

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

Neel Basu
  • 291
  • 1
  • 3
  • 9
  • the command `find /boot/grub/stage1` prints `Error 15: File not found` – xralf Feb 10 '12 at 09:20
  • I appended to question the content of /boot directory. – xralf Feb 10 '12 at 09:44
  • `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](http://en.wikipedia.org/wiki/INT13)?)), *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`. – njsg Feb 10 '12 at 10:24
  • I can try `find /grub/acpi.mod`. And how does it repair the booting? When I want to do something I have to change the hard drive in the laptop so I'm glad to do some "bigger" operations. – xralf Feb 10 '12 at 13:48
  • That is for grub-legacy. Ubuntu has been using grub2 since 9.10. – psusi Feb 10 '12 at 14:51
  • @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. – psusi Feb 10 '12 at 15:05
  • @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. – njsg Feb 10 '12 at 18:28
0

If you are getting "no operating system found" it is because you still have the LILO MBR installed, and have not reinstalled grub. To reinstall grub, boot from the live cd, and mount the Ubuntu partition:

sudo mount /dev/sda1 /mnt

Then reinstall grub2:

sudo grub-install --root-directory=/mnt /dev/sda
psusi
  • 17,007
  • 3
  • 40
  • 51
0

I think you encountered an old problem here.

Try to create a small partition within the first 1000 cylinders (8 cyl. should be enough) and install grub there. Don`t forget to mark that partition as bootable and remove the bootable flag from the current sda1 partition.

The partition numbering might change on the way, so it is possible you have to replace sda1 with sda2 in /etc/fstab and the root= parameter of your kernel, too.

Nils
  • 18,202
  • 11
  • 46
  • 82
  • 1
    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. – Baarn Feb 11 '12 at 01:09
  • 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. – Nils Feb 11 '12 at 22:16
  • BIOSes with this limitation pretty much went away around the turn of the century. If this were the problem, you would get a grub error and rescue prompt, not "no operating system found". – psusi Feb 14 '12 at 14:39
0

From your /boot tree, it appears that somehow your grub's actual boot files got put into /boot/boot/grub. Try cp -i /boot/boot/grub/* /boot/grub.

Kevin
  • 40,087
  • 16
  • 88
  • 112