#785 Issue closed: USB Not Booting

Labels: support / question

bfsworks opened issue at 2016-02-25 08:55:

  • rear version (/usr/sbin/rear -V): 1.17.2
  • OS version (cat /etc/rear/os.conf or lsb_release -a): CentOS 5.8 x86_64
  • rear configuration files (cat /etc/rear/site.conf or cat /etc/rear/local.conf):
    BACKUP=NETFS
    OUTPUT=USB
    BACKUP_PROG=rsync
    BACKUP_URL=usb:///dev/disk/by-label/REAR-000
    CLONE_ALL_USERS_GROUPS=y
  • Brief description of the issue: USB failing to boot
  • Work-around, if any: Replacing variable SYSLINUX_PREFIX from /boot/syslinux to empty.

After trying all sorts of different versions of syslinux and extlinux we found that even though our CentOS repo installed syslinux and extlinux version 4.02 our USB would not boot from the files inside the /boot/sysconfig directory. Looking into the bootloader-functions.sh I found the logic that is syslinux_version is greater than 3.35 then to set the SYSLINUX_PREFIX to /boot/syslinux. Unfortunately this broke the ability for the USB to boot properly. It may not be a pretty with the files outside of the boot directory but atleast it works.

Not sure on this logic and may need to be re-reviewed.

bfsworks commented at 2016-02-25 10:00:

Just also realized that the backup images are not showing up in the main menu. I see the "include /rear/syslinux.cfg" in extlinux.conf (which is now in the top level of the drive) and the /rear/syslinux.cfg file exists and looks ok. Is there something strange going on where files in directories on USB are not accessible during boot? I can mount the drive and see all the files exist. It is just strange that once I moved all the syslinux/extlinux files out of /boot/syslinux and into the base drive the USB boots and now it appears the include to another file in a directory is not working.

Thoughts?

gdha commented at 2016-02-25 13:26:

It might be that our syslinux/extlinux logic is not compatible with RHEL 5 anymore?

bfsworks commented at 2016-02-25 13:38:

Since we are working with 4.02 of syslinux/extlinux and a newer version of rear is it possible to trick rear by editing the os.conf to use newer logic?

bfsworks commented at 2016-02-25 14:14:

Ill be back at it again tonight for Round 3. Let me know if there is anything that I can provide that can help get rear working again for CentOS 5. Trial and error is getting me closer but it takes awhile to follow the code trail. We are in process of migrating but still have older systems that will go until not supported by CentOS.

gdha commented at 2016-02-25 14:43:

@bfsworks Perhaps run a rear -vD mkrescue and provide the logging so we can see what happens in the background with syslinux/extlinux

bfsworks commented at 2016-02-26 05:28:

Well I removed the syslinux and extlinux packages installed via CentOS repo and installed syslinux version 5 here and ran make install. I also removed the rear package as installed by CentOS repo and installed the RPM here. Going to try a fresh format and backup workflows and report back. This could be a case of packages issues.

bfsworks commented at 2016-02-26 09:29:

I think I am going nuts! All of these issues that I thought were heading towards the right direction might just come down to the USB drive we have. I just tried a personal USB thumb drive and it worked on first try without any manual modifications. Going to do some further testing to make sure. The USB drive we are having problems with is a 1TB USB Drive. I am not sure if there are any partition size issues with extlinux? Going around in circles for 3 days. Time to take a break and circle back around with I have some other USB devices to test.

gdha commented at 2016-02-26 09:46:

@bfsworks I have just a centos5 running ans was planning to do a test myself

bfsworks commented at 2016-02-26 09:49:

That would be much appreciated and a needed sanity check. Look forward to hearing what you find.

gdha commented at 2016-02-26 14:34:

Just tested a complete cycle (mkbackup/restore) with success (rear-1.17.2):

2016-02-26 13:59:19 Including output/USB/Linux-i386/30_create_extlinux.sh
2016-02-26 13:59:19 USB syslinux version:
2016-02-26 13:59:19 System syslinux version: 4.02
2016-02-26 13:59:19 Features based on syslinux version: 4.02
2016-02-26 13:59:19 Using syslinux prefix: boot/syslinux
mkdir: created directory `/tmp/rear.eXTmqcuYIWF3577/outputfs/rear'
mkdir: created directory `/tmp/rear.eXTmqcuYIWF3577/outputfs/rear/centos5'
mkdir: created directory `/tmp/rear.eXTmqcuYIWF3577/outputfs/rear/centos5/20160226.1359'
2016-02-26 13:59:19 Creating rear/centos5/20160226.1359/syslinux.cfg
2016-02-26 13:59:19 Creating /rear/syslinux.cfg
2016-02-26 13:59:19 Processing rear/centos5/20160226.1359/syslinux.cfg
mkdir: created directory `/tmp/rear.eXTmqcuYIWF3577/outputfs/boot'
mkdir: created directory `/tmp/rear.eXTmqcuYIWF3577/outputfs/boot/syslinux'
2016-02-26 13:59:19 Creating boot/syslinux/extlinux.conf

Therefore, most likely it was the USB device doing difficult.

bfsworks commented at 2016-02-29 19:21:

Will have some new USB drives to test tomorrow and I will be sure to report back.

bfsworks commented at 2016-03-08 10:13:

I have tested three new and different USB drives, Western Digital, Seagate, and Transcend. mkrescue goes fine, but boot up does now. Tried booting on multiple machines as well so I know it is not a bios issue. Bios is properly booting the drives but keep getting a "Boot error". Playing around with bootloader.functions.sh I changed the boot directory from /boot/syslinux to /boot/extlinux and that allows the boot to take a step further and display the main menu. Unfortunately once I do this the includes for the rescue menu's are not displayed.

Going to go back to system default everything and post the debug log and start from scratch.

bfsworks commented at 2016-03-09 05:02:

Well I have updated syslinux/extlinux to 6.03 and I can boot the USB every time with no "Boot error" or any modifications to the rear code. Possibly some of the newer 2TB USB SCSI/SATA drives will only work with newer versions of the syslinux project. Now the problem I have is that the Include directive for /rear/syslinux.cfg does not load. The Include directive works as if I move the syslinux.cfg file into /boot/syslinux/ folder and change the include to "include syslinux.cfg" it works.

So I can now consistently boot several USB drives but with updating to syslinux 6.03 there seems to be some sort of working directory issue where files in /rear/* cannot be included :(. If you could retest with syslinux 6.03 and see if anything stands out of why the INCLUDE directive does not pull in files from the /rear/ folder that would be great.

I am almost there I hope....

gdha commented at 2016-03-09 09:08:

@bfsworks Good news for you at last. Concerning the include directive: is a bit weird as it seems to work for most users. Could you give an example of your configuration?


[Export of Github issue for rear/rear.]