Commit Graph

20 Commits

Author SHA1 Message Date
Alexey Sheplyakov
36b688d17a network boot: support loading complete ISOs via HTTP
Now I don't have to unpack (or loop mount) ISO to boot via HTTP.
Also I can boot directly from any ALT mirror, like this:

automatic=method:http,network:dhcp,server:mirror.yandex.ru,directory=/altlinux/images/p9/simply/aarch64/slinux-live-9.1.1-aarch64.iso

Closes: #40710
2021-09-17 17:26:33 +04:00
Alexey Sheplyakov
08ec5c3a78 tools.c: added do_losetup_fd helper function
Useful to setup a loopback device backed by an anonymous file
(created by memfd_create, open(O_TMPFILE), and similar).
2021-09-08 12:00:49 +04:00
Alexey Sheplyakov
0a972b5b86 http_prepare: check if the image fits into (1/2 of) RAM 2021-09-08 12:00:32 +04:00
Evgeny Sinelnikov
7a21d264c7 cdrom.c, tools.{h.c}: Add support 'fuid' automatic mode option for method cdrom
The installed system can have several devices with the same structure.
The automatic 'fuid' option can be used to detach one from the other to find the
partition where our stage2 image is stored, launched from stage1 (in this case
propagator). This option works automatically with the cdrom method:
- automatic=method:cdrom,fuid:PATH_TO_UNIQ_UID_FILENAME
2021-04-04 17:18:25 +04:00
Arseny Maslennikov
2440a17fbe Remove unnecessary whitespace from C program text 2018-05-09 15:21:26 +03:00
Leonid Krivoshein
da664f7f9e tools.c, tools.h: correct argument type of get_from_env().
This change also suppress compiler warnings.
2018-04-22 15:35:37 +03:00
Mikhail Efremov
ee71c69502 Use ramdisk_size from kernel cmdline
If we can't get file's size then use ramdisk_size if given.
2017-12-08 16:18:37 +03:00
Mikhail Efremov
7f50a883ac Check that RAM size is enough for ramdisk
Don't try to load ramdisk we don't have enough memory.
2017-12-08 16:18:37 +03: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
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
Anton V. Boyarshinov
9728339b03 plymouth support improoved 2010-11-30 22:14:42 +03:00
Anton V. Boyarshinov
5379a6c482 basic plymouth support 2010-11-22 19:56:35 +03:00
Anton V. Boyarshinov
3d2e77074f tty3 creation
waiting /dev/disk added
2010-11-20 19:20:08 +03:00
Andriy Stepanov
20cf255d7b parse `init=' parameter 2009-07-01 15:17:05 +04:00
Sergey Bolshakov
48d26b2d15 - cleaned up 2007-03-03 00:48:18 +03:00
Sergey Bolshakov
1d2720df30 made things working:
- ramdisk name calculating
- lowmem parameter, ramdisk will not be loaded, if specified
- stagename parameter appeared, eq "altinst" if not specified
2005-03-05 15:26:22 +00:00
Sergey Bolshakov
d62b45ce1a propagate env from stage1 further 2005-01-21 13:52:04 +00:00
Sergey Bolshakov
68463187b0 'disk' install method fixed.
WARNING: proto changed: get_ramdisk_path(char *)
2004-12-12 22:22:50 +00:00
Anton Farygin
8e45f2d2e5 use cloop images for stage2
removed method live (use parameter live for detection stage2 filesystem image)
2004-11-30 11:47:57 +00:00
Anton Kachalov
46438969c6 Initial revision 2004-01-20 18:32:43 +00:00