Hi folks,

Following on from previous discussion about this, I've been working on
the needed changes to initramfs-tools, initscripts and util-linux, and
it's now at the point where it's ready for wider testing and review.

  ** Note: do NOT test on a production system. **

While I've tested good number of scenarios, I can't guarantee it works
under all circumstances, so it does need testing on a wider range of
systems.  I have tested local ext4 filesystems and NFS, but other
filesystem types would be very useful to test, as would LVM/MD etc.
Testing whether you can mount an encrypted /etc is also needed--this
was added so that you don't need to encrypt the whole rootfs.  Testing
that it also works with alternative boot scripts like "live" is also
important.


All the needed packages are available from here:
  http://people.debian.org/~rleigh/usrmount/

Feedback:
  Any feedback is best directed to #652459

  And any patches for initramfs-tools can be based on
    git://anonscm.debian.org/users/rleigh/initramfs-tools.git (branch usrmount)
    
http://anonscm.debian.org/gitweb/?p=users/rleigh/initramfs-tools.git;a=shortlog;h=refs/heads/usrmount


Setting up:
  Install at a minimum: initscripts, util-linux, initramfs-tools

  The initramfs can fsck and mount /, /usr and /etc.  / and /etc
  are configured using the kernel command-line.  The details for
  /usr are obtained from /etc/fstab on the rootfs.

  You shouldn't need to make any configuration changes at this
  point; it is intended that it should work with any existing
  setup.

  After you've tested it to make sure it works, you could try
  copying /etc to a separate volume and mounting it with
  "etc=UUID=..." or "nfsetc=host:path etc=/dev/nfs" for NFS if
  that's of interest.

Testing:
  Reboot.  You should see the rootfs (and /usr, if in fstab)
  fscked and mounted prior to init starting.  You can add the
  "fastboot" (skip) "forcefsck" and "fsckfix" options to the
  command-line to change the fsck behaviour.

  Add break=bottom to the kernel command-line, and look in /sbin;
  you should have fsck and the needed mount helpers for your
  filesystem.

  After boot, have a look at the mount order with mount:

    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
    proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
    udev on /dev type devtmpfs 
(rw,relatime,size=10240k,nr_inodes=126766,mode=755)
    devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=102668k,mode=755)
    /dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
    /dev/sdb1 on /usr type ext4 (rw,relatime,data=ordered)
    tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
    tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=385540k)

  Notice that both / and /usr precede the /run/lock and /run/shm
  filesystems mounted in early boot, verifying that they were indeed
  both mounted in the initramfs.  If /usr was mounted normally, it
  would have appeared last.  [We now also canonicalise the UUID=
  and LABEL= options so it doesn't mess up the mount/df output and
  is also compatible with the system mount(8).]

Things which might break:
  Modules needed to mount non-rootfs filesystems aren't currently
  handled specially.  It may be the case that for esoteric setups
  we don't have the module installed in the initramfs.

  We copy the filesystem-specific fsck helper from /sbin.  If
  additional files are needed by particular helpers, they might
  need special-casing.


Any comments would be gratefully received.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux    http://people.debian.org/~rleigh/
 `. `'   schroot and sbuild  http://alioth.debian.org/projects/buildd-tools
   `-    GPG Public Key      F33D 281D 470A B443 6756 147C 07B3 C8BC 4083 E800


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130512183443.gg21...@codelibre.net

Reply via email to