8

I first installed my ubuntu server (11.10 amd64) using lvm but not fully mastering the concept of it. I think that's partly what made the mess of partitions on my two disks (seems to me). I installed everything using grub2 from the start to boot my Ubuntu, which I updated later to Ubuntu Server 12.04, no problem.

Here is the situation:

  • As of today, I can't boot at all, stuck with no evolution at what seems to be just before the grub options (Edit: precision from Pavel A.);

  • I can boot using the server install liveCD with option Rescue a broken system;

  • I setup network access, but don't seem to have a /run folders (don't know if it's related but seemed abnormal in some forums);

  • The devices map I built is as follows:

    1. VGa contains sda1 [Linux partition], sda2, sda3 [/] and sda5(the latter seems the same as sda3, same descriptors)
    2. VGb contains sdc1, sdc2 [/boot] and sdc3 [/home]

    (the two do not have the same PE or LE, but I'd like ultimately to have everything in the same VG)

  • Last thing I did to the boot environment was to (cleanly) remove older kernels from the boot partition (236MB large, was 99% full);

  • I ran grub-install (after having mounted boot) but got various errors:

    • can't install on /dev/sdabecause core.imgwon't fit (first partion starts on 32)
    • output of grub-install on /dev/sdc exhibits error physical volume pv0 not found
    • I even tried to grub-install directly to /dev/sda5, apparently with no error, but with no success at boot either

I looked here [serverfault]: Grub2 reports physical volume pv0 not found when probing/installing
I looked here [Ubuntu forums]: SOLVED] Install kernel with liveCD & fix grub2
I looked here [Ubuntu help] : Fixing a Broken System
I looked here [ubuntu forums]: [SOLVED] 10.10 Maverick - Grub won't recognize my Windows partition

None of what I did changed anything to the stuck-boot-situation (I can't define it any better: it just hangs, for minutes and minutes and minutes).
I hope I've not left out any important detail.

I have no idea what to do anymore, especially if installing grub doesn't work. I've not lost any data, but as it was a production(-ish) server (i.e. entirely personal), I now strongly feel the need for mirrors (I already set backups but... on the server :p).

Anyway, if any of you geniuses had any idea or lead, that would be a great help.

Thank you

Valentin

Edit: tail /var/log/syslog yields no output (blank), no new syslog is created that I can see

Edit2: I used the Boot Repair CD (Ubuntu Secure Remix version) and generated the following report on the state of my boot: http://paste.ubuntu.com/1620777

Meeshkah
  • 81
  • 3
  • If you can get almost to the login prompt, then this has hardly anything to do with the kernel - Linux boots, some of the services/programs don't. It may be however that some of your services lucks certain kernel modules. I'd suggest you try to start your system (it won't), so you reboot, then enter recovery mode and have a look at /var/log/syslog that is left from a normal boot attempt. – Pavel A Feb 06 '13 at 14:41
  • Thanks for the quick answer Pavel. I should have been more precise but when I suspected it is a kernel or boot problem, it is because nothing is printed on-screen, nothing seems to be loaded nor done, there is just like a blinking cursor and that's it. That may be the source of the confusion. Thanks for notifying me. And when you say I reboot, I just press `Ctrl+Alt+Suppr` and that's it. And how do I enter recovery mode ? – Meeshkah Feb 06 '13 at 14:49
  • Edit: I knew I had done that already, which set me on the `grub` lead: I can't access to the Recovery mode, as neither the Shift or Esc keys give me access to it. – Meeshkah Feb 06 '13 at 14:58
  • 1
    In that case I didn't understand you correctly. How is both of these possible: `nothing is printed on-screen, nothing seems to be loaded nor done, there is just like a blinking cursor and that's it` and `stuck ... just before the tty login prompt`? And what is the *Suppr* key? Do you mean *Delete*? If you cannot select recovery mode in console, you can still boot from a live CD to have a look at /var/log/syslog as you did before. – Pavel A Feb 06 '13 at 15:17
  • Sorry, I did mean the Ctrl+Alt+Del combination. And you are right, I am stuck before the grub options even display. I'm sorry I mistook the blinking cursor for the one at the start of the tty console that leads to the login prompt. I will edit my original post for that. Additionally, `tail /var/log/syslog` yielded nothing (no line). – Meeshkah Feb 06 '13 at 15:39
  • Issue still up! – Meeshkah Feb 08 '13 at 15:53
  • It is quite strange that syslog is empty. Was `tail /var/log/syslog` the exact command you executed? That would display syslog for the live system (CD/USB) you are booting from. If you don't have persistent storage configured on your USB device or if you are using liveCD, I guess it should be empty. Instead your command should look like `tail /mnt/root-part/var/log/syslog`, where *root-part* is where you mounted your actual root partition on the hdd. Well, if you don't even get to GRUB indeed, we'll not find anything useful in syslog, but just in case. – Pavel A Feb 08 '13 at 18:44
  • i have read you edit2 link and see sda has no mbr installed, can this be the problem? and you said sda1 was into a VG, but this links say this is a ext partition ... – Brigo Feb 09 '13 at 00:09
  • 1
    Regarding your *Edit 2*: are you sure the 'devices map' you describe in your post is accurate? What are for example sdb, sdd in that case? As shows the log, you also have GRUB2 installed on /dev/sdc. Does setting /dev/sdc prior to /dev/sda in boot device sequence solve the problem? – Pavel A Feb 09 '13 at 07:20
  • @PavelA You were right, my devices boot order was not correct, I forgot that in the BIOS there are two ways of setting the boot devices: first by selecting the type of boot device (cd/hdd/usb), and second by selecting the HDDs order. I set the HDD corresponding to sdc, on which I have the `/boot` partition and the only one I can install the grub on (core.img can only fit on this one, says `grub-install`). It then can boot but brings me to a grub prompt. I'm no expret here so I'll refer to you as to what to do. – Meeshkah Feb 11 '13 at 10:10
  • @Brigo Actually sda1 is not in any VG, I can't mount it in any way (even with a fs specified), I can't alter it in any way. It's 2M large, and I suspect it was the partition on which grub was installed at server install time. Maybe I should have grub launch from there, but I don't really know how to do that. – Meeshkah Feb 11 '13 at 10:12
  • i think you have to install grub in hdc. Boot from a rescue disk, and follow the "via chroot" howto on this link:https://help.ubuntu.com/community/Grub2/Installing – Brigo Feb 11 '13 at 10:30
  • @Brigo Following that tutorial brings me to a grub prompt. I should add that I have to create a boot folder in /mnt (i.e. root) in order to mount /dev/sdc2 (the boot partition) then `rmdir /mnt/boot` after the install is over and before rebooting. – Meeshkah Feb 12 '13 at 11:38
  • Sorry, but i don know how to deal with a /boot on other filesystem. – Brigo Feb 12 '13 at 16:27
  • 2
    http://paste.ubuntu.com/1620777 paste not found ... – Brigo Apr 16 '13 at 19:06

2 Answers2

0

Try to boot with a LiveCD, mount your Logical Volumes on a chroot and add the module lvm into the file /etc/default/grub:

GRUB_PRELOAD_MODULES="lvm"

followed by:

sudo update-grub

Make sure you have the lvm module into your initrd/initramfs.

fgbreel
  • 663
  • 4
  • 13
0

Without the paste.bin, I'm going to provide a checklist because you got a weird setup going on and that is your Master Boot Record (MBR) is on a different drive than the /boot partition:

  • It isn't the BIOS ordering of hard drive boot startup (I suspected VGa and VGb being backward in BIOS)
    • your BIOS is checking VGa for the master boot record
  • Use fdisk to determine if /dev/sdc2 has boot flag marked for /boot partition

Then, I would do the following steps:

  • CD rescue disk booted
  • ensure all HD partitions are mounted under /mnt
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sdc2 /mnt/boot 
grub-install --boot-directory=/dev/sdc2 /dev/sda
grub-install --boot-directory=/mnt/boot /dev/sda
Falcon Momot
  • 24,975
  • 13
  • 61
  • 92
John Greene
  • 799
  • 7
  • 28