Commit Graph

39 Commits

Author SHA1 Message Date
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
Evgeny Sinelnikov
6beeb2ccca cdrom.c: Try to mount multiple devices in automatic mode 2021-03-27 02:59:28 +04:00
Arseny Maslennikov
2440a17fbe Remove unnecessary whitespace from C program text 2018-05-09 15:21:26 +03:00
Leonid Krivoshein
28515312fd disk.c, cdrom.c: 15 attempts with udev-settle() calls. 2018-04-22 17:07:12 +03:00
Leonid Krivoshein
da2111e239 init.c, disk.c, cdrom.c, network.c: whitespace cleanup. 2018-04-22 17:06:01 +03:00
Leonid Krivoshein
c4d274d21a cdrom.c: fixed implicit declaration of function opendir warning 2017-12-08 16:54:48 +03:00
Mikhail Efremov
68ad717ec3 cdrom.c, network.c, tools.c: Fix memory leaks 2017-12-08 16:18:56 +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
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
fd2cfbeea0 cdrom.c, network.c: tweak messages
No code changes, just slightly better strings.
2015-03-27 10:41:24 +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
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
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
542567af7b cdrom.c: workaround race conditions during media detection (ALT#30315) 2014-12-17 22:24:12 +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
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
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
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
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
Michael Shigorin
a3a24b8891 cdrom.c: check if it's a hybrid iso on a flashdrive
The implementation is a rough port of
http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/drakx/trunk/mdk-stage1/cdrom.c?view=patch&r1=256657&r2=256656&pathrev=256657
taking into account the difference in underlying early userspace.
2011-12-16 12:27:46 +02:00
Anton V. Boyarshinov
9e192f61c4 splash stages unified 2010-12-01 13:22:58 +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
Sergey Bolshakov
8d129a2d40 wait for usb-storage devices to show up, if any 2008-04-16 14:36:23 +03:00
Andriy Stepanov
ea59261975 Add capability to boot directily from cd (folder with root fs) 2008-04-10 14:35:23 +04:00
Sergey Bolshakov
b78eaa5775 my_insmod() proto change: consider enum driver_type obsolete 2008-02-29 20:05:35 +03:00
Sergey Bolshakov
feea139224 use version string everywhere in user dialogs 2007-08-02 20:45:59 +04:00
Anton Farygin
3085a93992 bootsplash progressbar support 2005-04-21 11:06:44 +00: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
e6864f7c18 proper text in ask_insmod, cleanups 2005-03-03 12:37:10 +00:00
Sergey Bolshakov
c199c141b5 - do not die when couldn't open console rw
- losetup tweaks
2005-02-03 15:38:15 +00:00
Sergey Bolshakov
409d36bfb7 fixed cdrom & disk+iso methods 2005-01-26 13:43:53 +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 Farygin
c0793a2f98 disabled loading stage2 into ramdisk: don't need for distributive with 1 installation CD 2004-11-24 21:37:20 +00:00
Anton Kachalov
46438969c6 Initial revision 2004-01-20 18:32:43 +00:00