Commit Graph

51 Commits

Author SHA1 Message Date
Evgeny Sinelnikov
bcc496411b Fix potential memory overflow in welcome string
stage1.c:354:41: warning: '%s' directive output may be truncated writing up to 127 bytes into a region of size 117 [-Wformat-truncation=]
  snprintf(buf, sizeof(buf), "Welcome to %s", version);
                                         ^~   ~~~~~~~
In file included from /usr/include/stdio.h:862,
                 from stage1.c:30:
/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 12 and 139 bytes into a destination of size 128
   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        __bos (__s), __fmt, __va_arg_pack ());
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-04-04 17:34:46 +04:00
Evgeny Sinelnikov
59a9c4de30 add support of cifs network install method 2018-08-22 20:08:23 +04:00
Arseny Maslennikov
2440a17fbe Remove unnecessary whitespace from C program text 2018-05-09 15:21:26 +03:00
Leonid Krivoshein
5f0d958d1e stage1.c: unused code removed for suppress warning. 2018-04-22 15:17:43 +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
Gleb Fotengauer-Malinovskiy
c96ab958b2 Fix errors found by cppcheck
[disk.c:206]: (error) Resource leak: f
[modules.c:62]: (error) Memory leak: buffer
[modules.c:68]: (error) Common realloc mistake: 'buffer' nulled but not freed upon failure
[stage1.c:101]: (error) va_list 'args' was opened but not closed by va_end().
[url.c:297]: (error) Resource leak: dataSocket
2017-05-11 19:09:46 +03: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
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
5e3a8c51a3 20101130-alt9
- completely broken memory calculation code deleted: we are lucky
2011-06-10 15:43:42 +04:00
Anton V. Boyarshinov
399cf6fe73 stage1.c: run plymouth on tty5 2010-12-22 11:23:17 +03:00
Anton Farygin
63a060b19a 20101202-alt1
- disable plymouth if splash parameter not in cmdline
- removed nosplash command
2010-12-06 11:17:21 +00:00
Anton Farygin
1e8818d6ff 20101130-alt3
- add nosplash command for disable plymouth
2010-12-01 16:10:02 +00:00
Anton V. Boyarshinov
cc71950045 20101130-alt2
- spawning plymouth fixed
2010-12-01 12:51:16 +03: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
2853f29c59 stage1.c: wait conter improved 2010-11-20 16:25:06 +03:00
Anton V. Boyarshinov
235e6e0e39 20090301-alt13.1
- silly bug in waiting fixed
2010-11-19 23:28:16 +03:00
Anton V. Boyarshinov
fccb211884 wait for tty[23], seems also fix hard drives presense on el-smp 2010-11-18 14:56:54 +03:00
Sergey Bolshakov
85378253f3 mostly formatting 2009-07-06 19:22:03 +04:00
Andriy Stepanov
20cf255d7b parse `init=' parameter 2009-07-01 15:17:05 +04:00
Sergey Bolshakov
c075380f3d bring networking up, if requested by auto "network" param, regardless of method 2008-11-12 17:23:06 +03:00
Sergey Bolshakov
dd757bba09 made standalone `init' binary to save few KB's 2008-03-12 15:19:18 +03:00
Sergey Bolshakov
0a6af0fb35 massive change caused by udev use in initramfs:
- added udevd, udevtrigger & udevsettle spawning from init,
reproducing nead same logic, found in initrd, created by
/sbin/mkinitd
- lots of obsolete by this change stuff removed
- use external /sbin/modprobe form klibc utils
in places, where manual module loading still needed
- pack unchangeable part of initramfs into `initfs'
file (gzipped cpio archive), which may be concatenated later
with other parts (especially kernel modules) to form
actual initramfs image.
2008-03-01 22:02:06 +03:00
Sergey Bolshakov
e6b2ed190b do not show own build date on tty1 2007-08-08 20:03:36 +04:00
Sergey Bolshakov
b7ed81fbb8 fixed log_message used after close_log 2007-07-18 15:30:44 +04:00
Sergey Bolshakov
39287d0818 - added /sbin/splash execution, if exists 2007-05-25 16:37:51 +04:00
Sergey Bolshakov
b666a6da01 - usbhid probe fixed
- only one stage1 binary built
2006-11-24 17:58:05 +03:00
Sergey Bolshakov
b8e0eb7bac - probe usbhid very first
- probe by PCI_CLASS_STORAGE_RAID too
2006-11-23 18:45:18 +03:00
Anton Farygin
525175acb0 make stage1 usable as modprobe 2005-05-14 10:23:09 +00: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
29f901523e unused 2005-01-21 15:48:46 +00:00
Sergey Bolshakov
d62b45ce1a propagate env from stage1 further 2005-01-21 13:52:04 +00:00
Sergey Bolshakov
f3a737f206 kill stage1's shell, if any 2004-12-01 15:10:51 +00:00
Sergey Bolshakov
2e6d5b5b61 old trash removed 2004-11-30 18:12:23 +00:00
Sergey Bolshakov
0be6937de0 new stage2 spawning scheme 2004-11-30 14:44:10 +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
Sergey Bolshakov
a68453589f /bin/sh back 2004-11-29 17:18:04 +00:00
Sergey Bolshakov
8eb957321e stage2 symlink back for a while 2004-11-29 16:53:16 +00:00
Anton Farygin
2c956f151a livecd mode and method added
rescue method must be rewrited !!!
2004-11-24 21:44:32 +00:00
Sergey Bolshakov
4bc44a613c added symlink()'ing usr -> tmp/stage2/usr, same for lib FOR A WHILE
not needed with pivot_root & friends
2004-11-24 17:02:28 +00:00
Sergey Bolshakov
7f8d55ebef merged changes from propagator_1_1_dev 2004-11-22 13:47:29 +00:00
Anton Farygin
8fb997d29d removed check for pid > 50 and enabling testing mode 2004-06-03 17:41:16 +00:00
Anton Farygin
78e009a47a welcome message 2004-04-14 18:36:38 +00:00
Alexander V. Nikolaev
b22dd2b038 rollback change name of second stage (keep install2)
src/*.c:  add some malloc checks and more informative error messages
2004-04-03 21:19:34 +00:00
Anton Kachalov
0e4269fb9c debug remove 2004-02-02 19:26:51 +00:00
Anton Kachalov
868bb24210 bugfixes 2004-02-02 19:18:41 +00:00
Mikhail Yakshin
38c5fa9c34 Build fixes 2004-02-02 14:35:07 +00:00
Anton Kachalov
47fd3ec16e rename mdkinst_stage2.bz2 -> altinst_stage2.bz2
define stage2 executable in config-stage1.h
2004-01-30 16:50:12 +00:00