Commit Graph

363 Commits

Author SHA1 Message Date
Michael Shigorin
5ac5f51125 tools.c: get rid of a useless nested function
I don't understand who and why did that in the first place; undo it.
2017-03-18 22:49:14 +03:00
Michael Shigorin
1dcfd5ccb7 20161226-alt1
- probing.c: bump max disk number from 50 to 250 (closes: #32934)
2016-12-26 14:48:14 +03:00
Michael Shigorin
470ad34dd4 probing.c: bump max disk number from 50 to 250
This limit has become problematic with 60 drives apparently;
let's hope 250 is enough for some time...

Fixes: https://bugzilla.altlinux.org/32934
2016-12-26 14:46:54 +03:00
Michael Shigorin
ee79cfe0d3 20161024-alt2
- disk.c: retry uuid/label based autodetection upon a pause
  if the first attempt has failed (e.g. flash not ready yet)
2016-10-24 21:44:37 +03:00
Michael Shigorin
0547f60638 disk.c: added kludge against premature failure
This hardcoded pause is ugly indeed but forcing users
into wondering what goes on behind bootsplash *sometimes*
(depending on usbflash controller type *and* state) is worse.

Any ideas on reliably fixing this are welcome, of course.

See also http://bugzilla.altlinux.org/30315
2016-10-24 21:39:22 +03:00
Michael Shigorin
1e5703a8a8 20161024-alt1
- probing.c: load uas module too
2016-10-24 20:54:00 +03:00
Michael Shigorin
e5af5f5ae5 probing.c: insmod uas too
It's "USB Attached SCSI" for fast USB3 Flash media.
2016-10-24 20:52:35 +03:00
Michael Shigorin
a7da388c7f 20160516-alt1
- use spawn to run udevadm (legion@; see also #32068)
2016-05-20 19:25:31 +03:00
Alexey Gladkov
bc936fd7c2 Use spawn to run udevadm
Signed-off-by: Alexey Gladkov <legion@altlinux.org>
2016-05-16 18:57:12 +02:00
Michael Shigorin
35bf95867a 20151103-alt1
- modules.c: silence modprobe (some could be compiled in at times)
2015-11-03 21:32:22 +03:00
Michael Shigorin
0d0a892aa3 modules.c: silence modprobe
Some modules can be compiled in, no need to complain then.
2015-11-03 21:32:07 +03:00
Michael Shigorin
fd2cfbeea0 cdrom.c, network.c: tweak messages
No code changes, just slightly better strings.
2015-03-27 10:41:24 +03:00
Michael Shigorin
f2535c70c8 20150310-alt1
- cdrom.c, disk.c: poke lazy udev to do its job while waiting for disk
  (#30315 again)
2015-03-10 01:28:38 +03:00
Michael Shigorin
ce7dbcef2b cdrom.c, disk.c: poke lazy udev to do its job
See also https://bugzilla.altlinux.org/30315
2015-03-10 01:28:21 +03:00
Michael Shigorin
22183d47a8 20150306-alt1
- cdrom.c: fix pointer arithmetics (ldv@)
2015-03-06 21:39:20 +03:00
Michael Shigorin
c011d5e337 cdrom.c: fix pointer arithmetics (ldv@)
p happened to be off-by-const (5) thus pointing
way after the end of the string; looks like an
assembly-level overoptimization with two concurrent
thoughts or more...

Thanks ldv@ for figuring this out.

See also https://bugzilla.altlinux.org/28289
2015-03-06 21:38:21 +03:00
Michael Shigorin
e206e2431f disk.c: further tweak the "choose drive" message 2015-03-04 12:15:19 +03:00
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