Linux ih01.iridiumhosting.com 5.14.0-611.55.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue May 19 15:19:29 EDT 2026 x86_64
LiteSpeed
Server IP : 67.227.241.211 & Your IP : 216.73.216.187
Domains :
Cant Read [ /etc/named.conf ]
User : dustinhy
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
opt /
MXB /
rear /
usr /
share /
rear /
layout /
save /
default /
Delete
Unzip
Name
Size
Permission
Date
Action
300_list_dependencies.sh
103
B
-rw-r--r--
2026-04-01 09:39
305_uniq_disktodo.sh
189
B
-rw-r--r--
2026-04-01 09:39
310_autoexclude_usb.sh
1.61
KB
-rw-r--r--
2026-04-01 09:39
310_include_exclude.sh
2.21
KB
-rw-r--r--
2026-04-01 09:39
320_autoexclude.sh
5.05
KB
-rw-r--r--
2026-04-01 09:39
330_remove_exclusions.sh
4.08
KB
-rw-r--r--
2026-04-01 09:39
335_remove_excluded_multipath_vgs.sh
2.23
KB
-rw-r--r--
2026-04-01 09:39
340_generate_mountpoint_device.sh
1.21
KB
-rw-r--r--
2026-04-01 09:39
350_save_partitions.sh
1.43
KB
-rw-r--r--
2026-04-01 09:39
445_guess_bootloader.sh
8.32
KB
-rw-r--r--
2026-04-01 09:39
450_check_bootloader_files.sh
2.05
KB
-rw-r--r--
2026-04-01 09:39
450_check_network_files.sh
1.41
KB
-rw-r--r--
2026-04-01 09:39
490_check_files_to_patch.sh
2.19
KB
-rw-r--r--
2026-04-01 09:39
550_barrel_devicegraph.sh
3.66
KB
-rw-r--r--
2026-04-01 09:39
600_snapshot_files.sh
1.74
KB
-rw-r--r--
2026-04-01 09:39
700_save_grubenv.sh
1.31
KB
-rw-r--r--
2026-04-01 09:39
950_verify_disklayout_file.sh
16.99
KB
-rw-r--r--
2026-04-01 09:39
Save
Rename
# Determine or guess the used bootloader if not specified by the user # and save this information into /var/lib/rear/recovery/bootloader local bootloader_file="$VAR_DIR/recovery/bootloader" local sysconfig_bootloader local block_device local blockd local disk_device local bootloader_area_strings_file local block_size local known_bootloader # When BOOTLOADER is specified use that: if test "$BOOTLOADER" ; then # case-insensitive match, as later we convert all to uppercase if [[ "$BOOTLOADER" == [Gg][Rr][Uu][Bb] ]] ; then if is_grub2_installed ; then LogPrintError "BOOTLOADER=GRUB used to mean GRUB 2 if GRUB 2 is installed and GRUB Legacy if not" Error "BOOTLOADER set to '$BOOTLOADER', set it to 'GRUB2' explicitly to avoid the ambiguity" fi # we should add an ErrorIfDeprecated call here or later for GRUB Legacy deprecation fi LogPrint "Using specified bootloader '$BOOTLOADER' for 'rear recover'" echo "$BOOTLOADER" | tr '[a-z]' '[A-Z]' >$bootloader_file return fi # When a bootloader is specified in /etc/sysconfig/bootloader use that: # # On SUSE, the possible values for BOOTLOADER_TYPE are: # grub,grub2,grub2-efi,grub2-bls,systemd-boot,none # # Proceed to auto-detect the bootloader in the steps below if /etc/sysconfig/bootloader # contains 'none', 'grub2-bls' (which should be treated as GRUB2 or GRUB2-EFI), # or 'grub2-efi' (which can be used on hybrid systems and leads to losing # the capability to boot in a BIOS environment, making them purely EFI after recovery # see https://github.com/rear/rear/pull/3128#issuecomment-2176373583) if sysconfig_bootloader="$(get_sysconfig_bootloader)" \ && [[ ! "$sysconfig_bootloader" =~ ^(grub2-efi|grub2-bls|none)$ ]] ; then LogPrint "Using sysconfig bootloader '$sysconfig_bootloader' for 'rear recover'" echo "$sysconfig_bootloader" | tr '[a-z]' '[A-Z]' >$bootloader_file return fi # On ARM, guess the dummy bootloader: if [ "$ARCH" = "Linux-arm" ] ; then BOOTLOADER=ARM # Inform the user that we do nothing: LogPrint "Using guessed bootloader 'ARM'. Skipping bootloader backup, see default.conf about 'BOOTLOADER'" echo "$BOOTLOADER" >$bootloader_file return fi # Check if any disk contains a PPC PReP boot partition. # Detection taken from usr/share/rear/finalize/Linux-ppc64/680_install_PPC_bootlist.sh disk_device="$( awk -F ' ' '/^part / {if ($6 ~ /prep/) {print $2}}' $LAYOUT_FILE )" if test "$disk_device" ; then LogPrint "Using guessed bootloader 'PPC' for 'rear recover' (found PPC PReP boot partition on $disk_device)" echo "PPC" >$bootloader_file return fi # Finally guess the used bootloader by inspecting the first bytes on all disks # and use the first one that matches a known bootloader string: for block_device in /sys/block/* ; do blockd=${block_device#/sys/block/} # Continue with the next block device when the current block device is not a disk that can be used for booting: [[ $blockd = hd* || $blockd = sd* || $blockd = cciss* || $blockd = vd* || $blockd = xvd* || $blockd = nvme* || $blockd = mmcblk* || $blockd = dasd* ]] || continue disk_device=$( get_device_name $block_device ) # Get all strings in the first 512*4=2048 bytes on the disk: bootloader_area_strings_file="$TMP_DIR/bootloader_area_strings" block_size=$( get_block_size ${disk_device##*/} ) dd if=$disk_device bs=$block_size count=4 | strings >$bootloader_area_strings_file # Examine the strings in the first bytes on the disk to guess the used bootloader, # see layout/save/default/450_check_bootloader_files.sh for the known bootloaders. # Test the more specific strings first because the first match wins. # Skip LUKS encrypted disks when guessing bootloader: if grep -q "LUKS" $bootloader_area_strings_file ; then LogPrint "Cannot autodetect bootloader on LUKS encrypted disk (found 'LUKS' in first bytes on $disk_device)" # Continue guessing the used bootloader by inspecting the first bytes on the next disk: continue fi # Check the default cases of known bootloaders. # IBM Z (s390) uses zipl boot loader for RHEL and Ubuntu # cf. https://github.com/rear/rear/issues/2137 for known_bootloader in GRUB2 GRUB LILO ZIPL ; do if grep -q -i "$known_bootloader" $bootloader_area_strings_file ; then # If we find "GRUB" (which means GRUB Legacy) # do not unconditionally trust that because https://github.com/rear/rear/pull/589 # reads (excerpt): # Problems found: # The ..._install_grub.sh checked for GRUB2 which is not part # of the first 2048 bytes of a disk - only GRUB was present - # thus the check for grub-probe/grub2-probe # and https://github.com/rear/rear/commit/079de45b3ad8edcf0e3df54ded53fe955abded3b # reads (excerpt): # replace grub-install by grub-probe # as grub-install also exist in legacy grub # so that if actually GRUB 2 is used, the string in the bootloader area # is "GRUB" so that another test is needed to detect if actually GRUB 2 is used. # When GRUB 2 is installed we assume GRUB 2 is used as boot loader. if [ "$known_bootloader" = "GRUB" ] && is_grub2_installed ; then known_bootloader=GRUB2 LogPrint "GRUB found in first bytes on $disk_device and GRUB 2 is installed, using GRUB2 as a guessed bootloader for 'rear recover'" else LogPrint "Using guessed bootloader '$known_bootloader' for 'rear recover' (found in first bytes on $disk_device)" fi # In cloud providers such as Azure, VMs can be created from images # that are dual-boot capable — GPT + EFI and GPT + BIOS. if is_true "$USING_UEFI_BOOTLOADER"; then case "$known_bootloader" in (GRUB2) known_bootloader="GRUB2-EFI" ;; (LILO) known_bootloader="ELILO" ;; (*) known_bootloader="EFI" ;; esac fi echo "$known_bootloader" >$bootloader_file return fi done # When no known bootloader matches the first bytes on the current disk # log all strings in the first bytes on the current disk # so that the user can see the results in the log file: Log "No known bootloader matches the first bytes on $disk_device" Log "Begin of strings in the first bytes on $disk_device" cat $bootloader_area_strings_file >&2 Log "End of strings in the first bytes on $disk_device" done # Default to GRUB2 on ppc64le PowerNV machines if no PPC PReP Boot partitions # were found because it is not manadatory to use them in this setup. if [ "$ARCH" = "Linux-ppc64le" ] && [ "$(awk '/platform/ {print $NF}' < /proc/cpuinfo)" = "PowerNV" ] ; then LogPrint "Using guessed bootloader 'GRUB2' for 'rear recover' (default for ppc64le PowerNV machines)" echo "GRUB2" >$bootloader_file return fi # No bootloader detected, but we are using UEFI - there is probably an EFI bootloader if is_true $USING_UEFI_BOOTLOADER ; then if is_grub2_installed ; then echo "GRUB2-EFI" >$bootloader_file elif test -f /sbin/elilo ; then echo "ELILO" >$bootloader_file else # There is an EFI bootloader, we don't know which one exactly. # The value "EFI" is a bit redundant with USING_UEFI_BOOTLOADER=1, # which already indicates that there is an EFI bootloader. We use it as a placeholder # to not leave $bootloader_file empty. # Note that it is legal to have USING_UEFI_BOOTLOADER=1 and e.g. known_bootloader=GRUB2 # (i.e. a non-EFI bootloader). This will happen in BIOS/UEFI hybrid boot scenarios. # known_bootloader=GRUB2 indicates that there is a BIOS bootloader and USING_UEFI_BOOTLOADER=1 # indicates that there is also an EFI bootloader. Only the EFI one is being used at this # time, but both will need to be restored. echo "EFI" >$bootloader_file fi return 0 fi # Error out when no bootloader was specified or could be autodetected: cove_error_if_container || Error "Cannot autodetect what is used as bootloader, see default.conf about 'BOOTLOADER'"