Results 1 to 4 of 4

Thread: 10.04 Server will not boot

  1. #1
    Join Date
    Mar 2013
    Beans
    4

    10.04 Server will not boot

    I have a virtualized server running 10.04 LTS that is no longer booting. We had a number of issues with our SAN that abruptly disconnected the storage from the virtual machine infrastructure and wreaked general havoc. The issue I began with was an error:

    Target filesystem doesn't have /sbin/init

    So I checked for the particular error and found that running boot-repair would be the best course of action. So I ran boot-repair.

    When running boot repair I get an error:


    /usr/sbin/grub-probe: error: cannot find a device for / (is /dev mounted?).
    and I am also presented with a grub prompt on restart (which makes sense since boot-repair doesn't seem to be writing the boot info properly). I can access the partition from a live cd and all the data is there so I am hopeful that this can be corrected.

    The boot-repair log can be found at http://paste.ubuntu.com/5650377

    Any and all help is greatly appreciated
    Last edited by lelio98; March 26th, 2013 at 09:59 PM.

  2. #2
    Join Date
    Mar 2010
    Location
    USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: 10.04 Server will not boot

    No recent backup or lvm snapshot? (And is so easy to get LVM snapshots for backups in LVM...)

    You lost the hooks into to the PV...but instead of looking at it first to see if you could remount it or rescue it as an LVM, you started tryng to write to it as a physical device. So, I don't know if you corrupted it further by doing that prematurely.

    Also. I'm not sure what you are seeing from the LiveCD by saying you "can see it"... so you are going to have to decide on the recovery strategy based on what is still there/if you decide to try to recover, remembering that you may not be successful. You tried to recover it by other means, before trying to recover it as LVM first...

    I guess the first thing to do would be to check that the partition sda5 is intact. If so then start LVM up from the LiveCD:
    Code:
    /etc/init.d/lvm start
    Then assess what errors you have at what levels via
    Code:
    lmscan
    lgscan
    pvscan
    Most of the time in LVM, you lose a member of a group or a physical volume of the PV, where you sometimes you can re-add or recreate those pieces.... There's different ways to go, based on what happened, so I can't just recommend or blurt out- do this and you'll be fixed. I looked at your post last night and the pastebin... I had to step away and think about what I would do.

    Taking what you did already. Taking that info into consideration... From the wiki:
    LVM keeps a metadata header at the start of every physical volume, each of which is uniquely identified by a UUID. Each PV's header is a complete copy of the entire volume group's layout, including the UUIDs of all other PVs, the UUIDs of all logical volumes and an allocation map ofPEs to LEs. This simplifies data recovery in the event of PV loss.
    Since you tried to write to it physically, if it where me arriving on the scene, the first thing I would do is do:
    Code:
    dd if=/dev/sda5 bs=512 count=255 skip=1 of=/tmp/sda5.txt
    That will capture the start of the PV. I would then need to look at that extract with a hex editor. The start of the extract is going to be binary junk that I don't need (Not the file yet). The header file is ascii text. I would see something similar to this at the start of that ascii header file:
    Code:
    VolGroupLVM2_member {
        id="u0GDKW-2WMH-eHwx-fai7-144H-NYuR-Mi2h04"
    

    It goes on until after the "logical_volume" def. That def ends after the four "}" bracket characters, closing/ending that def. I would extract that info and save to a file called /etc/lvm/backup/VolGroupLVM2_member...

    If that file info is intact, good job and I could use it to bring it back up. If that file itself is over-written so I cannot see what the valid UID's, sizes and particulars of the LVM definition, then everything else is very hard work to try to re-create it and all the odds of recovery are against me.

    Just saying.
    Last edited by MAFoElffen; March 27th, 2013 at 07:35 PM.

    "Concurrent coexistence of Windows, Linux and UNIX..." || Ubuntu user # 33563, Linux user # 533637
    Sticky: Graphics Resolution | UbuntuForums 'system-info' Script | Posting Guidelines | Code Tags

  3. #3
    Join Date
    Mar 2013
    Beans
    4

    Post Re: 10.04 Server will not boot

    Output of: dd if=/dev/sda5 bs=512 count=255 skip=1 of=/tmp/sda5.txt

    https://gist.github.com/shanepinnell/5258498

    Also, by seeing the files, I mean that the LiveCD mounts the volume and I can browse the files just fine. It just won't boot.

    As for backups, unfortunately I only have a backup of the drive after it was corrupter, but before I attempted any recovery.

  4. #4
    Join Date
    Mar 2013
    Beans
    4

    Re: 10.04 Server will not boot

    Found a solution:


    Once at a grub menu


    + grub> linux (hd0,1)/boot/vmlinuz-[tab to autocomplete] root=/dev/sda1
    + grub> initrd (hd0,1)/boot/initrd.img-[tab to autocomplete]
    + grub> boot


    After a successful boot


    + sudo grub-mkconfig
    + sudo update-grub


    Everything works now!

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
  •