Commit Graph

285 Commits

Author SHA1 Message Date
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
Michael Shigorin
19090fbacc 20101130-alt16
- added an Url:
- minor spec cleanup
2012-05-28 19:35:47 +04:00
Michael Shigorin
fddb0063f4 20101130-alt15
- rebuilt for Sisyphus
2012-03-12 16:21:36 +02:00
Mykola Grechukh
45f91426c2 20101130-alt14.hybrid1
- simplifed handling of hybrid disk images
2012-02-10 14:52:15 +00:00
Mykola Grechukh
6d837a25c6 In cdrom_prepare() do not overwrite media list by DISK medias. Instead,
make get_medias() report DISK too when asked for CDROM.
2012-02-10 14:18:48 +00:00
Mykola Grechukh
75416657d2 20101130-alt14
- support for xz compression in mkmodpack
2012-02-08 14:57:22 +00:00
Michael Shigorin
e62dfafded 20101130-alt13
- tweaked usb_storage wait to avoid the needlessly requisite one
2011-12-19 20:30:58 +02:00
Michael Shigorin
f697127807 probing.c: avoid extra dreaming of usb_storage
The initial intention was that at least one second
should pass before retesting for the insmod result
*but* that appears to be both unneeded and boring;
let's skip even an extra second if there's no need.
2011-12-19 20:10:52 +02:00
Michael Shigorin
7cd002b9b4 20101130-alt12
- fixed the fd leak introduced in previous release (thanks ldv@)
2011-12-16 20:26:55 +02:00
Michael Shigorin
04a8821b6e probing.c: fix just-introduced fd leak
usb_not_there() really should closedir() what it opendir()s...
thanks ldv@ for both paying attention and suggesting a fix.
2011-12-16 20:24:21 +02:00
Michael Shigorin
89417755c9 20101130-alt11
- reworked usb_storage wait to use ten second intervals
  instead of a ten second one
2011-12-16 18:06:25 +02:00
Michael Shigorin
8ed1a19660 probing.c: enhance usb_storage long wait
It's pretty silly to wait for 10 seconds at once
while not having ensured that the module is being
loaded indeed...

Thanks rom_as@ for pointing this out.
2011-12-16 18:03:42 +02:00