#1114 Issue closed: ERROR: BUG BUG BUG! Filesystem for device '/dev/sdf1' could not be found

Labels: support / question, fixed / solved / done

LisaFlummi opened issue at 2016-12-08 11:10:

  • rear version (/usr/sbin/rear -V): Relax-and-Recover 1.19 / Git
  • OS version (cat /etc/rear/os.conf or lsb_release -a): Debian 5.0.10 (lenny) // needs to be tested on 5 first but will be used with 8 later of course.

Hi!
I know that this error has been mentioned in another thread befor but sadly the solutions didn't help me.
I'm quite new with rear and am trying to creat the USB Stick, which is not working. It's failing with the error above.

From log:

2016-12-08 11:01:09 Copied kernel and initrd.cgz to rear/NOS-C10056279/20161208.1100
2016-12-08 11:01:09 Saved /home/support/rear-1.19/var/log/rear/rear-NOS-C10056279.log as rear/NOS-C10056279/20161208.1100/rear.log
2016-12-08 11:01:09 Including output/USB/Linux-i386/85_make_USB_bootable.sh
2016-12-08 11:01:09 ERROR: BUG BUG BUG!  Filesystem for device '/dev/sdf1' could not be found

NOS-C10056279:/home/support/rear-1.19# blkid
[...]
/dev/sdf1: LABEL="REAR-000" UUID="7b227a37-7a12-44a9-8db1-f834f28ebc26" TYPE="ext3"

I have formated the stick with rear, as suggested in the documentation with ext3.

As I said... I'm completly new with rear and hoping for any helpfull adivce! Thank you!

Lisa

gozora commented at 2016-12-08 11:57:

Hi @Flummifloh ,

Can you try to edit usr/share/rear/output/USB/Linux-i386/850_make_USB_bootable.sh and add sleep 2 before this code:

usb_filesystem=$(grep -E "^($USB_DEVICE|$REAL_USB_DEVICE)\\s" /proc/mounts | cut -d' ' -f3 | tail -1)

so it looks like:

sleep 2
usb_filesystem=$(grep -E "^($USB_DEVICE|$REAL_USB_DEVICE)\\s" /proc/mounts | cut -d' ' -f3 | tail -1)

And rerun rear mkbackup ?

If it does not work please post content of /etc/rear/local.conf /etc/rear/site.conf and log from rear -d -D mkrescue (should be located in /var/log/rear)

Thanks

V.

LisaFlummi commented at 2016-12-08 13:16:

Hi and thanks for the fast reply

Sadly it didn't work.

Content oflocal.conf

write the rescue initramfs to USB and update the USB bootloader

OUTPUT=USB

create a backup using the internal NETFS method, using 'tar'

BACKUP=NETFS
OUTPUT_URL=usb:///dev/disk/by-label/REAR-000

write both rescue image and backup to the device labeled REAR-000

BACKUP_URL=usb:///dev/disk/by-label/REAR-000

I wasn't sure about the site.conf so I don't have it at the moment. Do I need it für USB?

Content log from rear-d -D mrescure

+++ echo '2016-12-08 13:13:41.429138946 Exit task '''cleanup_build_area_and_end_program''''
2016-12-08 13:13:41.429138946 Exit task 'cleanup_build_area_and_end_program'
+++ eval cleanup_build_area_and_end_program
++++ cleanup_build_area_and_end_program
++++ Log 'Finished in 57 seconds'
++++ test 1 -gt 0
+++++ Stamp
+++++ date '+%Y-%m-%d %H:%M:%S.%N '
++++ echo '2016-12-08 13:13:41.433160290 Finished in 57 seconds'
2016-12-08 13:13:41.433160290 Finished in 57 seconds
++++ test 1
++++ LogPrint 'You should also rm -Rf /tmp/rear.F8EyCFkhpCIQuFi'
++++ Log 'You should also rm -Rf /tmp/rear.F8EyCFkhpCIQuFi'
++++ test 1 -gt 0
+++++ Stamp
+++++ date '+%Y-%m-%d %H:%M:%S.%N '
++++ echo '2016-12-08 13:13:41.437022937 You should also rm -Rf /tmp/rear.F8EyCFkhpCIQuFi'
2016-12-08 13:13:41.437022937 You should also rm -Rf /tmp/rear.F8EyCFkhpCIQuFi
++++ Print 'You should also rm -Rf /tmp/rear.F8EyCFkhpCIQuFi'
++++ test -n 1
++++ echo -e 'You should also rm -Rf /tmp/rear.F8EyCFkhpCIQuFi'
++++ Log 'End of program reached'
++++ test 1 -gt 0
+++++ Stamp
+++++ date '+%Y-%m-%d %H:%M:%S.%N '
++++ echo '2016-12-08 13:13:41.441268721 End of program reached'
2016-12-08 13:13:41.441268721 End of program reached
+++ for task in '"${EXIT_TASKS[@]}"'
+++ Debug 'Exit task '''exec 8>&-''''
+++ test -n 1
+++ Log 'Exit task '''exec 8>&-''''
+++ test 1 -gt 0
++++ Stamp
++++ date '+%Y-%m-%d %H:%M:%S.%N '
+++ echo '2016-12-08 13:13:41.445177007 Exit task '''exec 8>&-''''
2016-12-08 13:13:41.445177007 Exit task 'exec 8>&-'
+++ eval 'exec 8>&-'
++++ exec
+++ for task in '"${EXIT_TASKS[@]}"'
+++ Debug 'Exit task '''exec 7>&-''''
+++ test -n 1
+++ Log 'Exit task '''exec 7>&-''''
+++ test 1 -gt 0
++++ Stamp
++++ date '+%Y-%m-%d %H:%M:%S.%N '
+++ echo '2016-12-08 13:13:41.449313089 Exit task '''exec 7>&-''''
2016-12-08 13:13:41.449313089 Exit task 'exec 7>&-'
+++ eval 'exec 7>&-'
++++ exec
+++ for task in '"${EXIT_TASKS[@]}"'
+++ Debug 'Exit task '''''''
+++ test -n 1
+++ Log 'Exit task '''''''
+++ test 1 -gt 0
++++ Stamp
++++ date '+%Y-%m-%d %H:%M:%S.%N '
+++ echo '2016-12-08 13:13:41.453416976 Exit task '''''''
2016-12-08 13:13:41.453416976 Exit task ''
+++ eval ''

gozora commented at 2016-12-08 14:08:

Maybe you can try to update your local.conf according documentation:

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

Log you've posted is far from being complete.
Can you upload full version?

LisaFlummi commented at 2016-12-08 14:18:

USB_DEVICE instead of OUTPUT_URL doesn't work either. I already tried when readingthrough this: https://github.com/rear/rear/issues/579

For the log you are right... my fault! Please see attached
REAR log.txt

gozora commented at 2016-12-08 14:38:

It should be working just fine, however it is not ...

Can you do following on NOS-C10056279:

mkdir -p /mnt/rear_test
mount /dev/disk/by-label/REAR-000 /mnt/rear_test
cat /proc/mounts

And paste output here?

To do the clenaup:

umount /mnt/rear_test
rmdir /mnt/rear_test

LisaFlummi commented at 2016-12-08 14:44:

rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec 0 0
none /proc proc rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,size=10240k,mode=755 0 0
/dev/sda1 / ext3 rw,noatime,nodiratime,errors=continue,commit=5,data=ordered 0 0
tmpfs /lib/init/rw tmpfs rw,nosuid,mode=755 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,nodev,noexec 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
/dev/sda6 /var/log ext3 rw,noatime,nodiratime,errors=continue,commit=5,data=ordered 0 0
/dev/sda7 /opt ext3 rw,noatime,nodiratime,errors=continue,commit=5,data=ordered 0 0
/dev/sda8 /var/www/desert ext3 rw,noatime,nodiratime,errors=continue,commit=5,data=ordered 0 0
tmpfs /tmp tmpfs rw,nosuid,nodev 0 0
/dev/hda1 /media/cf vfat rw,uid=33,gid=33,fmask=0022,dmask=0022,codepage=cp437,iocharset=utf8 0 0
/dev/sdb1 /media/sdb1 ext3 rw,nosuid,nodev,noexec,errors=continue,acl,data=ordered 0 0
/dev/sdb1 /mnt/rear_test ext3 rw,errors=continue,acl,data=ordered 0 0

Don't wonder... It's not sdf anymore because I had a restart.

gozora commented at 2016-12-08 14:46:

That is exactly what I need to see :-)
I need you to mount USB drive and post content of /proc/mounts while mounted ...

LisaFlummi commented at 2016-12-08 14:54:

I'm a bit confused because... isn't it mounted? It's /dev/sdb1
May I'm a bit dumb at the moment... too much thinking today ;-) But I'm gratefull for your help.

gozora commented at 2016-12-08 15:10:

Lucky you that you only a bit confused :-)
In the debug log I can see you have /home/support/rear-1.19/etc/rear/site.conf with:

BACKUP_URL=usb:///dev/sdf1

and /home/support/rear-1.19/etc/rear/local.conf with:

BACKUP_URL=usb:///dev/disk/by-label/REAR-000

Does it have any special purpose?
Maybe you can post here content of all files from /home/support/rear-1.19/etc/rear/*.conf

LisaFlummi commented at 2016-12-08 15:18:

Oh! That's an old configuration when trying different things yesterday. There is no specialy purpose. Actually I thought I deleted the site.conf!
I don't mind asking stupid questions because that's a good way to learn so... does the USB-device have to have a min. size?

gozora commented at 2016-12-08 15:59:

You should be careful about things you put in ReaR configuration directory (etc/rear) because once they have *.conf suffix they might be sourced during execution. I don't know if reusing configuration options can be a problem, so I'd say that ReaR's behavior in such cases is undefined ? ( @gdha @jsmeix and other ReaR elders have much better overview about possible implications).
What I would recommend you is to start with single configuration file in etc/rear (local.conf is the one I like most) and try just a minimal configuration listed above.

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

Then

  1. rear --format <your_usb_device>
  2. unplug and plug <your_usb_device> (this is not mandatory, but it helped to couple of times with some "strange" behavior (especially with systemd)
  3. rear mkbackup

Regarding minimal size of USB I think that there isn't any, you just need device that is capable of storing backup or your OS.

jsmeix commented at 2016-12-08 16:09:

For exact information what user config files
ReaR sources see usr/sbin/rear therein
in particular the code section regarding
"All workflows need to read the configurations first"
and therein in particular this piece of code

# User configuration files, last thing is to overwrite variables if we are in the rescue system:
for config in site local rescue ; do
    test -r "$CONFIG_DIR/$config.conf" && Source "$CONFIG_DIR/$config.conf" || true
done

so that local.conf overwrites existing settings in site.conf.

jsmeix commented at 2016-12-08 16:15:

@Flummifloh

In general regarding how to use the currently
newest rear GitHub master code:

Basically "git clone" it into a directory and
then run rear from within that directory like:

# git clone https://github.com/rear/rear.git

# cd rear

# vi etc/rear/local.conf

# usr/sbin/rear -d -D mkbackup

gdha commented at 2016-12-12 09:35:

@Flummifloh syslinux is version 3.71 (quite old) and do you have extlinux installed? And, what is the size of your USB device? DO not forget to format the USB device, but I guess that was performed as you used /dev/disk/by-label/REAR-000 (or am I wrong)?

LisaFlummi commented at 2016-12-12 13:06:

HI @ all
Thanks again for the suggestions and help. I'm working at home today so I have the possibility to test via NFS with my own server. It looks like it's working fine! I have no idea why it's not working with the USB.. the only reason I think could be the size of the USB device, although it has 30 GB. :/ It's a bit strange!

jsmeix commented at 2017-01-18 13:38:

I assume it works because "no news is good news".


[Export of Github issue for rear/rear.]