FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 12-17-2011, 12:18 PM
Roger Leigh
 
Default Bug#652459: initramfs-tools: Please support mounting of /usr in the initramfs

Package: initramfs-tools
Version: 0.99
Severity: normal
Tags: patch

Hi,

In order to make the libraries and binaries in /usr available during
early boot, it would be desirable to be able to mount /usr in addition
to the rootfs inside the initramfs.

This patch implements a generic solution into two parts
1) Generation of /etc/fstab in the initramfs, including the rootfs
and all the filesystems desired to be mounted
2) In local mountroot(), rather than just mounting the rootfs, loop
over all mountpoints in /etc/fstab and mount them.

Note that this can replace the ROOT= option with the fstab entry alone,
though if set, ROOT= supercedes the root entry. If the host /etc/fstab
does not contain a root entry, a dummy one is generated to ensure that
the rootfs is always the first entry in the initramfs fstab. This
also means that the rootfs may be mounted with the options in
/etc/fstab.

This isn't intended to apply directly--it's more of a proof of concept.
I've tested the fstab generator; I haven't yet tested local mountroot().
Not being totally familiar with the initramfs internals, it might also
need:

- inclusion of modules for the additional filesystems
- ability to NFS mount filesystems other than the rootfs, i.e.
it might need nfsmount for local (not that this is a useful use
case)

Also note that the initramfs mount option (patch sent upstream) is not
yet in mount(8), and it would need to be before the option could be
used.


Regards,
Roger
 
Old 12-18-2011, 01:38 AM
 
Default Bug#652459: initramfs-tools: Please support mounting of /usr in the initramfs

On Dec 17, Roger Leigh <rleigh@debian.org> wrote:

> 1) Generation of /etc/fstab in the initramfs, including the rootfs
> and all the filesystems desired to be mounted
This is highly suboptimal, because it suddenly makes the initramfs not
generic anymore.
The initramfs should:
- mount / as usual
- look at the rootfs fstab
- mount /usr using the information from the rootfs fstab

> 2) In local mountroot(), rather than just mounting the rootfs, loop
> over all mountpoints in /etc/fstab and mount them.
If there is no need to mount file systems other than /usr, why do it?

> - ability to NFS mount filesystems other than the rootfs, i.e.
> it might need nfsmount for local (not that this is a useful use
> case)
More arguments to only mount what we strictly need.

> and other files to the root filesystem. It additionally permits
> mounting of /etc separately, thereby permitting it to be
> encrypted and/or writable while the root filesystem is
> unencrypted and/or read-only.
I do not believe that this is desireable, it is complex and would come
for free anyway by a / -> /usr move.

--
ciao,
Marco
 
Old 12-28-2011, 03:15 PM
Roger Leigh
 
Default Bug#652459: initramfs-tools: Please support mounting of /usr in the initramfs

On Sun, Dec 18, 2011 at 03:38:20AM +0100, Marco d'Itri wrote:
> On Dec 17, Roger Leigh <rleigh@debian.org> wrote:
>
> > 1) Generation of /etc/fstab in the initramfs, including the rootfs
> > and all the filesystems desired to be mounted
> This is highly suboptimal, because it suddenly makes the initramfs not
> generic anymore.
> The initramfs should:
> - mount / as usual
> - look at the rootfs fstab
> - mount /usr using the information from the rootfs fstab

The attached patch does this.

Note that the patch isn't complete; it won't mount an LVM VG because
it lacks the LV activation performed for the root in
"scripts/local-top/lvm2". I haven't included this in the patch
because I'm not sure of the best approach to take here.

Maybe it would make sense to make the existing scripts a bit more
generic, to permit setup of devices other than $ROOT? Maybe if the
scripts were idempotent, they could be invoked multiple times (once
per device)?

I didn't want to do this without discussing it with you, so hope the
patch is useful as a basis for a complete solution.

Regarding mounting of /etc; I think this would be useful in a number
of uncommon situations. I'll look at (separately) implementing an
--etc/etc= option similar to the existing root options which would
permit this to work, and keep the initramfs generic at the same time.
As for /usr above, having the ability to generically activate devices
other than $ROOT would also be useful here.


Regards,
Roger

--
.'`. Roger Leigh
: :' : Debian GNU/Linux http://people.debian.org/~rleigh/
`. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/
`- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
 

Thread Tools




All times are GMT. The time now is 07:03 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org