#467 Issue closed: Not able to take rear backup through USB on debian 6.0

Labels: enhancement, support / question

pramodbiradar89 opened issue at 2014-10-01 05:20:

2014-09-29 19:23:08 Relax-and-Recover 1.16.1 / Git
2014-09-29 19:23:08 Command line options: /usr/sbin/rear -v mkbackup
2014-09-29 19:23:08 Using log file: /var/log/rear/rear-Centosvm.log
2014-09-29 19:23:08 Including /etc/rear/os.conf
2014-09-29 19:23:08 Including conf/Linux-i386.conf
2014-09-29 19:23:08 Including conf/GNU/Linux.conf
2014-09-29 19:23:08 Including /etc/rear/local.conf
2014-09-29 19:23:08 Using build area '/tmp/rear.Zom0FaUNpAVJuS2'
mkdir: created directory `/tmp/rear.Zom0FaUNpAVJuS2/rootfs'
mkdir: created directory `/tmp/rear.Zom0FaUNpAVJuS2/tmp'
2014-09-29 19:23:08 Running mkbackup workflow
2014-09-29 19:23:08 Running 'prep' stage
2014-09-29 19:23:08 Including prep/default/00_remove_workflow_conf.sh
mkdir: created directory `/tmp/rear.Zom0FaUNpAVJuS2/rootfs/etc'
mkdir: created directory `/tmp/rear.Zom0FaUNpAVJuS2/rootfs/etc/rear'
2014-09-29 19:23:08 Including prep/default/02_translate_url.sh
2014-09-29 19:23:08 Including prep/default/03_translate_tape.sh
2014-09-29 19:23:08 Including prep/default/04_check_output_scheme.sh
2014-09-29 19:23:08 Including prep/USB/default/04_set_NETFS_requirements.sh
2014-09-29 19:23:08 Including prep/NETFS/default/05_check_NETFS_requirements.sh
2014-09-29 19:23:08 Skipping ping test
2014-09-29 19:23:08 Including prep/default/05_check_keep_old_output_copy_var.sh
2014-09-29 19:23:08 Including prep/NETFS/default/06_mount_NETFS_path.sh
mkdir: created directory `/tmp/rear.Zom0FaUNpAVJuS2/outputfs'
2014-09-29 19:23:08 Mounting with 'mount -v -o rw,noatime,nolock /disk/by-label/REAR-000 /tmp/rear.Zom0FaUNpAVJuS2/outputfs'
mount: you must specify the filesystem type
mount: you didn't specify a filesystem type for /disk/by-label/REAR-000
       I will try all types mentioned in /etc/filesystems or /proc/filesystems
2014-09-29 19:23:08 ERROR: Mount command 'mount -v -o rw,noatime,nolock /disk/by-label/REAR-000 /tmp/rear.Zom0FaUNpAVJuS2/outputfs' failed.
=== Stack trace ===
Trace 0: /usr/sbin/rear:249 main
Trace 1: /usr/share/rear/lib/mkbackup-workflow.sh:15 WORKFLOW_mkbackup
Trace 2: /usr/share/rear/lib/framework-functions.sh:81 SourceStage
Trace 3: /usr/share/rear/lib/framework-functions.sh:42 Source
Trace 4: /usr/share/rear/prep/NETFS/default/06_mount_NETFS_path.sh:11 source
Trace 5: /usr/share/rear/lib/global-functions.sh:153 mount_url
Trace 6: /usr/share/rear/lib/_input-output-functions.sh:132 StopIfError
Message: Mount command 'mount -v -o rw,noatime,nolock /disk/by-label/REAR-000 /tmp/rear.Zom0FaUNpAVJuS2/outputfs' failed.
===================
2014-09-29 19:23:08 Running exit tasks.
rmdir: removing directory, `/tmp/rear.Zom0FaUNpAVJuS2/outputfs'
2014-09-29 19:23:08 Finished in 0 seconds
2014-09-29 19:23:08 Removing build area /tmp/rear.Zom0FaUNpAVJuS2
rmdir: removing directory, `/tmp/rear.Zom0FaUNpAVJuS2'
2014-09-29 19:23:08 End of program reached

pramodbiradar89 commented at 2014-10-01 05:27:

@gdha After changing the global-functions.sh file ,backup got worked .

From my understanding it was trying to mount USB at the time of taking backup with options:

mount -v -o rw,noatime,nolock /disk/by-label/REAR-000 /tmp/rear.Zom0FaUNpAVJuS2/outputfs'

(same thing i tried by manually but USB was not able to mount )

& i changed it to

mount /disk/by-label/REAR-000 /tmp/rear.Zom0FaUNpAVJuS2/outputfs

it got worked.

Also After taking backup successfully by doing above changes ,At the time of recovery it is throwing error saying "missing operating system " on Debian 6.0_64 OS and only " __ " symablo on CentOs 6.4.

Please find the /usr/share/rear/lib/ global-functions.sh file

https://gist.github.com/pramodbiradar89/fd31c304fa58c70a0266

So i am little confused whatever the changes i made to take backup successfully is corretc or not ?

If it is correct then why at the time of restoration through USB it is giving error ?

Thanks,
Pramod

gdha commented at 2014-10-02 11:33:

See http://relax-and-recover.org/usage/#recovery_from_usb on how to work with an USB stick/disk

pramodbiradar89 commented at 2014-10-02 11:44:

@gdha yes. i have followed same steps.

for other OS flavours such as RHEL 6 , UBUNTU 12.04 backup & recovery using USB stick is working as per expectation.

But only for Debian6.0 and CentOs 6.4 i am getting above mentioned issue.

Thanks,
pramod

pramodbiradar89 commented at 2014-10-06 07:07:

@gdha

Any update on this ?

Thanks,
pramod

gdha commented at 2014-10-06 08:50:

@pramodbiradar89 You could define your own BACKUP_OPTIONS= variable in the local.conf which should take care of the rest

pramodbiradar89 commented at 2014-10-06 09:29:

@gdha

Can you please give me one example for this as i am new to rear .

I was using this local.conf file:

BACKUP=NETFS
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000

Request you to explain how local.conf should get looked using BACKUP_OPTIONS= .

Thanks,
Pramod

gdha commented at 2014-10-06 09:44:

E.g. BACKUP_OPTIONS=rw would be enough in your case (OUTPUT=USB)

pramodbiradar89 commented at 2014-10-06 09:50:

@gdha

Please correct me if i am wrong .

My final local .conf should look like this:

BACKUP=NETFS
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
BACKUP_OPTIONS=rw

correct ?

And after this i have to take backup through USB & recover ?

Thanks,
pramod

gdha commented at 2014-10-06 09:51:

@pramodbiradar89 should work

pramodbiradar89 commented at 2014-10-06 11:01:

@gdha

I tried using above mentioned local.conf backup got successful but at the time of recovery i got following error:

Failed to load COM32 file menu.C32’
Failed to load COM32 file chain.C32’

Thanks,
pramod

pramodbiradar89 commented at 2014-10-07 12:05:

@gdha

Any update ?

Thanks,
Pramod

gdha commented at 2014-10-07 13:25:

@pramodbiradar89 did you check rear.log file before recovery - is there a better error description available? It means that your USB disk is not bootable;

pramodbiradar89 commented at 2014-10-08 06:13:

@gdha

Please find the log file for the machine whose backup got successful through USB:
https://gist.github.com/pramodbiradar89/85d3c86be4c8538184bc

Log file with debug level enabled:

https://gist.github.com/pramodbiradar89/0b5c577831cba7334410

Thanks,
Pramod

gdha commented at 2014-10-08 07:20:

@pramodbiradar89 According your logs the syslinux/extlinux config went well. Just saw a message about UEFI - do you need UEFI somehow? If yes, then that might be the issue that your system does not allow USB booting?

pramodbiradar89 commented at 2014-10-08 08:17:

@gdha

For my work, i need UEFI support.
So to work UEFI with REAR is there any additional changes do i need to do ?


Also ,to make it work without UEFI for same machine, what kind of changes i need to do ?

Thanks,
Pramod

gdha commented at 2014-10-08 09:45:

@pramodbiradar89 To be honest I have never tested UEFI on Debian. On RHEL, Fedora it should work for ISO images (and of course recreating the HD). There are some known issues with OpenSuSe (which are not fixed yet within the OpenSuSe distro). Debian is a big question mark.
But, whatever, you may think USB is currently not a supported boot method for UEFI. I do not have time to work on it. If you know how to get it working please be my guest and prepare a pull request.
For what I can see the following error is a strong indication something serious is wrong:

2014-10-08 17:19:08.422170530 Including prep/default/31_include_uefi_tools.sh
FATAL: Error inserting efivars (/lib/modules/2.6.32-5-amd64/kernel/drivers/firmware/efivars.ko): No such device
2014-10-08 17:19:08.520704796 Including prep/USB/Linux-i386/33_find_isolinux.sh

As said, cannot help you with UEFI on Debian.
If you disable UEFI on your system then a normal boot should work.

pramodbiradar89 commented at 2014-10-08 10:40:

@gdha

Please find the screenshot of the recover window:

image

This mentioned screenshot is for machine which is having legacy as booting method not UEFI
but still i am getting error as shown in screenshot.

Please take a look in to it.

Thanks,
pramod

pramodbiradar89 commented at 2014-10-09 11:22:

@gdha

Request you to please update your comment.

Thanks,
Pramod

gdha commented at 2014-10-09 12:27:

@pramodbiradar89 could you run /usr/sbin/rear -v -D mkrescue - would like to see what happens during the output/USB/Linux-i386/85_make_USB_bootable.sh steps. I think extlinux did never run (to make USB disk bootable)?

pramodbiradar89 commented at 2014-10-10 06:42:

@gdha

Hi Please find the logs for command " /usr/sbin/rear -v -D mkrescue " :

https://gist.github.com/pramodbiradar89/e527ee1a87088d924772

gdha commented at 2014-10-10 07:19:

@pramodbiradar89 Please use the correct configuration - it was OUTPUT=ISO instead of OUTPUT=USB:
see:

++ syslinux_menu_help 'Rescue image kernel 2.6.32-5-amd64  Fri, 10 Oct 2014 07:44:25 -0400' 'BACKUP=REQUESTRESTORE OUTPUT=ISO '

gdha commented at 2014-11-21 15:32:

concerning uefi found a good article to keep as reference: http://ubuntuforums.org/showthread.php?t=2223856

gdha commented at 2014-12-02 09:24:

This issue seems related to issue #214


[Export of Github issue for rear/rear.]