Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.


  Search this Thread
Old 12-15-2009, 07:13 PM   #1
LQ Newbie
Registered: Dec 2009
Posts: 1

Rep: Reputation: 0
how to set up initrd with aufs

I have a virtual machine (VMM is Xen 3.3) equipped with two IDE HDD's (/dev/hda and /dev/hdb). The root file system is in /dev/hda1, where Scientific Linux 5.4 is installed. /dev/hdb contains an empty ext2 file system.

I want to protect the root file system from writes by the VM by using aufs (AnotherUnionFS) to layer a writable file system on top of the root file system. The changes to / will be written to the file system located on /dev/hdb. (Furthermore, outside the VM, the file backing the /dev/hda will also be set to read-only permissions, so the VMM should also prevent the VM from modifying at that level.) (The purpose of this setup: be able to corrupt a virtual machine using software-implemented fault injection but preserve the file system image in order to quickly reboot the VM to a fault-free state.)

How do I get make an initrd init script to do the necessary mounts to create the union file system?

I've tried 2 approaches:

1. I've tried modifying the nash script that mkinitrd creates, but I don't know what setuproot and switchroot do and how to make them use my aufs as the new root.

2. I've tried building a LiveCD (using linux-live-6.3.0) and then modifying the Bash /linuxrc script from the generated initrd (initramfs?), and I got the mounts correct, but the final /sbin/init complains about /dev/initctl.

Specifically, my /linuxrc mounts the aufs at /union. The last few lines of /linuxrc effectively do the following:

cd /union
mkdir -p mnt/live
pivot_root . mnt/live
exec sbin/chroot . sbin/init </dev/console >/dev/console 2>&1
When init starts, it outputs something like "init: /dev/initctl: No such file or directory". What is supposed to create this FIFO? I found no such filename in the original linuxrc / liblinuxlive scripts.

Would appreciate any help or pointers. Thanks.


aufs, boot, initrd

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ejecting a LiveCD booted with 'aufs' rafo Linux - Software 0 05-01-2009 06:51 AM
AUFS support in 2.6.22 kernel saneesh00 Linux - Embedded & Single-board computer 1 04-24-2008 03:36 AM
Which linux distros use Aufs Unionfs? assasukasse Linux - General 5 04-01-2008 02:55 AM
aufs not found in kernel config android6011 Linux - General 0 12-18-2007 01:30 PM
Livescripting and file systems -- aufs? Exeis Linux - Newbie 1 10-18-2006 08:00 PM > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 09:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration