[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-users] Something went wrong and now I can't load my domu operating system, please help if you can


  • To: xen-users@xxxxxxxxxxxxx
  • From: Dominic Mason <dominic@xxxxxxxxxx>
  • Date: Tue, 21 Jan 2014 16:07:34 +0000
  • Delivery-date: Tue, 21 Jan 2014 16:08:49 +0000
  • List-id: Xen user discussion <xen-users.lists.xen.org>

Hi

On Tue, 2014-01-14 at 10:35 -0500, robert jackson wrote:
> Today I booted my domu like normal, but something went wrong. 
> Instead of my login screen loading I was in a terminal. 
> To make matters worse my filesystem was mounted read only.
> I did some research and found that I could mount my filesystem
> as read/write by doing sudo -i and then mount -o remount,rw /. 
> This worked for me and I could then run startx again. 
> I made a mistake though. I think I must have misunderstood what I read, 
> because I thought to fix the problem I had to edit /etc/fstab and 
> remove errors=remount-ro. Big mistake. After I rebooted I had the same
> problem with the filesystem being mounted read only, but now when I do 
> mount -o remount,rw / it doesn't work for me.
> Now it says Unrecognized mount option "o" or missing value, mount: / not 
> mounted
>  or bad option. I don't know what to do now. I don't know if I can boot a 
> live 
> CD to mess with the files on the drive because it's not a real computer. 
> This problem isn't necessarily Xen related but Xen is complicating the 
> matter. 
> That's why I'm asking here. Please help me if you can, I don't have any 
> backups 
> and I'll be very disappointed if I can't fix this.


I've had a very similar situation where a domU crash left the journal on
the domU filesystem in a bad state. You may be in a different position,
but this should allow you to mount your disk on your dom0, andyway to
modify the fstab...



Regardless of fsck'ing the domU FS from the dom0, the domU refused to
boot in anything other than read-only

In my case the domU was on an LVM disk, with partitions, so I had to
use 

kpartx -av /dev/VG/vm-disk 

to make the disk partitions available to the dom0

eg in 
/dev/mapper/VG--vm--diskp1

Then I had to delete the journal from the disk using tune2fs, fsck the
disk, re-create the journal


To remove a journal, you use the -O ^has_journal option 
(Check the man page for tune2fs, I'v only had to do this once, and I
haven't rechecked this)

tune2fs -O ^has_journal /dev/mapper/VG--vm--diskp1

e2fsck -f /dev/mapper/VG--vm--diskp1

tune2fs -O +has_journal /dev/mapper/VG--vm-diskp1

puts a new journal back on the disk.

Then do 

kpartx -dv /dev/VG/vm-disk 

to remove the /dev/mapper entry


This was on an opensuse dom0 with an ubuntu 12.04LTS domU



By the way, doing the kpartx -av command on your domU disk should enable
you to be able to mount the partition from /dev/mapper/ onto your dom0

eg 

kpartx -av /dev/VG/vm-disk
mount -o loop /dev/mapper/VG--vm--diskp1 /mnt

You may have to fsck it before you mount it

That should allow you to be able to get at the fstab to edit it back to
what it should be before, so your VM can mount the disk when it -
hopefully - boots up...



Regards



> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxx
> http://lists.xen.org/xen-users

-- 
Dominic Mason <dominic@xxxxxxxxxx>
OpusVL


_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxx
http://lists.xen.org/xen-users


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.