You are not logged in.
Hi, I hit a problem running a system build script inside an LXC container.
The script runs mkinitcpio which fails to detect relevant filesystems, leading to an initramfs that can not mount ext3.
I can solve this by listing ext3 in the MODULES section of /etc/mkinitcpio.conf but I would really like to understand
what mkinitcpio does to determine the filesystem support to include in the initramfs.
Perhaps my LXC config is missing something or perhaps I've just hit on something that doesn't behave right in LXC.
If anyone can help I'd apprecate some pointers...
Thanks.
Offline
It sounds like you're not including the filesystem hook, so regardless of inclusion of the autodetect hook, no filesystem modules will ever be added.
mkinitcpio is a bash script. Have at it.
Offline
What I have worked fine when I ran it on the host system but it doesn't work on the container. It's the same code - the only difference is when inside a container it fails to detect the necessary filesystems. I'll take a look at the mkinitcpio internals but my guess is the filesystem hook and autodetect are there but the auto detection is performing differently when inside a container.
Offline
Sounds like its a similar situation to when you run mkinitcpio inside a chroot -- its impossible to determine the root device, and therefore you can't determine what the filesystem is. I'll again mention the you can add the filesystems hook to add filesystems instead of explicitly specifying them in MODULES. autodetect will not bone you and leave you without a filesystem module when root FS detection fails.
Offline
Sounds like its a similar situation to when you run mkinitcpio inside a chroot -- its impossible to determine the root device, and therefore you can't determine what the filesystem is.
Yes, I think this is what it is (a LXC container is essentially a chroot on steroids)
I'm going to do a bit of digging around the mkinitcpio source as you suggest and I may be able to work out how a container should be configured to allow mkinitcpio to see the info that it needs.
I'll again mention the you can add the filesystems hook to add filesystems instead of explicitly specifying them in MODULES. autodetect will not bone you and leave you without a filesystem module when root FS detection fails.
Yes, I just checked that any my mkinitcpio.conf contains what I expect are the default hooks (given I haven't changed them):
HOOKS="base udev autodetect pata scsi sata lvm2 filesystems usbinput"
Offline