Commit Graph

296 Commits

Author SHA1 Message Date
Michael Shigorin
d2f9abab39 20150227-alt1
- cdrom.c: minor fixup for "1, 2, 1 seconds" visual effect
- disk.c: slightly better "help me find my media" message
- probing.c: ensure sd_mod along with usb_storage
2015-02-27 01:47:23 +03:00
Michael Shigorin
ad2eef8cf7 probing.c: ensure sd_mod as well
There were cases when usb_storage and its dependencies
would be the only ones popping up in /proc/modules...
2015-02-27 00:48:19 +03:00
Michael Shigorin
3423067e72 disk.c: fix the broken suggestion wording
It was pidgin engrish in the first place and quite unhelpful
along the most common error path (lost race against boot media
leading to a moot offer to choose some fixed disk partition).
2015-02-27 00:48:04 +03:00
Michael Shigorin
f1244e8c76 cdrom.c: remove_wait_message() properly
...or a funny intermittent effect of "Waiting for 1 -> 2 -> 1 seconds"
within that window might appear.
2015-02-26 20:09:28 +03:00
Michael Shigorin
98cd251baf 20141217-alt1
- ldv@'s workaround for media detection race condition (closes: #30315)
2014-12-17 22:24:21 +03:00
542567af7b cdrom.c: workaround race conditions during media detection (ALT#30315) 2014-12-17 22:24:12 +03:00
Michael Shigorin
a1a557fa6f 20140815-alt1
- drop /proc/sys/kernel/hotplug check (OBSOLETE)
2014-08-16 04:37:24 +04:00
Michael Shigorin
592b6794c0 init.c: drop /proc/sys/kernel/hotplug check
The hotplug helper /sbin/hotplug is now officially deprecated.
The control file /proc/sys/kernel/hotplug has moved to
/sys/kernel/uevent_helper, but it is expected to be disabled
on most systems in favor of udev and the netlink interface.
	-- http://lwn.net/Articles/166954/ (2006)
2014-08-16 04:36:28 +04:00
Michael Shigorin
59a8301023 20140423-alt1
- digest check refactoring (ldv@)
2014-04-23 01:55:39 +04:00
3d63eecb8d tools.c: refactored verify_ramdisk_digest()
This consists of several changes at once:
- purged unneccessary variables;
- fixed variable and function types;
- more readable return values;
- improved error logging;
- optimized hash printout just in case.

The original version of this patch fixed an off-by-one
issue too (it's been committed separately now).
2014-04-23 01:45:56 +04:00
Michael Shigorin
f9326392c4 20140419-alt1
- initial stage2 digest check
2014-04-22 18:32:07 +04:00
Michael Shigorin
f3fe4de580 tools.c: fix off-by-one
Trailing \0 has to go somewhere; thanks ldv@ for the hint.
2014-04-22 18:32:07 +04:00
Michael Shigorin
c51df4c834 cdrom.c: slightly better "wrong hash" message
This should be marginally more readable.
2014-04-19 13:05:43 +04:00
Michael Shigorin
8d2cd5aec8 initial verify_ramdisk_digest()
This is a patch by Maxim Suhanov <suhanov/group-ib.ru>
aiming to provide integrity and authenticity check for
stage2 rootfs image when required:

- media bootloader passes sha256 hash of stage2 image;
- stage1 early userspace code (that is, propagator)
  checks the candidate files against that during search;
- existing file with different checksum results in a warning
  with a dialog to just say NO, continue searching for the
  proper squashfs image and have a look at that weird one;
- existing file with correct checksum results in booting
  as usual.

The check is triggered by "hash=..." kernel boot parameter.

See also http://www.forensicswiki.org/wiki/Forensic_Live_CD_issues
2014-04-19 12:49:58 +04:00
Michael Shigorin
6080f294e4 added SHA256 implementation (GPLv2+) 2014-04-19 12:49:48 +04:00
Michael Shigorin
fb8041a981 20140414-alt1
- optimize filesystem probing order (iso9660 first, ntfs last)
2014-04-14 21:54:05 +04:00
Michael Shigorin
e285a0fe47 disk.c: optimize filesystem probing order
ISO9660 is the expected image partition fstype now,
and NTFS is really the last thing to be probed
as it needs extra modules to be present in stage1.
2014-04-14 21:54:02 +04:00
Michael Shigorin
34faa35333 20130822-alt2
- rebuilt for Sisyphus
2013-11-06 20:35:36 +04:00
Sisyphus
edeef5c887 20130822-alt1
- don't panic of mkdir(2) if directory already exist
- init: fix trying mount devtmpfs into /dev
- support build with MUSL
2013-11-06 20:35:02 +04:00
Sisyphus
db43d06caf Makefile: add MUSL_LDFLAGS 2013-11-06 20:34:30 +04:00
Sisyphus
04cfc75266 init: simplify trying mount devtmpfs into /dev 2013-11-06 20:34:30 +04:00
Sisyphus
515053b74f init: fix trying mount devtmpfs into /dev 2013-11-06 20:34:30 +04:00
Sisyphus
267ca6e7d1 fix build warning
tools.c: In function 'splash_verbose':
tools.c:309:2: warning: implicit declaration of function 'spawn' [-Wimplicit-function-declaration]

stage1.c: In function 'spawn_splash':
stage1.c:165:2: warning: implicit declaration of function 'spawn' [-Wimplicit-function-declaration]
2013-11-06 20:34:30 +04:00
Sisyphus
6e000ec0e3 add missed includes 2013-11-06 20:34:30 +04:00
Led
1915f90346 add common mkdir_dev() and mkdirs_dev() funcs
mkdir_dev() use for create subdir with mode 0755 in /dev directory
and return success if subdir already exist.
mkdirs_dev() used mkdir_dev() for create multiple subdirs.
2013-11-06 20:34:29 +04:00
Sisyphus
13019baef2 cdrom.c: fix breaking strlen() 2013-11-06 20:34:29 +04:00
Sisyphus
83fd161329 Revert "cdrom.c: fixed thinko breaking strlen"
This reverts commit c998c9b406.
2013-11-06 20:34:29 +04:00
George V. Kouryachy (Fr. Br. George)
d0b4901c14 20130821-alt1
- switch back to nfsmount (mount.nfs fails on NFSv3)
2013-08-21 17:30:56 +04:00
Anton V. Boyarshinov
b05b5734e2 20130716-alt1
- ext4 support added
2013-07-16 17:39:52 +04:00
Anton V. Boyarshinov
b5573f97da ext4 filesystem support added 2013-07-16 17:39:08 +04:00
Michael Shigorin
608fa90730 20130316-alt1
- cdrom: probe sda1 before sda (see also #28289)
2013-03-16 00:54:53 +04:00
Michael Shigorin
c998c9b406 cdrom.c: fixed thinko breaking strlen
The misoptimization of the final commit version resulted
in strlen operating on a 5 char too short string thus
delivering "device names" like "/de" and "/de1".

Thanks yet another late colleague :)
2013-03-16 00:54:46 +04:00
Led
4d66f07d59 cdrom: primarily try mount first partition of hybrid image 2013-03-15 21:35:49 +02:00
Michael Shigorin
467eace834 20130315-alt1
- complete the /bin/plymouth existence check started in 20101130-alt6
2013-02-21 13:55:17 +02:00
Michael Shigorin
96da0337a6 check for /bin/plymouth before trying to run it
Essentially finished what gfd2a83d started; this is to avoid
"/bin/plymouth: No such file or directory" spam all over the place
when "splash" boot parameter is present but plymouth itself is absent.
2013-02-21 13:55:17 +02:00
Anton V. Boyarshinov
69550f5813 20130314-alt1
- rewrite net devices probing
2013-02-14 17:09:12 +04:00
Anton V. Boyarshinov
bab88d61a1 dynamic interafaces names list 2013-02-14 17:08:46 +04:00
Anton V. Boyarshinov
90008346be changelog order fixed 2012-11-12 17:21:21 +04:00
Anton V. Boyarshinov
c31cb588f3 Merge remote-tracking branch 'gears/sisyphus' into sisyphus
Conflicts:
	propagator.spec
2012-11-09 15:53:54 +04:00
Anton V. Boyarshinov
6210be0ac2 20121109-alt1
- use /sbun/mount.nfs instead of /bin/nfsmount
2012-11-09 15:39:11 +04:00
Anton V. Boyarshinov
9f547f5cb8 20121002-alt1
- no more initfs
2012-11-09 14:17:14 +04:00
Anton V. Boyarshinov
f66a824ee9 deleted: mkinitfs 2012-11-09 14:15:27 +04:00
Michael Shigorin
9f1e60314f 20101130-alt20
- kmod-10 still does, remade the workaround as a longer term one
2012-10-15 15:41:06 +03:00
Michael Shigorin
fef70f8de8 mkmodpack: kmod-10 still wants binary deplist
Hope upstream will finally do something about that --
either document the behaviour or fix it.
2012-10-15 15:39:27 +03:00
Michael Shigorin
b0b284d83a 20101130-alt19
- modprobe suddenly wants modules.dep.bin to exist
2012-08-13 21:17:55 +03:00
Michael Shigorin
a2d8a0be62 mkmodpack: kmod-9 de facto requires modules.dep.bin
Here's the culprit:

open("/lib/modules/3.4.7-std-def-alt1/modules.dep.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/modules/3.4.7-std-def-alt1/modules.dep.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/modules/3.4.7-std-def-alt1/modules.alias.bin", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
exit_group(1) = ?
+++ exited with 1 +++
[root@builder .in]# ls -l /lib/modules/3.4.7-std-def-alt1/modules.dep*
-rw-r--r-- 1 root root 370664 Jul 29 18:20 /lib/modules/3.4.7-std-def-alt1/modules.dep

Here's the typical result for mkimage:

ERROR: could not open directory /tmp/mkmodpack.sWzMWshm9Z/lib/modules/3.4.7-std-def-alt1: No such file or directory
FATAL: could not search modules: No such file or directory
mkmodpack: Failed to create modules dependencies.
2012-08-13 21:17:55 +03:00
Anton V. Boyarshinov
971e5275fb 20101130-alt18
- modprobe --list changed to find
2012-08-10 15:17:28 +04:00
Anton V. Boyarshinov
a109bc3706 mkmodpack: modprobe --list changed to find 2012-08-10 15:17:23 +04:00
Mikhail Efremov
797bfeeda6 20101130-alt17
- init: Use devtmpfs for /dev if possible.
2012-05-28 19:37:05 +04:00
Mikhail Efremov
f3240f3f36 init: Use devtmpfs for /dev if possible.
If devtmpfs already mounted into /dev (see CONFIG_DEVTMPFS_MOUNT
kernel option) then do nothing.
Otherwise try to mount devtmpfs or tmpfs.
2012-05-28 19:36:14 +04:00