Dnia 2014-06-01, nie o godzinie 11:45 +0200, Anders Ingemann pisze: [ cut ] > I do not fully understand what's going on during normal execution, > > so please point some missing points. > > > > Just before GRUB installation remount is called on main volume. > > It unmounts all partitions from that volume, then calls unmap, then > calls link_dm_node which calls dmsetup, than calls map, and mounts > volume. > > > Exactly. For NBDs and loopback volumes, this is necessary when using > grub 1.99, because grub tries to be smart about things and then trips > over its own feet. > To avoid that, we fool grub into thinking that the mounted volume and > it's partitions are just on a normal HDD. > OK, I was using Debian unstable with GRUB 2.02 so I should repeat tests with GRUB 1.99. > > > It all somehow works with _before_* and _after_* methods, and gets > dispatched using events arrsy, but I do not see all interdependencies > here. > > > There is a custom class FSMProxy, which proxies calls on the class > into the fsm class. This is mostly done because I didn't code all the > state machines for volume and partition handling in one go. I'm sure > it can be simplified, but I just haven't gotten around to it yet. > It seems that I cannot avoid getting familiar with fysom... > > > I did not see any dmsetup call in logs though. > > > I'm sure you just overlooked them, they're there somewhere :-) > > > > Basically - the only choice between failure and > > > success is link target in /dev/mapper/xvd*1. > > If it points to dm-* - grub install fails. > > If it points to xvd*1 - grub install succeeds. > > > You can achieve that without undoing the links. Just remove this > line (and the one further down that remounts without the links). I see - I'll try few more experiments. Thanks for all the pointers. Best regards. -- Tomasz Rybak GPG/PGP key ID: 2AD5 9860 Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860 http://member.acm.org/~tomaszrybak
Attachment:
signature.asc
Description: This is a digitally signed message part