WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: filetool.sh gives "invalid device"  (Read 584 times)

Offline sbrunthaler

  • WikiUser
  • *
  • Posts: 2
filetool.sh gives "invalid device"
« on: June 12, 2018, 02:13:54 AM »
Did some searching, no results on this topic.

I get an error message "invalid device" (with no further information) when I use "filetool.sh -b -v" with a TC Linux booted from SD card. I prepared the SD card witf the TC Linux 1.8 installer from PCEngines, it is an APU2. Kernel version is 4.2.9-tinycore.

The TCE directory resides on the ssd device, /dev/sda1, mounted as /media/usbhd-sda1.

The file /opt/.filetool.lst file only contains 2 lines: opt and home.

"filetool.sh -b -v /media/usbhd-sda1" gives the same result, "invalid device" without a device name.
The file /etc/sysconfig/backup_device is empty. The file /tmp/backup_status contains "invalid device".

I tried to figure out what is happening in the filetool script, but my sh programming knowledge is not sufficient.

Any hints?

Thx,
Stefan

Offline sbrunthaler

  • WikiUser
  • *
  • Posts: 2
Re: filetool.sh gives "invalid device"
« Reply #1 on: June 12, 2018, 03:35:04 AM »
OK, found a work around: Boot option "restore=sda1" helps.

But from the docs, I thought that it should work without this option as well.

Regards,
Stefan

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 2728
filetool.sh gives "invalid device"
« Reply #2 on: June 12, 2018, 11:34:01 AM »
It’s strange that for the longest time I believed the “restore=” bootcode was depreciated..  I guess I was wrong!!

See the book http://tinycorelinux.net/book.html

But I think filetool is expecting sda1 or similar format

Also is better to use the official tinycorelinux installer to get the system setup correctly

Sent from my iPhone using Tapatalk
« Last Edit: June 12, 2018, 11:38:57 AM by coreplayer2 »

Offline centralware

  • Sr. Member
  • ****
  • Posts: 313
Re: filetool.sh gives "invalid device"
« Reply #3 on: June 13, 2018, 02:18:51 PM »
Run the following lines at the command prompt:

readlink /etc/sysconfig/tcedir       # <-- This will tell you where your extensions/backups/etc. are right this minute
cat /proc/cmdline       #<-- This shows what TC's been fed at boot time

If the first item shows somewhere in the /tmp directory, that's just indicating it couldn't find a ./tce directory somewhere on a drive it could access or make sense of.
If the second item DOES NOT have a boot code starting with tce=###=#### this might be a way to "fix" the problem by giving it a head's up where to look.

    Run blkid | grep -v loop to get a list of block devices the system sees.
    Determine if your SSD is seen to the system as /dev/sda* or something different.
    COPY the UUID from the SSD drive's listing from the blkid command
    In your boot configuration file (extlinux.conf, grub#.conf, etc.) add to the APPEND field the following information:

Code: [Select]
tce=UUID=(enter the UUID# you copied from earlier)

Now reboot your device.  Assuming the SSD is formatted (EXT2 preferred for static memory drives IMO) TinyCore will attempt to create a directory called ./tce where it'll add basic files and the directory structure.  As soon as you're at the prompt, try filetool.sh -b (no other variables) and see if that does the trick.
* If you get NO response at all from filetool, it likely didn't work
* If you get an error, report back here; otherwise you should see a remark noting the backup completed.

If you want, you can use a persistent /opt and /home directories by repeating the boot code above (ie: opt=UUID=#### home=UUID=####) otherwise filetool should do the trick for your needed changes.

Good luck!

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 2728
Re: filetool.sh gives "invalid device"
« Reply #4 on: June 13, 2018, 05:37:58 PM »
BTW,   you can use " backup " at the command line instead of filetool.sh -b  just saying....