- Oct 04, 2014
-
-
Ben Hutchings authored
-
Ben Hutchings authored
We need 'readlink -f' and 'mount -o defaults' to work. These were only implemented in klibc-utils in 2.0.4-1.2. Any busybox version should work, though. Closes: #762870 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
busybox sh and klibc dash have different default values for $PATH which could affect which could affect which commands we run later. klibc dash also does not export $PATH, and this means we fail to run fsck - it is executed indirectly through logsave, and logsave cannot find it. Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
The hwclock-set script needed another change to work with klibc. Also add '~' to allow for backports (though they are unlikely). Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
-
Ben Hutchings authored
-
Ben Hutchings authored
We need to be sure that the hwclock-set script will not set the clock a second time. Related-to: #763777 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
- Oct 03, 2014
-
-
Ben Hutchings authored
The panic function may be called from several places in the init script, not just at the end. In some cases, the calling function will retry an action when it returns; for example, booting with 'root=/dev/nonexistent panic=1' currently leads to an infinite series of error messages. In order to trigger a kernel panic reliably, we must use exit rather than return. Related-to: #751488 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
Closes: #763777 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
- Oct 02, 2014
-
-
nandhp authored
My root filesystem has label "/". Since creating the filesystem, I have realized that this is not the best choice of label, for it results in device names like '/dev/disk/by-label/\x2f'. However, I used to use labels only for convenience in my partition editor. (I believe this naming scheme used to be the default in RedHat.[1]) Yesterday, I switched to using labels in my fstab (LABEL=/ for the root filesystem). However, after rebooting, update-initramfs no longer works: $ sudo update-initramfs -u update-initramfs: Generating /boot/initrd.img-3.2.0-4-ixp4xx /dev/disk/by-label/x2f: No such file or directory mkinitramfs: for root /dev/disk/by-label/x2f missing disk/by-label/x /sys/block/ entry mkinitramfs: workaround is MODULES=most mkinitramfs: Error please report the bug update-initramfs: failed for /boot/initrd.img-3.2.0-4-ixp4xx with 1. $ The problem is that the `dep_add_modules` function in /usr/share/initramfs-tools/hook-functions uses the following routine to identify the root block device and its filesystem type: eval "$( mount | while read dev foo mp foo fs opts rest ; do \ [ "$mp" = "/" ] && [ "$fs" != "rootfs" ] \ && printf "root=$dev\nFSTYPE=$fs" \ && break; done)" and when presented with the following line from mount, /dev/disk/by-label/\x2f on / type ext3 (rw,relatime,errors=remount-ro,barrier=1,data=ordered) the routine fails for two reasons: 1) the call to read does not use the -r option, so the backslash is stripped, and 2) the device name is interpolated into the format string of printf (which turns \x2f into a literal /). I propose the following patch, which allows / to be used in disk labels (enabling me to rebuild my own initrd). However, some other special characters that could appear in disk labels, like apostrophe and space, will remain problematic -- a more complete patch might be desirable. I believe that version 0.115 is also susceptible to this problem, as it uses the same code to identify the root block device, but I have not tested it with non-alphanumeric disk labels.
-
Ben Hutchings authored
Closes: #729800 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
- Sep 30, 2014
-
-
Ben Hutchings authored
-
Ben Hutchings authored
-
Ben Hutchings authored
-
Ben Hutchings authored
Replacing $DEV with the output of readlink (no -f) doesn't work for relative symlinks or non-symlinks. udev generates relative symlinks in /dev/disk, so this just makes things worse. This reverts commit 9274e84f.
-
- Sep 28, 2014
-
-
Ben Hutchings authored
Currently sys_walk_modalias only looks for a modalias in the grandparent of the given device path. This doesn't match what the name 'walk' implies. sys_walk_mod_add calls it for each level of the device hierarchy, but since it only looks at the grandparent it will miss some modaliases, e.g. sd_mod or virtio_blk. We explicitly add sd_mod when we see any SCSI device, so we usually get away with this. However, virtio_blk is currently not added to a MODULES=dep initramfs if it is modular for the target kernel but built into the running kernel. Related-to: #760127 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
When a current kernel boots without an initramfs provided, it creates /dev/root on an empty initramfs and mounts that. There is no /dev/root on the running system, so we fail to find the real device. In that case, look up the root device in /proc/cmdline. Related-to: #760127 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
Check that readlink succeeds and that the block device exists, after eliminating the ubifs case. Related-to: #760127 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
- Sep 27, 2014
-
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
Look for uncompressed cpio headers and padding at the start of the initramfs image. If present, pass the initramfs directly to cpio and then try to decompress a second cpio archive after the padding. Closes: #717805 Signed-off-by:
Ben Hutchings <ben@decadent.org.uk> Thanks: Brett Parker <iDunno@sommitrealweird.co.uk> Thanks: Olivier Berger <olivier.berger@telecom-sudparis.eu>
-
Ben Hutchings authored
Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
Ben Hutchings authored
Currently we don't tell modinfo which kernel version to look at when checking which firmware files a module may need. It will default to the running kernel, not the one we're building the initramfs for. So we may not copy all the necessary firmware or we may provoke warnings in case a module doesn't exist in the running kernel. Signed-off-by:
Ben Hutchings <ben@decadent.org.uk>
-
maximilian attems authored
Just remove the canonicalise for now. Signed-off-by:
maximilian attems <maks@debian.org>
-
- Sep 25, 2014
-
-
Michael Prokop authored
-
Michael Prokop authored
If /etc/fstab contains "auto" for the file system we can't copy /sbin/fsck.auto since this doesn't exist. Instead rely on blkid reporting the according file system, or if that doesn't work keep setting to "auto" and don't copy the fsck binary but warn instead. In git commit 488d898e usage of /sbin/sulogin was introduced, accordingly install the binary in the initramfs. When trying to copy the according fsck binary, make sure the binary exists, otherwise the hook fails hard (e.g. during package install/upgrade). While at it fix usage of copy_exec "$link" vs copy_exec "$prog".
-
Michael Prokop authored
-
Roger Leigh authored
- Add empty /etc/fstab and symlink /etc/mtab to /proc/mounts; not essential, but quell a number of fsck warnings - Copy fsck and needed fsck helpers, plus logsave - Add checkfs function, based on the initscripts checkroot script - local mount functions will call checkfs prior to mounting the filesystem Rebased and dropped ETC support by Michael Prokop <mika@debian.org>
-
Roger Leigh authored
Canonicalise device names to match util-linux mount behaviour. This ensures that "mount -a" in mountall does not try to mount /usr a second time (which it will attempt if the mounted device does not match the canonical device name). This also fixes a longstanding annoyance with the output of mount and df using long UUIDs rather than short device names. Note that resolve_device may be called more than one; it's done during options parsing for ROOT, and again immediately prior to mounting. This is because during options parsing the device node does not exist, but we still need to construct a path into /dev from the LABEL or UUID. Rebased and ETC handling dropped by Michael Prokop <mika@debian.org>
-
Roger Leigh authored
Rebased by Michael Prokop <mika@debian.org>
-
rleigh@debian.org authored
-
rleigh@debian.org authored
-
rleigh@debian.org authored
-
rleigh@debian.org authored
-
rleigh@debian.org authored
This is generalising the root-specific functionality in init.
-
rleigh@debian.org authored
Based upon the initscript equivalent.
-
Roger Leigh authored
Rebased by Michael Prokop <mika@debian.org>
-
rleigh@debian.org authored
-
rleigh@debian.org authored
-
- Aug 31, 2014
-
-
Michael Prokop authored
-
Michael Prokop authored
-