#446 Issue closed: ReaR - Ubuntu 14.04 - /dev/sda main disk not detected

Labels: bug, support / question

niteenk opened issue at 2014-08-04 10:30:

I tried ReaR on Ubuntu 14.04 using bootable usb disk. Backup went through without problem but while recovering I can see /dev/sda which is my main disk having Ubuntu installed on it is not detected. /dev/sda is missing when I checked with fdisk -l.

Is this known issue or ReaR is not supported on Ubuntu 14.04. What should I check to debug this issue?

Any help really appreciated.

thanks,

gdha commented at 2014-08-04 11:59:

@niteenk It depends how Ubuntu 14.04 is detecting external disk devices: is udevd used? Could be that on the rescue image udevd wasn't started properly? The issue must be correlated with udev to my opinion.

robozu commented at 2014-09-22 15:38:

I have the same issue.
i created a vm, installed ubuntu 14.04 x64, installed rear, created an bootable rescue iso, killed hdd with dd.
in the recovery system "ps -aux|grep udevd" finds one process, so i guess it is running.
rear log says nothing useful for me:

2014-09-22 17:25:10.035053042 Looking for sda...
2014-09-22 17:25:10.036847681 Device sda exists.
2014-09-22 17:25:10.042194765 Size of device sda matches.
2014-09-22 17:25:10.046062842 Disk configuration is identical, proceeding with restore.
2014-09-22 17:25:10.065497033 Including layout/prepare/default/30_map_disks.sh
2014-09-22 17:25:10.068729340 Including layout/prepare/default/31_remove_exclusions.sh
2014-09-22 17:25:10.071858965 Including layout/prepare/default/32_apply_mappings.sh
2014-09-22 17:25:10.074711822 Including layout/prepare/default/40_autoresize_disks.sh
2014-09-22 17:25:10.077619536 Including layout/prepare/default/50_confirm_layout.sh
2014-09-22 17:25:10.081850985 Including layout/prepare/default/51_list_dependencies.sh
2014-09-22 17:25:10.120150964 Including layout/prepare/default/52_exclude_components.sh
2014-09-22 17:25:10.126122977 Including layout/prepare/default/54_generate_device_code.sh
2014-09-22 17:25:10.141582493 Testing /dev/sda for dependencies...
2014-09-22 17:25:10.147542817 deps (0): 
2014-09-22 17:25:10.153620382 All dependencies for /dev/sda are present, processing...
2014-09-22 17:25:10.161351614 ERROR: BUG BUG BUG!  Disk /dev/sda is not a block device. 
=== Issue report ===
Please report this unexpected issue at: https://github.com/rear/rear/issues
Also include the relevant bits from /var/log/rear/rear-reartest.log

HINT: If you can reproduce the issue, try using the -d or -D option !
=== Stack trace ===
Trace 0: /bin/rear:249 main
Trace 1: /usr/share/rear/lib/recover-workflow.sh:29 WORKFLOW_recover
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/layout/prepare/default/54_generate_device_code.sh:52 source
Trace 5: /usr/share/rear/lib/layout-functions.sh:35 create_device
Trace 6: /usr/share/rear/layout/prepare/GNU/Linux/10_include_partition_code.sh:35 create_disk
Trace 7: /usr/share/rear/lib/_input-output-functions.sh:156 BugIfError
Trace 8: /usr/share/rear/lib/_input-output-functions.sh:144 BugError
Message: BUG BUG BUG!  Disk /dev/sda is not a block device.

and from the -D run:
++ Debug 'All dependencies for /dev/sda are present, processing...'
++ test ''
++ willdodev=/dev/sda
++ willdotype=disk
++ break
++ rm /var/lib/rear/layout/disktodo.conf.tmp
++ '[' -n /dev/sda ']'
++ create_device /dev/sda disk
++ local device=/dev/sda
++ local type=disk
++ local name
++ cat
++ echo '# Create /dev/sda (disk)'
++ type -t create_disk
++ create_disk /dev/sda
++ local component disk size label junk
++ read component disk size label junk
+++ grep '^disk /dev/sda ' /var/lib/rear/layout/disklayout.conf
++ [[ -b /dev/sda ]]
++ BugIfError 'Disk /dev/sda is not a block device.'
++ ((  1 != 0  ))
++ BugError 'Disk /dev/sda is not a block device.'
++ '[' Disk /dev/sda is not a block device. -eq Disk /dev/sda is not a block device. ']'
++ EXIT_CODE=1
++ Error 'BUG BUG BUG! ' 'Disk /dev/sda is not a block device.' '

gdha commented at 2014-09-22 16:55:

I will try it out myself in the coming days and will be investigate from there...

gdha commented at 2014-11-21 11:52:

I can now confirm you are right - /dev/sda was not created - and /sys/block/sda seems to be populated

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

has to do with systemd-udev:

/etc/init.d/udev:if [ -e /etc/udev/udev.conf ]; then
/etc/init.d/udev:  . /etc/udev/udev.conf
$ cat /etc/init/udev.conf
# udev - device node and kernel event manager
#
# The udev daemon receives events from the kernel about changes in the
# /sys filesystem and manages the /dev filesystem.

description     "device node and kernel event manager"
...
exec /lib/systemd/systemd-udevd --daemon

rmerch1 commented at 2014-12-02 17:28:

Thanks. I am still getting an error. I created the script and also copied it over. I still get the same error when I run 'rear recover' after that. Does anyone have a step by step that worked for them? Thanks in advance.

gdha commented at 2014-12-03 08:17:

@rmerch1 check first the dmesg output for the disk name to be created and then verify if the devices were created under /dev/.
Please check the script /etc/scripts/system-setup.d/99-makedev.sh which is the work-around for Ubuntu 14.04. However, I would rather know why udevd does not get triggered to create automatically the devices?

rmerch1 commented at 2014-12-03 17:12:

Thank you for responding. Do I run the script after it gives me the bug error message and then run 'rear recover'?

gdha commented at 2014-12-05 17:22:

@rmerch1 When you boot from the rescue image the 99-makedev.sh should run automatically (if you look carefully at your screen it should mention that it creates block devices. So, once logged in the block devices should be visible under /dev/ directory. If not, check with the dmesg command which block device should have been created and then you could try:

cd /dev
MAKEDEV -v <block-device>

gdha commented at 2015-01-25 17:05:

@rmerch1 Any luck with rear recovery?

rmerch1 commented at 2015-01-25 17:12:

No, thank you for following up. is there a newer version that has the fix already I could test with? The workaround may work but I was not able to get it to work. Has anyone else verified it works?

gdha commented at 2015-02-23 13:40:

added to the release notes so we can close this issue - if the problem re-occurs then re-open or create a new issue

rmerch1 commented at 2015-02-23 14:00:

Thanks, I appreciate it.

On Mon, Feb 23, 2015 at 7:40 AM, gdha notifications@github.com wrote:

added to the release notes so we can close this issue - if the problem
re-occurs then re-open or create a new issue


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

rmerch1 commented at 2015-03-16 19:15:

I just wanted to confirm that thankfully this issue and the keyboard not working in Ubuntu 14.04 both seem to be resolved with 1.17. Thank you.


[Export of Github issue for rear/rear.]