#119 Issue closed: Having a problem with backup using USB memory stick.

Labels: support / question

cwnam14 opened issue at 2012-06-22 06:49:

Hello,
I'm trying to backup linux os using USB memory stick.
But I am having the following problem. Please help me out for this matter.

[14:43:23][root@chuck ~]$ rear -v mkbackup
Relax and Recover 1.13.0 / $Date$
Creating disk layout
Creating root FS layout
WARNING: To login as root via ssh you need to setup an authorized_keys file in /root/.ssh
Copy files and directories
Copy binaries and libraries
Copying kernel modules
Checking udev
Create initramfs
Writing MBR to /dev/sda
Copying resulting files to usb location
Creating tar archive '/tmp/rear.ZODGiyQSSp15050/outputfs/chuck/backup.tar.gz'
Preparing archive operationOK
WARNING !
There was an error (Nr. 141) during archive creation.
Please check the archive and see '/tmp/rear-chuck.log' for more information.

Since errors are oftenly related to files that cannot be saved by
tar, we will continue the mkbackup process. However, you MUST
verify the backup yourself before trusting it !


Finished in 45 seconds

jhoekx commented at 2012-06-22 06:52:

There are known problems with backup to USB in rear 1.13.0 which have been fixed (on LinuxTag).

Could you please test with the latest git version? You can run it from checkout these days.

cwnam14 commented at 2012-06-22 06:56:

Where can I have it? Please let me know.

jhoekx commented at 2012-06-22 07:30:

You can fetch it with git clone https://github.com/rear/rear.git. This will copy it into a directory rear

Now you can edit etc/rear/local.conf in that directory. Now run sudo usr/sbin/rear -v mkbackup from inside the checkout.

dagwieers commented at 2012-06-22 07:48:

@jhoekx We should add that information on the Development page on the website. And in a Troubleshoot section in the future. (Maybe part of the FAQ ?)

cwnam14 commented at 2012-06-22 07:52:

Hello,
Actually, I am using RHEL version 4 and I have no idea about "git".
Please let me grab the concept of the "git".

jhoekx commented at 2012-06-22 09:29:

You can learn more about git by using the help here at github.

We are working on getting real snapshot packages for RHEL 4 working again.

dagwieers commented at 2012-06-22 13:24:

@cwnam14 You can try the package available from http://download.opensuse.org/repositories/Archiving:/Backup:/Rear:/Snapshot/RedHat_RHEL-4/noarch/

dagwieers commented at 2012-06-22 20:11:

@cwnam14 I wanted to reproduce your problem using the version from the master branch, however you did not share the configuration you were using. Can you post this here (or on Gist) ? Thanks !

dagwieers commented at 2012-06-24 10:36:

@cwnam14 We also improved that default tar output when errors occur, to assist in troubleshooting the problem. I would be interested to learn if that is useful for you as well.

cwnam14 commented at 2012-06-25 00:57:

I have tried the package you mentioned. But I have got some error when I
ran the rear.
Here is error message;

[09:40:52][root@chuck /etc/rear]$ rear -v mkbackup
Relax-and-Recover 1.13.0 / $Date$
Using log file: /var/log/rear/rear-chuck.log
Creating disk layout
Creating root filesystem layout
WARNING: To login as root via ssh you need to setup an authorized_keys file
in /root/.ssh
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Writing MBR to /dev/sda
Copying resulting files to usb location
Creating tar archive
'/tmp/rear.AiVmnUtDqGG3989/outputfs/rear/chuck/20120625.0941/backup.tar.gz'
Preparing archive operationOK
ERROR: tar failed with return code 2 and below output:

tar: Removing leading /' from member names tar: dev/input/mouse0: time stamp 2012-06-25 17:37:53 is 28605 s in the future tar: dev/input/mice: time stamp 2012-06-25 17:37:53 is 28605 s in the future tar: dev/input/event0: time stamp 2012-06-25 17:37:53 is 28605 s in the future tar: dev/md31: time stamp 2012-06-25 17:37:52 is 28604 s in the future --snip-- tar: dev/md0: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/zero: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/null: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/tty: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/ppp: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/net/tun: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/net: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/parport3: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/lp3: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/parport2: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/lp2: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/parport1: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/lp1: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/parport0: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/lp0: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/loop7: time stamp 2012-06-25 17:37:52 is 28604 s in the future --snip-- tar: dev/loop0: time stamp 2012-06-25 17:37:52 is 28604 s in the future tar: dev/root: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ram9: time stamp 2012-06-25 17:37:50 is 28602 s in the future --snip-- tar: dev/ram0: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hdc: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hdb1: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hdb: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda7: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda6: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda5: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda4: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda3: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda2: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda1: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/hda: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/vcsa: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/vcs: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ttyS7: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ttyS6: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ttyS5: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ttyS4: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ttyS3: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ttyS2: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/tty9: time stamp 2012-06-25 17:37:50 is 28602 s in the future --snip-- tar: dev/tty0: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/rawctl: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/xfrm: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/usersock: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/tcpdiag: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/tap9: time stamp 2012-06-25 17:37:50 is 28602 s in the future --snip-- tar: dev/tap0: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/skip: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/route6: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/route: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/nflog: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/ip6_fw: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/fwmonitor: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/dnrtmsg: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/arpd: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/rtc: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/agpgart: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/mouse0: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/mice: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/event0: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/random: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/port: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/mem: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/kmsg: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/full: time stamp 2012-06-25 17:37:50 is 28602 s in the future tar: dev/pts: time stamp 2012-06-25 17:37:46 is 28598 s in the future tar: Removing leading/' from hard link targets
tar: unrecognized option `--warning=no-xdev'

This means that the archiving process ended prematurely, or did
not even start. As a result it is unlikely you can recover this
system properly. Relax-and-Recover is therefore aborting execution.
Aborting due to an error, check /var/log/rear/rear-chuck.log for details

Terminated

Thank you for your help.

Best Regards,
Chuck

PS) I have attached conf file and log file. And I've formatted USB stick as
follows;

(parted) mkpartfs primary ext2 0 3824
(parted) p
Disk geometry for /dev/sda: 0.000-3824.000 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 3820.144 primary ext2

jhoekx commented at 2012-06-25 06:22:

@dagwieers That option was only introduced in tar 1.23. We should add a version check for it.

dagwieers commented at 2012-06-25 08:57:

I know, @gdha already mentioned this and it is on my todo list. I don't think we added an issue of this one.

dagwieers commented at 2012-06-25 09:00:

@jhoekx We better also limit the output of the tar log to 2 or 3 lines ?

jhoekx commented at 2012-06-25 09:04:

When printing the error message? Good idea.

dagwieers commented at 2012-06-25 09:10:

@jhoekx Where would you add the tar features checking ? I think we need to have a separate location in our tree where all feature testing is concentrated. In this case, tar is used for copying files as well. I prefer to not add it to the 50_make_backup.sh... (see mail from @gdha wrt. b0278f2)

cwnam14 commented at 2012-06-25 09:13:

Hello Guys,
Let me have the clue for this matter.
Thx,
Chuck

jhoekx commented at 2012-06-25 09:16:

In this case, we only need the version check in 50_make_backup. It's the only place where the warning is used. Just add it over there.

dagwieers commented at 2012-06-25 09:20:

@cwnam14 The problem is the option --warning=no-xdev, that option only exists in the latest version of tar and you are using an older version. If you remove that option from /usr/share/rear/backup/NETFS/default/50_make_backup.sh, the problem is solved.

cwnam14 commented at 2012-06-25 09:27:

OK.
I will run another test, and get back to you guys.

dagwieers commented at 2012-06-25 12:44:

@cwnam14 I committed a fix for the --warning=no-xdev problem, new packages are available from:
https://build.opensuse.org/package/binaries?package=rear&project=Archiving%3ABackup%3ARear%3ASnapshot&repository=RedHat_RHEL-4

cwnam14 commented at 2012-06-26 01:57:

Hello,
I'v run the another test based on the package you gave me and I've got the
following errors;

[10:38:40][root@chuck ~]$ rear format /dev/sda
USB device /dev/sda must be formatted with ext2/3/4 or btrfs file system
Please type Yes to format /dev/sda in ext3 format:
Yes
[10:39:22][root@chuck ~]$ rear -v mkbackup
Relax-and-Recover 1.13.0 / $Date$
Using log file: /var/log/rear/rear-chuck.log
Creating disk layout
Creating root filesystem layout
WARNING: To login as root via ssh you need to setup an authorized_keys file
in /root/.ssh
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Creating initramfs
Writing MBR to /dev/sda
Copying resulting files to usb location
Creating tar archive
'/tmp/rear.gROuzaGDVPg9418/outputfs/rear/chuck/20120626.1039/backup.tar.gz'
Archived 236 MiB [avg 5642 KiB/sec]OK
ERROR: tar failed with return code 141 and below output:

  • tar: /proc/: file is on a different filesystem; not dumped
    tar: /selinux/: file is on a different filesystem; not dumped
    tar: /sys/: file is on a different filesystem; not dumped*
    This means that the archiving process ended prematurely, or did
    not even start. As a result it is unlikely you can recover this
    system properly. Relax-and-Recover is therefore aborting execution.
    Aborting due to an error, check /var/log/rear/rear-chuck.log for details
    Terminated

When I go over the log, I've find out this : "gzip: stdout: No space left
on device" (Please refer to the attached)

And I've noticed that the size of my usb becomes only 100MB, when I run the
command "rear format /dev/sda"

[10:54:32][root@chuck /var/log/rear]$ fdisk -l /dev/sda
Disk /dev/sda: 4009 MB, 4009754624 bytes
255 heads, 63 sectors/track, 487 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux

Please help me out,

Thanks,
Chuck

jhoekx commented at 2012-06-26 06:16:

If you partition the disk manually, does it allow you to store more than 100M of data on it? There are some USB disks that report incorrect sizes or don't have the specified amount of flash.

Maybe trying with another USB device will solve the issue.

cwnam14 commented at 2012-06-26 06:24:

Yes, it does. OK, I'll try and get back to you..

cwnam14 commented at 2012-06-26 06:44:

Hello,
Same thing happend even though I am using an another USB memory stick:

[15:40:16][root@chuck ~]$* rear format /dev/sda*
USB device /dev/sda must be formatted with ext2/3/4 or btrfs file system
Please type Yes to format /dev/sda in ext3 format:
Yes

[15:41:08][root@chuck ~]$ *parted*
GNU Parted 1.6.19
Copyright (C) 1998 - 2004 Free Software Foundation, Inc.
This program is free software, covered by the GNU General Public License.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
Public License for more details.
Using /dev/hda
(parted) select /dev/sda
Using /dev/sda
(parted) p
Disk geometry for /dev/sda: 0.000-3934.000 megabytes
Disk label type: msdos
Minor    Start       End     Type      Filesystem  Flags
*1          0.031    101.975  primary   ext3        boot*
(parted)

Please help me out.

jhoekx commented at 2012-06-26 06:58:

Ok, I found the problem.

We use parted to format the usb device. On RHEL 4 parted doesn't support the 100% option we're using to format to the end of the disk.

Do you have a RHEL 5 or newer to format the disk?

Otherwise you will have to format the disk yourself and make sure the partition spans the complete disk. Once you did that, run these commands:

parted -s /dev/sda set 1 boot on
mkfs.ext3 -L REAR-000 /dev/sda1
tune2fs -c 0 -i 0 -o acl,journal_data,journal_data_ordered /dev/sda1

cwnam14 commented at 2012-06-26 07:45:

As per your direction, I did it. But when I try to recovering from the
backup image, I've got another error.
I've attached the screen shot for the error.

Pls help me out again.

jhoekx commented at 2012-06-26 08:56:

Attachments don't work here...

Can you post the image somewhere on the net (imgur...)?

cwnam14 commented at 2012-06-26 09:05:

Here is my local.conf file;

[16:17:22][root@chuck /etc/rear]$ vi local.conf
# sample local configuration
# Create Rear rescue media as ISO image
#OUTPUT=ISO
# optionally define (non-default) backup software, e.g. TSM, NBU, DP, BACULA
# BACKUP=TSM
BACKUP=NETFS
OUTPUT=USB
BACKUP_URL=usb:///dev/sda1
#BACKUP_URL=usb:///dev/disk/by-label/REAR-000
# the following is required on older VMware VMs
MODULES_LOAD=( vmxnet )
# to see boot messages on the serial console (uncomment next line)
# KERNEL_CMDLINE="console=tty0 console=ttyS1"

and you can see the screen shot at following URL;

http://imgur.com/O5AdO

jhoekx commented at 2012-06-26 09:11:

You should be able to continue the restore by choosing option 4 and then remove the line containing '/dev/hda4 on'

Can you post /var/lib/rear/layout/disklayout.conf and parted -s /dev/hda p so we can debug why that code was generated?

cwnam14 commented at 2012-06-26 09:13:

OK. I will get back to you tomorrow.
See ya.

cwnam14 commented at 2012-06-26 23:57:

I ran the test as per your direction, but another bump coming up.

  1. View Relax-and-Recover log
  2. View original disk space usage
  3. Go to Relax-and-Recover shell
  4. Edit restore script (diskrestore.sh)
  5. Continue restore script
  6. Abort Relax-and-Recover
    #? 5
    Start system layout restoration.
    Creating partitions for disk /dev/hda (msdos)
    An error occured during layout recreation.
  7. View Relax-and-Recover log
  8. View original disk space usage
  9. Go to Relax-and-Recover shell
  10. Edit restore script (diskrestore.sh)
  11. Continue restore script
  12. Abort Relax-and-Recover

RESCUE chuck:/var/lib/rear/layout # cat disklayout.conf
disk /dev/hda 82348277760 msdos
part /dev/hda 2097414144 32256 primary boot /dev/hda1
part /dev/hda 4194892800 2097446400 primary none /dev/hda2
part /dev/hda 4194892800 6292339200 primary none /dev/hda3
part /dev/hda 1024 10487232000 primary /dev/hda4
part /dev/hda 4194860544 10487264256 logical /dev/hda5
part /dev/hda 2138540544 14682157056 logical /dev/hda6
part /dev/hda 526385664 16820729856 logical /dev/hda7
#disk /dev/hdb 40982151168 msdos
#part /dev/hdb 40970087424 32256 primary boot /dev/hdb1
#disk /dev/hdc 4294965248
#disk /dev/sda 4009754624 msdos
#part /dev/sda 4005679104 32256 primary boot /dev/sda1
fs /dev/hda1 / ext3 uuid=909d6d5f-234a-472c-8fb5-539d6f29122d label=/
blocksize=4096 reserved_blocks=4% max_mounts=-1 check_interval=0d
bytes_per_inode=8176 options=rw
fs /dev/hda7 /home ext3 uuid=39abf107-daef-4296-a57b-1e8f87ac52c0
label=/home blocksize=1024 reserved_blocks=4% max_mounts=-1
check_interval=0d bytes_per_inode=4095 options=rw
fs /dev/hda2 /opt ext3 uuid=9c439b07-d67a-44cc-a494-019cad158cab label=/opt
blocksize=4096 reserved_blocks=4% max_mounts=-1 check_interval=0d
bytes_per_inode=8176 options=rw
fs /dev/hda5 /usr ext3 uuid=bd797b62-12e2-4a20-b021-0a0f3eee0dfc label=/usr
blocksize=4096 reserved_blocks=4% max_mounts=-1 check_interval=0d
bytes_per_inode=8176 options=rw
fs /dev/hda3 /var ext3 uuid=b3bb51f6-9471-49f7-be61-a7dfa423b95d label=/var
blocksize=4096 reserved_blocks=4% max_mounts=-1 check_interval=0d
bytes_per_inode=8176 options=rw
swap /dev/hda6 uuid= label=

RESCUE chuck:/var/lib/rear/layout # parted -s /dev/hda p
Disk geometry for /dev/hda: 0.000-78533.437 megabytes
Disk label type: msdos
Minor Start End Type Filesystem Flags
1 0.031 2000.280 primary ext3 boot
2 2000.281 6000.842 primary ext3
3 6000.842 10001.403 primary ext3
4 10001.404 10009.248 primary

jhoekx commented at 2012-06-27 06:16:

You will need to change the line (in /var/lib/rear/layout/disklayout.conf)

part /dev/hda 1024 10487232000 primary  /dev/hda4

to

part /dev/hda 1024 10487232000 extended none  /dev/hda4

And then try rear recover again.

I will need to set up a test VM with RHEL 4 and extended partitions.

cwnam14 commented at 2012-06-27 08:13:

I am running the recovery again as follow;

RESCUE chuck:/var/lib/rear/layout # *rear recover*
Relax-and-Recover 1.13.0 / $Date$
Using log file: /var/log/rear/rear-chuck.log
NOTICE: Will do driver migration
Select a backup archive.
1) 20120626.1617
2) Abort
#? 1
2012-06-28 01:21:41 Backup archive
/tmp/rear.LDKRnIKzuIO7131/outputfs/rear/chuck/20120626.1617/backup.tar.gz
chosen.
Backup archive
/tmp/rear.LDKRnIKzuIO7131/outputfs/rear/chuck/20120626.1617/backup.tar.gz
chosen.
Calculating backup archive size
Backup archive size is 786M (compressed)
Comparing disks.
Disk configuration is identical, proceeding with restore.

But I think it is taking too much time to go ahead and it is stuck. How can
I check the progress of this job?
Please let me know.

jhoekx commented at 2012-06-27 08:18:

Check /var/log/rear/rear-chuck.log.

If there's nothing suspicious, cancel this run and restart rear with

# rear -D recover

Now the log will definitely print where it's wrong.

cwnam14 commented at 2012-06-27 08:39:

looks like this run looping infinitely..
I found out the following messages repeating in
/var/log/rear/rear-chuck.log.
++ '[' -z '' ']'
++ willdodev=
++ willdotype=
++ cp /var/lib/rear/layout/disktodo.conf
/var/lib/rear/layout/disktodo.conf.tmp
+++ grep '^todo' /var/lib/rear/layout/disktodo.conf
++ read status thisdev type
++ Debug 'Testing part for dependencies...'
++ test ''
++ deps=($(grep "^$thisdev\ " $LAYOUT_DEPS | cut -d " " -f "2"))
+++ grep '^part\ ' /var/lib/rear/layout/diskdeps.conf
+++ cut -d ' ' -f 2
++ Debug 'deps (0): '
++ test ''
++ donedeps=0
++ '[' 0 -eq 0 ']'
++ Debug 'All dependencies for part are present, processing...'
++ test ''
++ willdodev=part
++ willdotype=
++ break
++ rm /var/lib/rear/layout/disktodo.conf.tmp
++ '[' -n part ']'
++ create_device part
++ local device=part
++ local type=
++ local name
++ cat
++ echo '# Create part ()'
++ type -t create_
++ cat
++ mark_as_done part
++ Debug 'Marking part as done.'
++ test ''
++ sed -i 's;todo\ part\ ;done\ part\ ;' /var/lib/rear/layout/disktodo.conf

On Wed, Jun 27, 2012 at 5:18 PM, Jeroen Hoekx <
reply@reply.github.com

wrote:

Check /var/log/rear/rear-chuck.log.

If there's nothing suspicious, cancel this run and restart rear with

# rear -D recover

Now the log will definitely print where it's wrong.


Reply to this email directly or view it on GitHub:
https://github.com/rear/rear/issues/119#issuecomment-6597385

jhoekx commented at 2012-06-27 08:44:

Can you post the output of /var/lib/rear/layout/disktodo.conf and /var/lib/rear/layout/diskdeps.conf in the github comments?

Please put them in ``` markers (see the help on GitHub Flavored Markdown in the comments box).

cwnam14 commented at 2012-06-27 09:28:

/var/lib/rear/layout/disktodo.conf

done /dev/hda disk
done /dev/hda1 part
done /dev/hda2 part
done /dev/hda3 part
todo  part
todo /dev/hda5 part
todo /dev/hda6 part
todo /dev/hda7 part
todo fs:/ fs
todo fs:/home fs
todo fs:/opt fs
todo fs:/usr fs
todo fs:/var fs
todo swap:/dev/hda6 swap

/var/lib/rear/layout/diskdeps.conf

/dev/hda1 /dev/hda
/dev/hda2 /dev/hda
/dev/hda3 /dev/hda
/dev/hda
/dev/hda5 /dev/hda
/dev/hda6 /dev/hda
/dev/hda7 /dev/hda
fs:/ /dev/hda1
fs:/home /dev/hda7
fs:/home fs:/
fs:/opt /dev/hda2
fs:/opt fs:/
fs:/usr /dev/hda5
fs:/usr fs:/
fs:/var /dev/hda3
fs:/var fs:/
swap:/dev/hda6 /dev/hda6

jhoekx commented at 2012-06-27 09:37:

I see.

You copied my line above too good I think. My mistake. You should have only one space everywhere.

part /dev/hda 1024 10487232000 extended none /dev/hda4

cwnam14 commented at 2012-06-27 09:43:

Am I wrong to put the conf files? Do I have to do it again?

jhoekx commented at 2012-06-27 09:47:

No. Nothing wrong with your posts. My comment above was wrong. You have to edit /var/lib/rear/layout/disklayout.conf and remove one of the two space characters before /dev/hda4.

cwnam14 commented at 2012-06-27 09:54:

I did it, but another bump coming up.

RESCUE chuck:~ # rear recover
Relax-and-Recover 1.13.0 / $Date$
Using log file: /var/log/rear/rear-chuck.log
NOTICE: Will do driver migration
Select a backup archive.
1) 20120626.1617
2) Abort
#? 1
2012-06-28 03:51:44 Backup archive /tmp/rear.ZQhSXPrZRu28567/outputfs/rear/chuck/20120626.1617/backup.tar.gz chosen.
Backup archive /tmp/rear.ZQhSXPrZRu28567/outputfs/rear/chuck/20120626.1617/backup.tar.gz chosen.
Calculating backup archive size
Backup archive size is 786M (compressed)
Comparing disks.
Disk configuration is identical, proceeding with restore.
Start system layout restoration.
Creating partitions for disk /dev/hda (msdos)
An error occured during layout recreation.

1) View Relax-and-Recover log
2) View original disk space usage
3) Go to Relax-and-Recover shell
4) Edit restore script (diskrestore.sh)
5) Continue restore script
6) Abort Relax-and-Recover

jhoekx commented at 2012-06-27 09:55:

The last lines of the log will tell us what's wrong...

cwnam14 commented at 2012-06-27 09:56:

This is log..

+++ echo -e 'Creating partitions for disk /dev/hda (msdos)'
+++ parted -s /dev/hda mklabel msdos
+++ parted -s /dev/hda mkpart primary 0 2000
+++ parted -s /dev/hda set 1 boot on
+++ parted -s /dev/hda mkpart primary 2000 6000
+++ parted -s /dev/hda mkpart primary 6000 10001
+++ parted -s /dev/hda mkpart extended 10001 78533
+++ parted -s /dev/hda mkpart logical 10001 14001
+++ parted -s /dev/hda set /dev/hda5 on
Error: Expecting a partition number.
2012-06-28 03:51:45 An error occured during layout recreation.
2012-06-28 03:55:26 User selected: 6) Abort Relax-and-Recover
2012-06-28 03:55:26 Error detected during restore.

cwnam14 commented at 2012-06-27 10:02:

I'm sorry but I gotta go now. And I'll be out of office for a couple of days.
See you next Monday.. Have a good day..

cwnam14 commented at 2012-07-01 23:10:

Hello, I'm back..
Please let me how to proceed.

cwnam14 commented at 2012-07-02 08:38:

I'm still in the middle of recovering the Linux system and no further progress.
Plz help me out!!!

cwnam14 commented at 2012-07-03 07:10:

Hello,

I'm still having problem with recovering. Plz help me our for this matter.

Thanks,
Chuck

jhoekx commented at 2012-07-03 16:27:

Sorry,

I'm on holiday and can't debug it right now... For two more weeks.
Your best bet is to change the partition lines in the disklayout.conf
file to include 'none' just like the one you already changed.

cwnam14 commented at 2012-08-16 23:59:

Hello,

I'm still trying to solve the problem with recovering my system.
This is what I've done till now;

  1. I've change the disklayout.conf file as per your direction
part /dev/hda 4194860544 10487264256 logical none /dev/hda5
part /dev/hda 2138540544 14682157056 logical none /dev/hda6
part /dev/hda 526385664 16820729856 logical none /dev/hda7
  1. I've finished recovering my system
RESCUE chuck:/var/lib/rear/layout # rear recover
Relax-and-Recover 1.13.0 / $Date$
Using log file: /var/log/rear/rear-chuck.log
NOTICE: Will do driver migration
Select a backup archive.
1) 20120626.1617
2) Abort
#? 1
2012-08-17 17:29:08 Backup archive /tmp/rear.DLEZFVhXsCD4223/outputfs/rear/chuck/20120626.1617/backup.tar.gz chosen.
Backup archive /tmp/rear.DLEZFVhXsCD4223/outputfs/rear/chuck/20120626.1617/backup.tar.gz chosen.
Calculating backup archive size
Backup archive size is 786M (compressed)
Comparing disks.
Disk configuration is identical, proceeding with restore.
Start system layout restoration.
Creating partitions for disk /dev/hda (msdos)
Creating ext3-filesystem / on /dev/hda1
Mounting filesystem /
Creating ext3-filesystem /home on /dev/hda7
Mounting filesystem /home
Creating ext3-filesystem /opt on /dev/hda2
Mounting filesystem /opt
Creating ext3-filesystem /usr on /dev/hda5
Mounting filesystem /usr
Creating ext3-filesystem /var on /dev/hda3
Mounting filesystem /var
Creating swap on /dev/hda6
Disk layout created.
Restoring from '/tmp/rear.DLEZFVhXsCD4223/outputfs/rear/chuck/20120626.1617/backup.tar.gz'
Restored 2121 MiB [avg 21721 KiB/sec]OK
Restored 2121 MiB in 101 seconds [avg 21506 KiB/sec]
Updated initramfs with new drivers for this system.
Installing GRUB boot loader
Finished recovering your system. You can explore it under '/mnt/local'.
RESCUE chuck:/var/lib/rear/layout # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hda1             2.0G  283M  1.6G  15% /mnt/local
/dev/hda7             487M   11M  456M   3% /mnt/local/home
/dev/hda2             3.9G   40M  3.7G   2% /mnt/local/opt
/dev/hda5             3.9G  2.1G  1.7G  56% /mnt/local/usr
/dev/hda3             3.9G  107M  3.6G   3% /mnt/local/var
  1. I've removed USB drive and rebooted my system, but it doesn't come up at all

What should I do now?
Please give me a direction.
Thanks

jhoekx commented at 2012-08-17 06:00:

That looks pretty good already.

Where does it stop when rebooting? Do you see grub?

cwnam14 commented at 2012-08-17 06:18:

My system doesn't start at all. On screen of my monitor, I can only see the cursor blinking.
I can't see grub.

jhoekx commented at 2012-08-17 06:27:

So we will try to figure out why grub was not installed.

  • Reboot into the rescue system.
  • mount /, /usr and /var in /mnt/local
  • bind mount /dev, /sys and /proc in /mnt/local
  • chroot /bin/bash /mnt/local
  • grub
  • root (hd0, 0)

  • setup

Can you print out what that last command says?

cwnam14 commented at 2012-08-17 07:03:

I am having the following error;

11: Unrecognized device string

cwnam14 commented at 2012-08-17 08:12:

Any advice for this matter?

jhoekx commented at 2012-08-17 08:18:

It should be

> setup (hd0)

cwnam14 commented at 2012-08-17 08:25:

I'v got the below;

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2
/boot/grub/grub.conf"... succeeded

jhoekx commented at 2012-08-17 08:26:

Ok. That means the grub bootloader was installed correctly.

Can you print the output of /boot/grub/menu.lst?

cwnam14 commented at 2012-08-17 08:29:

Here we go;

[02:27:59][root@chuck /etc]$ cat /boot/grub/menu.lst
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd0,0)
#          kernel /boot/vmlinuz-version ro root=/dev/hda1
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux AS (2.6.9-22.ELsmp)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-22.ELsmp ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.9-22.ELsmp.img
title Red Hat Enterprise Linux AS-up (2.6.9-22.EL)
        root (hd0,0)
        kernel /boot/vmlinuz-2.6.9-22.EL ro root=LABEL=/ rhgb quiet
        initrd /boot/initrd-2.6.9-22.EL.img
title Other
        rootnoverify (hd1,0)
        chainloader +1

jhoekx commented at 2012-08-17 08:30:

That looks good. I don't understand why it wouldn't boot.

Do you have any other disks in the system?

cwnam14 commented at 2012-08-17 08:32:

Yes, I do.

jhoekx commented at 2012-08-17 08:40:

Are you sure you're booting from the correct disk?

It should look like:

[jeroen@firefly ~]$ dd if=/dev/sda count=1 bs=512 | file -
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.000107779 s, 4.8 MB/s
/dev/stdin: x86 boot sector; GRand Unified Bootloader, stage1 version 0x3, stage2 address 0x2000, stage2 segment 0x200; partition 1: ID=0x83, active, starthead 1, startsector 64, 390562 sectors; partition 2: ID=0x8e, starthead 89, startsector 391168, 780859392 sectors; partition 3: ID=0x83, starthead 254, startsector 781250560, 195522560 sectors, code offset 0x48

cwnam14 commented at 2012-08-17 08:44:

I've got 2 disks in my system which have a windows OS and Linux OS, so that I am sure I am booting from the correct disk.

[02:41:14][root@chuck /var/log]$ dd if=/dev/hda count=1 bs=512 | file -
1+0 records in
1+0 records out
/dev/stdin: x86 boot sector, code offset 0x48

jhoekx commented at 2012-08-17 08:46:

Where do you choose the OS?
Can you still make the choice now?

cwnam14 commented at 2012-08-17 08:48:

On booting the system in BIOS, I choose the booting OS.
If I want to change it. I need to restart my system.

cwnam14 commented at 2012-08-17 08:51:

Do you want me to do it, right away?

cwnam14 commented at 2012-08-17 09:00:

Hello,

I've just reboot the system and it is coming up... so strange!!!

cwnam14 commented at 2012-08-17 09:02:

Anyway, thank you so much..

jhoekx commented at 2012-08-17 09:03:

You're welcome and thanks for your 2 months patience :-)

dagwieers commented at 2012-08-21 14:42:

Can we close this ticket ? Or are there some known open issues we have to track that comes out of this support-request ?


[Export of Github issue for rear/rear.]