Gentoo Archives: gentoo-catalyst

From: Chris Gianelloni <wolf31o2@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: Unionfs (was: Re: [gentoo-catalyst] Keeping a test environment using catalyst)
Date: Wed, 25 May 2005 18:48:03
Message-Id: 1117046870.14290.181.camel@cgianelloni.nuvox.net
In Reply to: Re: Unionfs (was: Re: [gentoo-catalyst] Keeping a test environment using catalyst) by Paul Smith
1 On Wed, 2005-05-25 at 13:54 -0400, Paul Smith wrote:
2 > %% Chris Gianelloni <wolf31o2@g.o> writes:
3 >
4 > cg> I'm just curious why this needs to be done within the initrd, at
5 > cg> all. I guess it could be, but I could also see it working outside
6 > cg> the initrd.
7 >
8 > If you do it after initrd, you'll have to be very, very careful.
9 > "Outside" the initrd you've invoked the real init, and it's starting to
10 > bring up the system. If you haven't already set up the unionfs before
11 > that, you better be darn sure you do it immediately... if not you will
12 > have applications coming up with the wrong configs, failing because they
13 > can't write to /etc and/or /var, etc.
14
15 That's a good point. I was just thinking that by holding off until a
16 bit later, it allows us to have our full module list, rather than the
17 limited subset provided in the initrd.
18
19 Essentially, anything that we can use to boot a CD from, we can use as a
20 unionfs device. This would include IDE/SCSI/SATA/USB/Firewire devices.
21
22 > cg> Anyway, if we were to do it, we would allow for mounting a USB key
23 > cg> or other such device. Most likely, it would be via a
24 > cg> unionfs=/dev/$blah option, that would mount that device, along
25 > cg> with the CD, as a unionfs.
26 >
27 > Yes. I have this working right now, although it just uses a ramdisk
28 > today. Obviously using my current method, in order to use a keydisk or
29 > maybe even a file on a FAT partition which contains an ext2 partition
30 > and is mounted as a loop FS, you would need to add smarts to the initrd
31 > (linuxrc) to detect the hardware and mount those partitions.
32
33 Right. This would take more logic in the initrd.
34
35 > cg> One thing I probably would *not* do is make the entire CD a
36 > cg> unionfs, as I just think it would be a waste of energy and would
37 > cg> make troubleshooting much harder.
38 >
39 > I'm not sure what you mean by "not make the entire CD a unionfs"...? Do
40 > you just mean that some root directories would not link to the unionfs
41 > but instead would go to the cdrom? Or...?
42
43 Correct. I don't really see a point in having the entire CD be
44 writable. I can understand it for configuration directories and such,
45 but nobody really needs to write to /bin or /usr on a CD.
46
47 > cg> Things like /var, /etc, /root, and /home would definitely be cool
48 > cg> to not only be writable, but also survivable from a reboot.
49 >
50 > Yes, that's the ultimate goal of course.
51
52 --
53 Chris Gianelloni
54 Release Engineering - Strategic Lead/QA Manager
55 Games - Developer
56 Gentoo Linux

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies