819 Commits

Author SHA1 Message Date
Michael Tokarev
ec83abdfdc mkinitramfs: No need to warn about md-root busybox dep.
don't warn about md-root need busybox: it doesn't anymore.
We believed mdadm needs busybox in initramfs, but it has been fixed long ago.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:34:11 +02:00
Roger Leigh
20c43ceb10 init: Don't use "none" as a mount fsname
When mounting kernel filesystems and tmpfs filesystems, "none" is
unsuitable as the filesystem name.  This is because it causes
breakage when /etc/mtab is a symlink to /proc/mounts.  This is needed
so that we can switch /etc/mtab to be a symlink when util-linux is
updated to use libmount (#620710).

When /etc/mtab is a file updated by mount, the initscripts
mountkernfs.sh, mountdevsubfs.sh and mtab.sh initialise the mtab at
boot using values other than "none".  For example, /proc uses "proc",
/dev/pts uses "devpts" and /sys uses "sysfs".  The mtab entries are
created from defaults, plus any user customisations added to
/etc/fstab.

When /etc/mtab is a symlink to /proc/mounts, the values set when the
filesystems were mounted by init in the initramfs are now visible, and
these differ from values in /etc/fstab.  The initscripts are now no
longer able to update the mtab file, and this causes problems mounting
local filesystems.

The most visible issue is /proc.  The default fstab entry is:
  proc            /proc           proc    defaults        0       0
while init is using
  mount -t proc -o nodev,noexec,nosuid none /proc
rather than
  mount -t proc -o nodev,noexec,nosuid proc /proc
which results in "mount -a" failing with an exit code of 32 (mount
failure).  While altering "proc" to "none" in the fstab file corrects
this boot failure, this is present by default in the fstab file of
every installed system, and so is not easy to update.  Additionally,
the /dev/pts and /sys mounts may also have been added using the
"devpts" and "sysfs" names, and so these should ideally also be
corrected to use these names in the initramfs.  This behaviour may be
easily verified by changing the fsname for /proc in /etc/fstab and
checking the exit status of "mount -a".

I also fixed an inconsistency in the udev /dev fsname.  It might use
"none" or "udev"; it now always uses "udev".

Closes: #603858
Reported-by: Goswin von Brederlow <goswin-v-b@web.de>
Signed-off-by: Roger Leigh <rleigh@debian.org>
[ fixes bug in old initscripts barking on 'none' fsname. -maks ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:33:02 +02:00
rleigh
4d08c2ee59 init: sync mount options with the defaults in initscripts
This bit syncs the mount options with the initscripts defaults, but
most importantly the s/none/tmpfs/ makes the initscripts mount checks
not mount a second tmpfs on /run, obscuring the one from the initramfs.
domount() checks for already mounted filesystems to guard against
mounting an already mounted filesystem.  But it mounts all tmpfs
filesystems with "tmpfs" as mnt_fsname, and having this as "none"
breaks that check, leading to a second tmpfs mount.  Please could you
do the s/none/tmpfs whether or not you also pick up the mount defaults
changes, which are optional (we remount with the user-defined options
later).

Note that the nodev option was removed, because it's currently
required on some systems by /etc/init.d/checkroot.sh (it uses
mknod /dev/rootdev to get a device node to mount /root).  I hope
that we can remove this at some point, but for now mounting /run
with nodev will cause some systems to break.  It also mounts with
noexec, since this is potentially needed for some uses of /dev/shm.
Again, I hope we can remove it, but it will need testing whether
or not exec perms are needed to map with PROT_EXEC on current
kernels.

WRT these mount options, I aim to get initscripts to remount /run
with options from /etc/fstab or /etc/default/tmpfs which will
allow the system to be configured to use more restrictive mount
options after boot, should the admin choose.  And, depending upon
the configuration, we may be able to automatically determine if
stricter permissions are possible (e.g. /run/shm is a separate
mount, so noexec is safe to use).  So this patch uses the options
we know are safe, and initscripts can tighten them up later, if
possible.  This remounting with user-specified options will apply
to all filesystems mounted in mountkernfs/mountdevsubfs.

Closes: #621803

Signed-off-by: rleigh <rleigh@codelibre.net>
Tested-by: Tollef Fog Heen <tfheen@err.no>
Tested-by: Michael Biebl <biebl@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:31:45 +02:00
rleigh
10990abc34 init: Preserve state on old boxes without /run on rootfs
If /run is not present on the rootfs, instead of losing the /run/udev from the
initramfs, we move it to /dev/.udev:

This is against initramfs-tools branch maks/run.  This preserves historical
behaviour, and will make udev/lvm work correctly during the transitional
period, i.e. the state is kept in the same place it always has been.  Once
you install a new initscripts which puts a /run on the rootfs, the udev
state will stay in /run.  So this caters for either possibility.

Signed-off-by: rleigh <rleigh@codelibre.net>
[ shorten comments -maks ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:31:38 +02:00
Christian Hofstaedtler
e34eca4e16 init: move /proc after moving other filesystems
If we move filesystems after moving /proc to the new root,
mount will complain because /proc/mounts is no longer there.

Signed-off-by: Michael Prokop <mika@debian.org>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:31:32 +02:00
maximilian attems
74109b9f2f init: No need to touch /dev/.initramfs
No usage anymore, back in the days udev used it to know
that it is run in initramfs.

Now the /dev/ should be free of initramfs-tools created dirs and files.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:31:26 +02:00
maximilian attems
5add33355a initramfs-tools: init mount /run tmpfs
The purpose is to have a persisent directory from boot on.

Also migrate our debug log to /run:
Use /run/initramfs and not /dev/.initramfs

This was a private dir with no good outside usage
(usplash is gone, /etc/init.d/rc mentions progress bar).
live-initramfs needs to use /run/initramfs for uninofs-fuse.

If the rootmnt has no /run dir care to umount the dir in order
to not confront user with mount move errors.
This leeds to debug info loosage, which is considered ok.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:31:18 +02:00
maximilian attems
259ad0934b mkinitramfs: creat /run initramfs directory
This will allow us in further patches to migrate away from
fugly /dev/.initramfs directories.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Christian Hofstaedtler <ch@grml.org>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-05-11 23:30:47 +02:00
Michael Prokop
bedf1e3c08 Use -8 for compression with xz.
The -9 consumes mem and takes quite long and doesn't save
really that much. A small benchmark of different compression
options gave the following result:

  -5: 12570036 bytes; 1:01.40 runtime
  -6: 12507864 bytes; 1:04.63 runtime
  -7: 12441428 bytes; 1:07.09 runtime
  -8: 12381060 bytes; 1:09.77 runtime
  -9: 12346124 bytes; 1:20.74 runtime

So -8 should be a sensible default both for time and space matters.

Signed-off-by: Michael Prokop <mika@debian.org>
Reviewed-by: maximilian attems <max@stro.at>
2011-05-11 14:18:34 +02:00
Michael Prokop
332393057e Use --check=crc32 option for xz compression.
xz uses crc64 per default as checksum though xz embedded only
supports crc32.

Without the crc32 check the kernel will fail with:

| Initramfs unpacking failed: Input was encoded with settings that
| are not supported by this XZ decoder

More details in Documentation/xz.txt, section "Notes on compression options".

Thanks: Ulrich Dangel <mru@grml.org>
Signed-off-by: Michael Prokop <mika@debian.org>
Reviewed-by: maximilian attems <max@stro.at>
2011-05-11 14:17:17 +02:00
maximilian attems
f5afa6a6f3 mkinitramfs: Add lib search path + run full ldconfig in initramfs
Allmost directly taken from dracut.
Do it also at a late stage when everything is on initramfs.

It should fix boot on a box where the lvm library was searching for a
libgcc, which was on the initramfs but not in the lib search path.

Ubuntu got hit similarly:
"We had a rather obscure Ubuntu bug
(https://bugs.launchpad.net/bugs/728611) which presented as Plymouth not
being able to display text at boot time, which of course is nasty in
cases where the user needs to answer a prompt in order for boot to
complete.  This turned out to be restricted to configurations where
Plymouth is built into the initramfs, so I chased this down.

The problem is that /lib/plymouth/label.so now transitively links to
libGL, which (on Ubuntu, at least) lives in /usr/lib/mesa/libGL.so.1 or
some other subdirectory of /usr/lib depending on the GL implementation
in use (fglrx, nvidia, etc.).  This directory isn't on the linker's
default search path; instead, it relies on /etc/ld.so.cache having been
built appropriately from a configuration including
/etc/ld.so.conf.d/GL.conf, which is managed by update-alternatives.  The
thing that's going wrong here is that /usr/lib/mesa/libGL.so.1 is copied
into the initramfs, but it isn't on the linker's search path so
/lib/plymouth/label.so fails to load."  -cjwatson

Closes: #612633, #619670
Reported-by: Benedikt Spranger <b.spranger@linutronix.de>
Tested-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <max@stro.at>
Reported-by: Colin Watson <cjwatson@ubuntu.com>
[ code readability fixes -mika ]
Signed-off-by: Michael Prokop <mika@debian.org>
2011-03-30 11:54:43 +02:00
maximilian attems
8f8299d9ba mkinitramfs: copy over on build instead of using symlink tree
This facilitates mkinitramfs building.
It is intended as fix for the not possible ldconfig run inside
the symlink tree. It should also allow to cleanup the copy_exec() mess.

This also allows to no longer shipp duplicate busybox copies in
initramfs. dracut does it also. The symlinking was thought as
speed gain by jbailey, but I'm less then conviced it is worth it.

Also specify to cpio that the files should be owned by root.

In retrospect this really similar quasi a fowarded ported patch by
 Michal Schmidt <xschmi00@stud.feec.vutbr.cz>

Closes: #338405, #506540
Signed-off-by: maximilian attems <max@stro.at>
Tested-by: Benedikt Spranger <b.spranger@linutronix.de>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:54:26 +02:00
Ben Hutchings
43fe8e6f84 update-initramfs: Remove support for 'do_bootloader' and specific boot loaders
elilo, lilo, and zipl all install post-update hooks for us, so we
don't need call them specifically.  Unfortunately, flash-kernel does
not yet, so keep that for a little longer.

Add 'breaks' relations to the versions of these packages that do not
install post-update hooks.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:43:21 +02:00
Ben Hutchings
7866542a5d update-initramfs: Depend on kernel hook scripts rather than $ramdisk invocation
Official Debian and Ubuntu kernel packages will invoke us directly as
part of the $ramdisk handling inherited from kernel-package.  They
will later run our hook script, as will custom packages made with
'make-kpkg' or the upstream 'make deb-pkg'.

Currently, for official packages we perform an update on the first
invocation (possibly deferred using dpkg triggers) and then ignore the
second.  However, the long-term plan is to remove that first
invocation.  Therefore, ignore the first invocation and perform the
update on the second.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[ Use && op, we make the effort to not use -a evaluation. -maks ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:43:13 +02:00
Ben Hutchings
58ee42c5eb kernel hooks: Enable error-exit (sh -e)
We should not continue after a command unexpectedly fails.

Change the $INITRD test so that failure is not treated as unexpected.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:43:03 +02:00
Ben Hutchings
c018886f4f kernel hooks: Treat missing version argument as an error
The version argument is mandatory and we should complain if some package
doesn't pass it rather than quietly failing to do our job.

However, making package removal fail is generally unhelpful, so
continue to return 0 from the postrm hook.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[ Prefix new warnings as of 3a02c6f37d with W: -maks ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:42:34 +02:00
Evan Broder
ad1a59456b initramfs-tools: Fix handling of numeric root= arguments to be udev-friendly
If you pass a root= argument with a numeric device number
(i.e. root=0806), that's currently resolved by running mknod to create
a /dev/root device with an appropriate major/minor number and setting
ROOT=/dev/root (the parse_numeric function in scripts/functions).

However, this /dev/root device is completely unknown to udev. On
Ubuntu, this leads to problems because we use udev to wait for the
root device to appear. Since /dev/root isn't in udev's database, the
boot hangs forever (well, it hangs until rootdelay passes).

udev's standard configuration creates /dev/block/N:N symlinks for
every block device in its database (see the first non-comment line of
/lib/udev/rules.d/50-udev-default.rules). Setting ROOT to the
/dev/block/N:N symlink instead of creating a new /dev/root device and
setting ROOT to that solves Ubuntu's problem.

See https://bugs.launchpad.net/bugs/576429 for more discussion.

I think I actually want to take a different approach in order to
maintain the current semantics of setting root=X:Y.

In particular, if the user passes in a value that has a prefixed 0,
that will get passed directly to mknod, which would treat the number
as octal. So root=010:0 would actually create a device with major
number 8. Instead of trying to resolve this directly, we can use the
shell's arithmetic expansion to get a decimal number back.

Closes: #606806

[ change condition from specific udev script to udevd availability. ]
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:35:20 +02:00
maximilian attems
3d44bfb8a2 hidden_dep_add: Use mika's variadic function from $2 on
Thanks to mika for showing a shell version of a variadic function.
Use it from the initial step on.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:32:39 +02:00
Michael Prokop
465a5f166d hidden_dep_add_modules(): make it dynamically to support more than 3 arguments as well 2011-03-30 11:32:17 +02:00
maximilian attems
17296ff7ff dep_add_modules: Use hidden_dep_add_modules for ubifs
ubifs is another case where the module deps aren't properly
declared or detectable by modulde-init-tools. Thus use the new
hidden_dep_add_modules().

One could go farer and maybe cleanup the ubi category in
auto_add_modules(), this is currently left out.

Reported-by: Loïc Minier <lool@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-03-30 11:32:17 +02:00
maximilian attems
e789cdd67b maintainer-notes: Use git dch --multimaint-merge on examples
No point in linking to the resolved bug, just use the git
buildpackage feature, which landed in time for squeeze.

Also fix a parsing, where the `v' prefix of the git tags was forgotten.
Remove protective parenthesis around id-length and use meta there not
full.

While at it s/stable/oldstable/ for git-core package.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-30 11:30:24 +02:00
maximilian attems
7ff2998ed9 debian/copyright: Update authorlist and year attribution
List the top 6 commiters of the initramfs-tools git repo.
Update the year attribution, also pay attention to current maintainers.
No point in listing people that didn't contribute really in a
significant way.

The cut off of the best 6 is quite arbitrary. It just happens to be
that those have each more then 5 commits / person and thus can be
seen as significant contributors.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-27 21:13:50 +02:00
maximilian attems
5f53d3ba4b init: load netconsole after loading network drivers
"Taking netconsole parameters from the kernel command line is a neat
feature, but you can't load it before the network drivers."

Do it the earliest possible aka after udev in init-top and
after the modules loading.

Closes: #596742

Reported-by: Ferenc Wagner <wferi@niif.hu>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-27 21:12:08 +02:00
maximilian attems
0ed63769d4 initramfs-tools: add hid_sunplus to listed keyboard drivers
It seems to be a common one and is included in dracut after IRC request.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-03-27 21:10:50 +02:00
Timo Juhani Lindfors
2525b00812 initramfs-tools: Inform the user about reboot on panic=
Currently if a system administrator uses "panic=60 break=top" boot
options initramfs prints

Spawning shell within the initramfs

but does not actually spawn the shell since panic= disallows
that. This patch explicitely informs the user about the reboot and
hints that by reminving panic= he/she can get break= debugging to
work.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
[ small wording change -maks ]
Signed-off-by: maximilian attems <max@stro.at>
2011-02-28 11:24:44 +01:00
Timo Juhani Lindfors
871ffe7aef initramfs-tools: Make panic message visible even if panic= is used
The purpose of panic= is to make the system reboot automatically on
panic but also give the interactive user some time to see what went
wrong.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: maximilian attems <max@stro.at>
2011-02-28 11:22:41 +01:00
maximilian attems
08d4895152 initramfs-tools: Remove mkinitramfs-kpkg
This is an unused old mkinitramfs wrapper.
These days update-initramfs is to be called.

No point in keeping that old thing around, as it shouldn't be used
anymore since Lenny.

Closes: #502792
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-23 18:12:38 +01:00
maximilian attems
6cab0eccd0 initramfs-tools: cleanup any usplash traces
usplash is not released in Squeeze and is no longer in Debian unstable.
Thus nuke usplash calls and any ref to it.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-23 18:08:53 +01:00
maximilian attems
f5b834764b hook-functions: Cleanup ref to ide-disk
These days since 2.6.28 or such ide-disk is an alias of gd_mod
thus no point in trying to add it too.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-23 18:07:34 +01:00
maximilian attems
78cdb26a25 mkinitramfs: Add support for xz compression.
Also add info to relevant config file.

Reference: <20110216144546.GA20971@dali>
Reported-by: trentbuck@gmail.com
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-22 10:10:23 +01:00
maximilian attems
8e2ffcdd3b postinst cleanup very old dpkg trigger comparison.
Remove comparison with dpkg that is older than lenny.
Any recent dpkg provides proper trigger and no point in guarding against
that specific Ubuntu dpkg dev version that was buggy as no distro
released with it.

update-initramfs anyway guards and checks for a postitive
`dpkg-trigger --check-supported`.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-22 09:59:07 +01:00
maximilian attems
3c717fa072 initramfs-tools: preinst use blkid for uuid generation if around.
Prefer blkid over vol_id. I was tempted to nuke vol_id,
but vol_id has been around for long and shouldn't be rm'ed on first
occasion. Add note to do so.

Wondering why this bug is not fatal, but it seems Debian Installer
generates that file too.

Closes: #609964
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-22 09:52:11 +01:00
maximilian attems
ec6a77f9dd doc: s/ressources/resources/
Reported-by: Uwe Kleine-König <ukleinek@strlen.de>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-22 09:50:57 +01:00
maximilian attems
59f9c1e2f9 mkinitramfs: Nuke MIN_VERSION handling.
This needs to be expressed in terms of package dependencies,
no point in keeping that old hack. Supporting special initramfs
arch bugs in the time between 2.6.12 and 2.6.15 is not worth.

Nowadays this check succeeds anyway.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-17 16:42:36 +01:00
maximilian attems
5b84e5b6ba maintainer-notes.html: Fix email to send patches to.
The wanted email address is and not the qa alias:
"Mails sent to the maintainer through the *@packages.debian.org email
aliases."

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-17 16:38:20 +01:00
maximilian attems
ce45cd038c update-initramfs: Show the mkinitramfs on error message.
Users just sometimes quote the message, it is already useful
to get the error code.

Signed-off-by: maximilian attems <max@stro.at>
Reviewed-by: Michael Prokop <mika@debian.org>
2011-02-17 16:36:09 +01:00
Gianluigi Tiesi
9c25269f3f mkinitramfs: misleading message in verbose mode (gzip not found, using gzip)
due to a script assignment misplacement mkinitramfs displays a misleading message:

No gzip in /usr/bin:/sbin:/bin, using gzip

instead of

No lzma in /usr/bin:/sbin:/bin, using gzip

this makes difficult to known that it needs lzma executable in the path
(I tought xz instead)


Closes: #611046
Signed-off-by: maximilian attems <max@stro.at>
2011-02-17 16:32:48 +01:00
maximilian attems
a2758cbcf8 Merge branch 'squeeze' 2011-02-09 22:52:36 +01:00
maximilian attems
5e31482af3 Releasing version 0.98.8.
Signed-off-by: maximilian attems <max@stro.at>
v0.98.8
2011-01-28 15:14:51 +01:00
maximilian attems
17f799aad4 mkinitramfs: Fix noexec /tmp detection for long device names
The parsing goes wrong as the output ends in multiline:

 ~#df /tmp
 Filesystem           1K-blocks      Used Available Use% Mounted on
 /dev/mapper/buildServer--1-tmp
                         4805760    142028   4419612   4% /tmp

Use POSIX output format as suggested by Ian.

Closes: #608865
Thanks: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-01-28 15:08:54 +01:00
maximilian attems
ca4d08a3d7 mkinitramfs: Fix noexec /tmp detection for long device names
The parsing goes wrong as the output ends in multiline:

 ~#df /tmp
 Filesystem           1K-blocks      Used Available Use% Mounted on
 /dev/mapper/buildServer--1-tmp
                         4805760    142028   4419612   4% /tmp

Use POSIX output format as suggested by Ian.

Closes: #608865
Thanks: Ian Campbell <ijc@hellion.org.uk>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-01-28 15:06:52 +01:00
Ben Hutchings
78d9e048c1 initramfs-tools: Handle hidden dependency of libcrc32c on crc32c
'depmod' only looks at symbol dependencies; there is no way for
modules to declare explicit dependencies through module information,
so dependencies on e.g. crypto providers are hidden.  Until this is
fixed, we need to handle those hidden dependencies.

This affects btrfs root.

Closes: #608538
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-01-28 15:06:36 +01:00
Ben Hutchings
7293849041 initramfs-tools: Handle hidden dependency of libcrc32c on crc32c
'depmod' only looks at symbol dependencies; there is no way for
modules to declare explicit dependencies through module information,
so dependencies on e.g. crypto providers are hidden.  Until this is
fixed, we need to handle those hidden dependencies.

This affects btrfs root.

Closes: #608538
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-01-28 15:05:33 +01:00
maximilian attems
67c1d3290f initramfs-tools: MODULES=dep fix for ubifs /
Similar to #582858, however for me it still does not work
with symlinked /etc/mtab to /proc/mounts.

---- contents of /proc/mounts ----
rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw,relatime 0 0

Tighten the regex not to match ^/dev/ but not to match the
rootfs entry while also checking for the `/' root entry.

Also fix the FSTYPE entry to look for the correct field in
/proc/mounts even if not used later.

Closes: #608339
Reported-by: Alexander Clouter <alex@digriz.org.uk>
Tested-by: Alexander Clouter <alex@digriz.org.uk>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-01-06 15:58:04 +01:00
maximilian attems
d49e87a279 initramfs-tools: MODULES=dep fix for ubifs /
Similar to #582858, however for me it still does not work
with symlinked /etc/mtab to /proc/mounts.

---- contents of /proc/mounts ----
rootfs / rootfs rw 0 0
ubi0:rootfs / ubifs rw,relatime 0 0

Tighten the regex not to match ^/dev/ but not to match the
rootfs entry while also checking for the `/' root entry.

Also fix the FSTYPE entry to look for the correct field in
/proc/mounts even if not used later.

Closes: #608339
Reported-by: Alexander Clouter <alex@digriz.org.uk>
Tested-by: Alexander Clouter <alex@digriz.org.uk>
Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2011-01-06 15:57:05 +01:00
maximilian attems
02349ff63b Releasing version 0.98.7
Signed-off-by: maximilian attems <max@stro.at>
v0.98.7
2010-12-20 12:59:42 +01:00
maximilian attems
78337a4ad0 MODULES=dep Fix partitioned raid setup
Specific setup has md0: unpartitioned RAID1 with /boot;
md1: partitioned RAID10f2 with root fs on /dev/md1p3

/sys walk needs to ignore the partition to derive the needed modules.
linux-2.6 feature since 92850bbd71228730c80efd491e7427650188d359,
aka since long..

[ Fixed for partitions > 9, tested bash, dash, zsh, mksh + 'busybox sh'

-- test script
test_arg() {
  root="$1" ; should="$2"
  is=$(echo ${root%%p[0-9]*})

  if ! [ "$is" = "$should" ] ; then
    printf "Expression %s failed (is %s but should be %s).\n" "$root" "$is" "$should"
    return 1
  fi
}

test_arg 1     1
test_arg 1p1   1
test_arg 10    10
test_arg 10p1  10
test_arg 10p10 10
test_arg 1p2b  1
--

-mika ]

Closes: #605824
Tested-by: Cestmir <ch1@freeside.sk>
Signed-off-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2010-12-20 12:54:06 +01:00
maximilian attems
82b04966cf MODULES=dep Fix partitioned raid setup
Specific setup has md0: unpartitioned RAID1 with /boot;
md1: partitioned RAID10f2 with root fs on /dev/md1p3

/sys walk needs to ignore the partition to derive the needed modules.
linux-2.6 feature since 92850bbd71228730c80efd491e7427650188d359,
aka since long..

[ Fixed for partitions > 9, tested bash, dash, zsh, mksh + 'busybox sh'

-- test script
test_arg() {
  root="$1" ; should="$2"
  is=$(echo ${root%%p[0-9]*})

  if ! [ "$is" = "$should" ] ; then
    printf "Expression %s failed (is %s but should be %s).\n" "$root" "$is" "$should"
    return 1
  fi
}

test_arg 1     1
test_arg 1p1   1
test_arg 10    10
test_arg 10p1  10
test_arg 10p10 10
test_arg 1p2b  1
--

-mika ]

Closes: #605824
Tested-by: Cestmir <ch1@freeside.sk>
Signed-off-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2010-12-20 12:44:44 +01:00
Aad dame
1caecd26c4 initramfs-tools: Fix MODULES=dep on an AOE device
console=ttyS0,115200 root=/dev/etherd/e0.1p1

Problem Description:
root@squeezeserver:/usr/share/initramfs-tools# mkinitramfs -o /tmp/foo
mkinitramfs: for root /dev/etherd/e0.1p1 missing etherd/e /sys/block/ entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug

Closes: #607509

Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2010-12-20 10:20:10 +01:00
Aad dame
fffd3a22f3 initramfs-tools: Fix MODULES=dep on an AOE device
console=ttyS0,115200 root=/dev/etherd/e0.1p1

Problem Description:
root@squeezeserver:/usr/share/initramfs-tools# mkinitramfs -o /tmp/foo
mkinitramfs: for root /dev/etherd/e0.1p1 missing etherd/e /sys/block/ entry
mkinitramfs: workaround is MODULES=most
mkinitramfs: Error please report the bug

Closes: #607509

Reviewed-by: Michael Prokop <mika@debian.org>
Signed-off-by: maximilian attems <max@stro.at>
2010-12-20 10:14:04 +01:00