What to do when Ubuntu Device-mapper seems to be invincible!

I’ve been trying a dozen different configurations of my 2x500GB SATA drives over the past few days involving switching between ACHI/IDE/RAID in my bios (This was after trying different things to solve my problems with Ubuntu Lucid Lynx) ; After each attempt I’ve reset the bios option, booted into a live CD, deleting partitions and rewriting partition tables left on the drives.

Now, however, I’ve been sitting with a /dev/mapper/nvidia_XXXXXXX1 that seems to be impossible to kill!

It’s the only ‘partition’ that I see in the Ubuntu install (but I can see the others in parted) but it is only the size of one of the drives, and I know I did not set any RAID levels other than RAID0.

Thanks to wazoox for eliminating a possibility involving LVM issues with lvremove and vgremove, but I found what works for me.

After a bit of experimenting, I tried

$dmraid -r

so see what raid sets were set up, then did

$dmraid -x

but was presented with

ERROR: Raid set deletion is not supported in “nvidia” format

Googled this and found this forum post that told me to do this;

$dmraid -rE

And that went through, rebooted, hoped, waited (well, while i was waiting, set the bios back to AHCI), and repartitioned, and all of (this particular issue) was well again. Hope this helps someone else down the line!

(This is a duplicate of my ServerFault query on this that I answered myself)

Tags: , , , , , ,

4 comments

  1. I have exactly the same problem. I installed Ubuntu 10.04 and after towards the end of the installation I got this:

    “executing ‘grub-install /dev/sda’ failed
    This is a fatal error”

    Not knowing any better, I let grub be installed on /dev/mapper/nvidiaxxxxx and nearly had heart failure when, having removed the installation CD and re-booted, I got a black screen and no sign of any menu. I have a dual boot machine with two hard drives – one for Windows XP and the other for Ubuntu.

    I did a clean install of Ubunto 10.04 because I have another machine that I use for trying out stuff and there were several problems when I upgraded to the latest Ubuntu so I decided to do a clean install on my other machine.

    You didn’t say what happened after you did dmraid -rE. Did you have to do a lot of mysterious mumbo jumbo? I would like to get back my menu for choosing which OS to load but don’t know how to.

    Regards,

    Chris

  2. Chris
    dmraid -rE erases the raid metadata, and spews out a fair amount of crap if i recall.
    As long as you set your bios back to a regular mode (ACHI or IDE), it should send everything back to normal, but you have probably lost the XP partition. It depends on how the drives were mapped. Easiest way to tell is that if you had two drives at say, 500GB, and it appeared that your ubuntu installation was partitioning 500GB, you should be fine, in which case booting into rescue mode on the XP disk will let you reinstall the boot menu.

    If it appeared that ubuntu was going into 1000GB, your basically screwed and dont have much hope of recovering your XP data, but after dmraid, you should be back to two bare drives.

    Wish I could be more help, and good luck!

  3. Praise the lord… 2 iso’s later, finally look like this damn thing will install

    • Nihsant
      I strongly advise that you md5 or sha checksum all iso images before burning them, and always use the verify function on your cd burner, to avoid wasted time.

      Glad you got it working dude! Any other issues gimme a shout, or if you find something wrong and fix it yourself, tell me how and I’ll write it up (giving credit of course!)

Leave a comment


Load Times Plugin made by Ares Free Download