#2148 Issue closed
: 900_copy_ramdisk.sh seems to duplicate what 950_copy_result_files.sh does¶
Labels: documentation
, cleanup
, fixed / solved / done
jsmeix opened issue at 2019-05-23 09:16:¶
I use the current ReaR GitHub master code.
I never used OUTPUT=RAMDISK
before so
perhaps I do not understand how it meant to be used
but my excuse is that its usage is not really documented.
I noticed its usage in
https://github.com/rear/rear/pull/2142#issuecomment-495010023
With OUTPUT=RAMDISK
I get
(excerpt - only the ouput
scripts)
# usr/sbin/rear -s mkrescue
...
Source output/default/010_set_umask.sh
Source output/default/100_mount_output_path.sh
Source output/default/150_save_copy_of_prefix_dir.sh
Source output/default/200_make_boot_dir.sh
Source output/default/200_make_prefix_dir.sh
Source output/default/250_create_lock.sh
Source output/default/400_copy_disk_struct_files.sh
Source output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
Source output/default/940_grub2_rescue.sh
Source output/default/940_grub_rescue.sh
Source output/default/950_copy_result_files.sh
Source output/default/950_email_result_files.sh
Source output/default/970_remove_lock.sh
Source output/default/980_umount_output_dir.sh
where both
output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
and
output/default/950_copy_result_files.sh
are run but as far as I see both scripts do basically the same.
Therefore I wonder if output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
is needed at all or if that should be better integrated into
the output/default/950_copy_result_files.sh
Furthermore the only RAMDISK
scripts are
usr/share/rear/output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
usr/share/rear/conf/templates/RESULT_usage_RAMDISK.txt
so that I wonder what RAMDISK
is meant to be used for.
@rear/contributors
can you help me to understand how RAMDISK
is meant to be used?
jsmeix commented at 2019-05-23 10:32:¶
It seems
output/PXE/default/820_copy_to_net.sh
is another one that seems to duplicate what
output/default/950_copy_result_files.sh
does.
But as for OUTPUT=RAMDISK
I may also misunderstand
something because I never used OUTPUT=PXE
.
gdha commented at 2019-05-23 10:47:¶
@jsmeix @jhoekx I believe RAMDISK was developed by Jeroen to have a faster test cyclus (booting from RAM is faster then from ISO)
jsmeix commented at 2019-05-23 11:12:¶
But the only files that contain RAMDISK
are
usr/share/rear/restore/DUPLICITY/default/400_restore_duplicity.sh
usr/share/rear/output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
usr/share/rear/lib/validated/Arch/rolling/i386.txt
usr/share/rear/conf/default.conf
so that output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
is the only script for OUTPUT=RAMDISK
.
As far as I see it does not create any kind of bootable ramdisk.
What is does is to only copy ReaR's initrd and the kernel
to an OUTPUT_URL location.
This matches what man rear
tells
OUTPUT=RAMDISK
Create only the Relax-and-Recover initramfs.
i.e. nothing about creating a (bootable) ramdisk.
jsmeix commented at 2019-05-23 11:28:¶
To mee it looks as if OUTPUT=RAMDISK
is basically
what @mutable-dan and I need for ReaR on IBM Z
where we like to get the plain ReaR initrd and the kernel
copied as is to our OUTPUT_URL location which is done via
output/default/950_copy_result_files.sh
provided RESULT_FILES contains KERNEL_FILE and
ReaR's initrd (via $TMP_DIR/$REAR_INITRD_FILENAME).
To get that done I made a quick and dirty new script
usr/share/rear/output/IPL/Linux-s390/800_create_ipl.sh
cf.
https://github.com/rear/rear/pull/2142#issuecomment-494426331
plus I used a new OUTPUT=IPL
for it because at that time
I did not know about OUTPUT=RAMDISK
.
Now I think I may better cleanup and adapt the existing
output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
and use OUTPUT=RAMDISK
- provided I understand
how it is meant to be used to avoid regressions if I adapt
output/RAMDISK/Linux-i386/900_copy_ramdisk.sh
jsmeix commented at 2019-05-23 12:29:¶
I wonder why 900_copy_ramdisk.sh is an architecture dependent script
cf.
https://github.com/rear/rear/pull/2142#issuecomment-495196467
I think there should be no usr/share/rear/output/RAMDISK/Linux-i386
but only a usr/share/rear/output/RAMDISK/default/900_copy_ramdisk.sh
jsmeix commented at 2019-05-23 12:39:¶
An initial proposal for a completely overhauled 900_copy_ramdisk.sh
as an architecture independent script
usr/share/rear/output/RAMDISK/default/900_copy_ramdisk.sh
is shown in
https://github.com/rear/rear/pull/2142#issuecomment-495200737
jsmeix commented at 2019-05-28 10:09:¶
With
https://github.com/rear/rear/pull/2149
this issue is (hopefully) fixed.
[Export of Github issue for rear/rear.]