I've installed ubuntu into a fakeraid (dmraid). I used fakeraid because I'll need to dual boot with my Windows 8, which isn't still installed. My array and its partitions looks like the following (under /dev/mapper):
lrwxrwxrwx 1 root root 7 abr 3 22:04 isw_eecjdje_Volume0 -> ../dm-0 lrwxrwxrwx 1 root root 7 abr 3 22:04 isw_eecjdje_Volume0p1 -> ../dm-1 lrwxrwxrwx 1 root root 7 abr 3 22:04 isw_eecjdje_Volume0p3 -> ../dm-2 lrwxrwxrwx 1 root root 7 abr 3 22:04 isw_eecjdje_Volume0p5 -> ../dm-3
The 'p1' is my boot partition, 'p3' is the extended partition and 'p5' the one with my linux. I added 'p5' to an lvm volume called 'lvmvolume', so I've got (under /dev/mapper):
lrwxrwxrwx 1 root root 7 abr 3 22:04 lvmvolume-home -> ../dm-5 lrwxrwxrwx 1 root root 7 abr 3 22:04 lvmvolume-raiz -> ../dm-4 lrwxrwxrwx 1 root root 7 abr 3 22:04 lvmvolume-swap -> ../dm-9 lrwxrwxrwx 1 root root 7 abr 3 22:04 lvmvolume-temporal -> ../dm-8 lrwxrwxrwx 1 root root 7 abr 3 22:04 lvmvolume-usr -> ../dm-6 lrwxrwxrwx 1 root root 7 abr 3 22:04 lvmvolume-var -> ../dm-7
Now my problem: I've done
sudo usermod -G dialout myuser, and that removed my user from all the other groups (forgot
-a :( ), so I've no root (by sudo or either login) access.
I booted into rescue mode with my ubuntu 12.04 install usb-key. After getting a console I see that things look a bit different: isw_eecjdje_Volume0, isw_eecjdje_Volume0p3 and isw_eecjdje_Volume0p5 disappeared, and isw_eecjdje_Volume0p1 appears under /dev/md instead of /dev/mapper. The lvm logical volumes appears under /dev/mapper as expected, but if I mount /dev/mapper/lvmvolume-raiz (my root filesystem) under '/mnt' rescue mode and I manually edit /mnt/etc/group to add myuser back to the groups I need those changes get lost after reboot!!
Another way to rescue I figured out is to add a delay to grub menu (say 3 seconds, now it has no delay) and then boot into single mode. The problem here is that my boot partition (/dev/md/isw_eecjdje_Volume0p1 in the rescue shell) mounts read-only!! So I can't reinstall grub... Doing
mount -o remount,rw /dev/md/isw_eecjdje_Volume0p1 does not work.
I'm lost, does anybody have any clue? I've read that pressing Shift during computer startup would give me the grub shell, but that's not true. My main question is why can't I write to my lvmvolumes under the fakeraid partition? Although for this problem knowing how to force a grub shell would do the thing...