Gentoo Archives: gentoo-catalyst

From: Paul Smith <psmith@××××××.com>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] How is initrd built?
Date: Thu, 07 Jul 2005 22:39:42
Message-Id: vpdrirzmxmuf.fsf@lemming.engeast.baynetworks.com
In Reply to: Re: [gentoo-catalyst] How is initrd built? by Eric Edgar
1 %% Eric Edgar <rocket@g.o> writes:
2
3 ee> Initramfs are also different in that they no longer pivot_root and
4 ee> then chroot. You can just chroot directly. The differing code is
5 ee> to handle this behavior difference. Ultimately its much simpler
6 ee> than worrying about the pivot root.
7
8 OK, this is good stuff to know.
9
10 Thanks!
11
12 >> a) Mount it in /unionfs/mnt/cdrom in the first place, not in
13 >> /newroot/mnt/cdrom. By the time we mount the cdrom we already have
14 >> a /union filesystem created and working.
15 >>
16 >> OR
17 >>
18 >> b) Try to "mount --move" it from /newroot to /union once the unionfs is
19 >> set up.
20
21 ee> I would lean toward --move if it works, but it will need to be tested.
22
23 Unfortunately I can't get it working. First, the mount in busybox
24 doesn't have a --move option. Looking at the mount applet code, it
25 appears as though they support the move option as "mount -o move .. ..",
26 however, that doesn't work for me when I try it:
27
28 mount -o move /newroot/mnt/cdrom /union/mnt/cdrom
29
30 complains that the first filename is not a block device, which it isn't
31 and shouldn't be: the move operation takes two mounted filesystems
32 (according to man mount). So, I don't know whether this is a bug or what.
33 I'm going to check the busybox mailing list.
34
35
36 I was able to mount the cdrom twice, in both directories at the same
37 time. Of course, I can't unmount /newroot/mnt/cdrom because it's held
38 there to provide the squashfs, but at least the cdrom is visible after
39 the chroot/during boot time.
40
41
42 If mount --move (or equivalent) can't be made to work, it seems the only
43 alternative is to mount it in $CHROOT instead of $NEW_ROOT, right from
44 the start.
45
46 ee> Alot of this unionfs code is an after thought and so it was
47 ee> implemented in such a way that it was minimally impacting to the
48 ee> normal booting method. Overtime I hope to have things cleaned up
49 ee> as we discover issues and/or convert entirely to this boot method.
50
51 Yep, understood.
52
53
54 So, the next problem is that after the init is done and the system
55 starts to boot, various things fail because /etc/fstab is empty.
56
57 I don't see anywhere in the "normal" boot process that /etc/fstab is
58 built... am I missing something? Is it as simple as "cp /proc/mounts
59 $CHROOT/etc/fstab"?
60
61 --
62 -------------------------------------------------------------------------------
63 Paul D. Smith <psmith@××××××.com> HASMAT--HA Software Mthds & Tools
64 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
65 -------------------------------------------------------------------------------
66 These are my opinions---Nortel Networks takes no responsibility for them.
67 --
68 gentoo-catalyst@g.o mailing list

Replies

Subject Author
Re: [gentoo-catalyst] How is initrd built? Paul Smith <psmith@××××××.com>
Re: [gentoo-catalyst] How is initrd built? Chris Gianelloni <wolf31o2@g.o>