1

There's a problem with Ubuntu running on my hosted VPS. All I have access to is a recovery console which allows me to mount the devices.

I've narrowed the problem down to a messed menu.lst. I have the kernel and initrd pointing to the correct images, but I have no idea what the drive identifiers are when the Virtual machine is started. Also, using the grub command line gives errors when attempting to access the drives.

Can anyone give me advice on what I can do to determine the drive identifiers, or anything else that might help?

Grub version is 0.97.

UPDATE:

I'll quickly go over my environment slightly.

  • I'm in the recovery console, which, from the look of it, acts like a Live CD.
  • I've mounted my VPS root(sdb1) to /mnt.
  • I've mounted dev using mount -o bind /dev /mnt/dev
  • I can see two other drives in /dev; sda, (which holds isolinux) and sdb2 which is my VPS swap.
  • I've then chrooted into /mnt/ to access the grub prompt. I then get the following:

    grub> root (hd0, <TAB>

    grub> root (hd0,0)

    Error 5: Partition table invalid or corrupt.

  • On the first command, grub shows no suggestions when I press tab. Also, only hd0 is found.

I'll be putting bounty on this question as soon as I'm allowed. Thanks for your help!

UPDATE2:

fdisk -l /dev/sdb // Doesn't exist.
fdisk -l /dev/sdb1 // My root partition.
...
Disk /dev/sdb1 doesn't contain a valid partition table.
6
  • What error messages are you getting ?
    – Panther
    Jan 19, 2012 at 17:27
  • When booting? I have no idea. I don't have access to the VPS when it's booting. I can only see that it has failed.
    – Jivings
    Jan 19, 2012 at 17:40
  • "using the grub command line gives errors" and those errors are ? And what VPS technology ? openvz ? lxc ? xen ?
    – Panther
    Jan 19, 2012 at 17:41
  • That the drives weren't accessible I think. I have to ask support to restart the recovery console every time booting the VM fails, so I can give more details when that's done. I believe the technology is provided by onapp.com/docs
    – Jivings
    Jan 19, 2012 at 17:49
  • The fdisk results don't look promising. Either there are filesystems in use by the VPS that fdisk doesn't understand (lvm, etc) or you no longer have filesystems to boot.
    – Huckle
    Jan 19, 2012 at 23:48

2 Answers 2

2

this requires access to the grub shell if you can get that far

grub> root (hd0,0)               #Replace with your root drive
grub> cat /<TAB>                 #Check if files appear
grub> configfile /grub/menu.lst  #Check menu.lst

source: http://technotes.twosmallcoins.com/?tag=bootgrubmenulst

2
  • Great answer, I didn't know about the configfile command. When I can get back to the recovery console I'll let you know how this went.
    – Jivings
    Jan 19, 2012 at 19:08
  • I can get into the grub shell, but it's no use. Check my updated question.
    – Jivings
    Jan 19, 2012 at 21:38
0

Found that the disk was named something unconventional (vxda1) after managing to somehow get into busybox. Once I knew this I was able to sort the problem easily by editing the menu.lst.

The problem was caused by grub_update which, when invoked, erased the contents of menu.lst. Reason unknown.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .