Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

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

Posted on 2011-04-18
24
Medium Priority
?
1,737 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
0
Comment
Question by:ThorinO
  • 10
  • 7
  • 5
  • +1
24 Comments
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35423458
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.
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35423741
Try this:

grub> setup (hd0)
grup> quit
0
 
LVL 19

Expert Comment

by:jools
ID: 35424816
try and modify the kernel line to read the following for the root entry;
   root=/dev/mapper/mon-01-root
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Author Comment

by:ThorinO
ID: 35425823
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.
0
 
LVL 19

Expert Comment

by:jools
ID: 35426276
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.
0
 
LVL 19

Expert Comment

by:jools
ID: 35426285
btw, you can leave "ro quiet" in there if you like.
0
 
LVL 10

Author Comment

by:ThorinO
ID: 35426297
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 =\
0
 
LVL 10

Author Comment

by:ThorinO
ID: 35426484
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.
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35428850
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
0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35428860
Alsobe careful of the difference between underscore and minus when renaming
0
 
LVL 10

Author Comment

by:ThorinO
ID: 35428946
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.
0
 
LVL 19

Expert Comment

by:jools
ID: 35431147
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>


0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35431366
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)
0
 
LVL 10

Author Comment

by:ThorinO
ID: 35434086
vgscan did not show anything

cat /proc/partitions has a loop0 listed

Starting to get worried my data is gone :(

0
 
LVL 10

Author Comment

by:ThorinO
ID: 35434092
No other drives are mounted either.
0
 
LVL 19

Expert Comment

by:jools
ID: 35434410
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?
0
 
LVL 31

Expert Comment

by:farzanj
ID: 35434449
You can also try
 lvmdiskscan

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

lshal | grep 'block.device'
0
 
LVL 10

Author Comment

by:ThorinO
ID: 35434490
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...
0
 
LVL 19

Expert Comment

by:jools
ID: 35436568
what about fdisk -l?

What disks are configured in the VM?

0
 
LVL 35

Expert Comment

by:Duncan Roe
ID: 35436946
Looks pretty bad to me. Sorry I have no further advice.
0
 
LVL 10

Author Comment

by:ThorinO
ID: 35437033
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
0
 
LVL 19

Accepted Solution

by:
jools earned 2000 total points
ID: 35439188
Well, I think that means there are no disks!

I think you need to sort out your VM first.
0
 
LVL 10

Assisted Solution

by:ThorinO
ThorinO earned 0 total points
ID: 35441085
Ah ha! So I figured out what happened. Originally this VM lived on an ESX 3.0.1 host. I recently moved it to my desktop temporarily and used VMware Player to bring it up. I manually changed the SCSI controller to "lsilogic" in the VMX file because the previous buslogic one was not working in Player. So when I moved it back to the ESX 3.0.1 the adapter did not work because of the version differences.

I downloaded the VM to my desktop again and it booted fine so I checked out the VMX file and remembered that. I just used VMware Converter to move it onto an ESXi 4.1 host and it is all good :D
0
 
LVL 10

Author Closing Comment

by:ThorinO
ID: 35465183
My solution was the resolution but help was provided.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question