We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Alert! /dev/mapper/hostname-root does not exit. Dropping to a shell! (Ubuntu, LVM) Won't boot

ThorinO
ThorinO asked
on
Medium Priority
2,657 Views
Last Modified: 2012-05-11
I have an Ubuntu x64 server that I came in to find not working. I recently did a V2V of it but it was working after the move then started doing this.

I pressed "c" from the Grub menu and did set and LS to get some information. I also did "e" to try a change but to no avail. Kinda know what is going on but not sure how to resolve.

 Grub 1
 Grub 2
Comment
Watch Question

Duncan RoeSoftware Developer
CERTIFIED EXPERT

Commented:
Personally, I do not use Grub. But faced with this kind of problem, I would boot off a USB stick or CD, mount the regular root disk read/write, and chroot to it. Then I would at least mount /proc or maybe mount -a. Then I would get the boot loader (LILO in my case) to reinstall itself to the boot sector.
CERTIFIED EXPERT

Commented:
Try this:

grub> setup (hd0)
grup> quit
Julian ParkerSenior Systems Administrator
CERTIFIED EXPERT

Commented:
try and modify the kernel line to read the following for the root entry;
   root=/dev/mapper/mon-01-root

Author

Commented:
Duncan, would you be able to provide the commands to complete that?

farzanj: it says setup is an unknown command

jools: I changed it to "linux /vmlinuz-2.6.35-28-server root=/dev/mapper/<servername>-root" and removed the ro /quiet. It started to boot so I thought I was good to go but dropped to the shell again with the same error message.
Julian ParkerSenior Systems Administrator
CERTIFIED EXPERT

Commented:
Can you list the devices in /dev/mapper or just specify /dev/<volumegroup>/<root-logicalvolumename>

I've not seen <servername>-root used before but that doesnt mean it cant be setup that way.
Julian ParkerSenior Systems Administrator
CERTIFIED EXPERT

Commented:
btw, you can leave "ro quiet" in there if you like.

Author

Commented:
I'm not sure why it is setup the way it is, I let the Ubuntu installation configure LVM. I don't even know why it broke yet either =\

Author

Commented:
The LVM name looks correct other than it added additional hypens in there for some reason.

So for exmple my system is called company-mon-01 and it changed it to company--mon--01 and when I change it to a single - it still does not work.
Duncan RoeSoftware Developer
CERTIFIED EXPERT

Commented:
Boot off bootable USB stick or install CD. Get a command prompt: if using the install CD and it goes straight to a GUI you may have to try Ctr-Alt-F2 (function key 2) or other function keys in range 1 - 6.
When you get a command prompt, mount your normal root disk. To do this you may need to modprobe the relevant file system E.g.
mkdir /tmproot
mount /dev/whatever /tmproot

Post back when you can get that far
Duncan RoeSoftware Developer
CERTIFIED EXPERT

Commented:
Alsobe careful of the difference between underscore and minus when renaming

Author

Commented:
I downloaded and booted into an Ubuntu LiveCD and have a terminal open. I'm not sure what to do with the modprobe command you suggested.
Julian ParkerSenior Systems Administrator
CERTIFIED EXPERT

Commented:
I guess were still dealing with the /dev/mapper/<whatever> doesnt exist?

Does the file exist? It should be the LV for root on your system.

Unfortunately if you cant find out you will need to use the ubuntu live cd to have a look, does the live cd find the volume groups and enable them?

If it does you can mount the filesystem locally under the live cd and have a look, if it doesnt you may need to scan for the volumes and activate the volume group.
eg/
   # vgscan
   # vgchange -a y <volumegroupname>


Duncan RoeSoftware Developer
CERTIFIED EXPERT

Commented:
You may not have to do a modprobe. You should be able to cat /proc/partitions to see what's available. Maybe the LiveCD has already mounted your disks - try mount to show what is mounted. cat /proc/filesystems to see what file systems are supported by the currently loaded modules.
If your disks have been mounted read-only, it may be prudent to run fsck -n on them before making the writable (by mount -oremount,rw disk_name)

Author

Commented:
vgscan did not show anything

cat /proc/partitions has a loop0 listed

Starting to get worried my data is gone :(

Author

Commented:
No other drives are mounted either.
Julian ParkerSenior Systems Administrator
CERTIFIED EXPERT

Commented:
vgscan should have picked up some LVM's if they were there, can you post fdisk -l.

Also, whats a v2v and what happened after the v2v and before it just stopped working? Any updates? Hardware changes?
CERTIFIED EXPERT

Commented:
You can also try
 lvmdiskscan

For seeing all the block devices on the system issue this command

lshal | grep 'block.device'

Author

Commented:
lvmdiskscan found ram0-15 and loop0

There are 3 block devices found

/dev/fd0 and /dev/sr0

I did a VMware conversion (virtual to virtual) and all was well and then for some reason poof it was broken. Of course I had a backup of the system until the other day when I deleted them...
Julian ParkerSenior Systems Administrator
CERTIFIED EXPERT

Commented:
what about fdisk -l?

What disks are configured in the VM?

Duncan RoeSoftware Developer
CERTIFIED EXPERT

Commented:
Looks pretty bad to me. Sorry I have no further advice.

Author

Commented:
fdisk -l shows nothing. The VM only has 1 VMDK on it. I am thinking that maybe I attach the VMDK to another VM (Linux or Windows) and see if I can mount and read it
Senior Systems Administrator
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
My solution was the resolution but help was provided.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.