making unmounted external drive mount point unwritable

This is needed when a USB hard drvei sometimes fails. The mountpoint on root drive get 100% full

The most error-proof solution is to make the mount point unwritable.

chmod a-rwx /mnt/backups

However there is one additional step you should perform.

chattr +i /mnt/backups This is because even with no permissions, root would still be able to write to the directory. With chattr +i (sets immutable flag) not even root can write to it. Once the mount is mounted, the permissions dont matter as the permissions will be of the remote directory, not the local one.

Capture MiniDV Tapes for Editing and

I’ve got over 30 MiniDV tapes with home video on and occasionally I’m inspired to capture some to the PC, where I can edit with Davinci Resolve. One challenge is that most PCs don’t have ieee1364 ‘FireWire’ conections these days. The other issue is that software that used to do such jobs is now 20 years old.

Workflow

  1. Install old PCI based firewire card in linux PC
  2. Connect DV Camcorder
  3. Install the amazing dvgrab program – which not only grabs the video in raw .dv or .mov format but can control the camcorder as well
  4. dvgrab -showstatus -format qt -size 0
  5. the above creates an .dv file in a .mov container, which Davinci can use. the size option creates a limitless file. 1 hour is about 11Gb.
  6. Use this ffmpeg command to change the .dv container to a .mov for use in video editing software. Note that the video is formatted like this:

Stream #0:0: Video: dvvideo, yuv420p, 720×576 [SAR 16:15 DAR 4:3], 25000 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s

5. ffmpeg -i dvgrab-002.dv -map 0 -c copy test.mov

6. Better: grab the dv tape straight to .mov. -rewind rewinds the tape before capturing ­čÖé

dvgrab -showstatus -format qt -size 0 -rewind

6. Convert .mov to .mp4 with ffmpeg:

ffmpeg -i my-video.mov -deinterlace -vcodec h264 -acodec mp2 my-video.mp4

7. Batch convert a whole folder and create the new .mp4 with the same name as the original .mov -deinterlace is needed

for i in *.mov; do ffmpeg -i “$i” -deinterlace -vcodec h264 -acodec mp2 “${i%.mov}.mp4”; done

Backing Up using cron and rsync

To run the backup script manually at anytime:

sudo ./rsync-shell.sh

in the folder below

The rsync script for this is in /home/markp/Documents/scripts: rsync-shell.sh
it creates a log file in /home/markp/Documents/backups
it backs up to an external e-sata hdd mounted at /external in fstab
it needs to be copied to /root so that it can run as a sudo cron jon
ensure chmod 744 so file is executable

in root, crontab -l lists all cron jobs; if no crontab exists yet create one with:

sudo crontab -e 

then add:
0 2 * * * /root/rsync-shell.sh

the five cron parameters above are:
minute (of the hour)
hour (of the day)
day (of the month)
month
day (of the week)
* = any value. So, the above job runs every day at 2.00 (am).

Issues: need to find a way of flagging when the cronjob doesn’t run, although the log reveals that. 2. need to find a way of bringing the PC out of suspend, now that I’m trying to be more power saving.

For 2. see here: https://www.dedoimedo.com/computers/wake-cron.html

drive full or boot hangs at /dev/sb2/ files clean

This is usually caused by the external usb drive not being available for an overnight backup (why is another issue). The system drive’s mount point for the USB: /external then get’s filled up with what should have gone to the USB. Diagnose using df from a TTY prompt at the hung screen.

/dev/sdb2 will show 100% full and 0 space available on it

IMPORTANT don’t run the commands below with the USB drive connected, if it has re-mounted the backup will be deleted. For safety boot into temp system from a pendrive

You can access a tty shell by pressing CTRL+AL+F1 if the gui login keeps coming back, or if the login doesn’t get to that stage.

then: sudo rm -rf /external/home will delete the appropriate subfolders on the system mount point. check df again.

CTRL+AL+F7 should get you back to the gui loging screen

IF you have trouble with the deleted files being moved to trash and still not releasing drive space, also:

sudo rm -rf /external/home/.Trash-1000

releases the space

Remedial work: find a way of not making this happen then the USB drive ‘dissapears’?

TT Turbo Rebuild

All based on a 1.8t AMK engine, K04 turboTurbo to manifold bolts (the 3[strikethrough] star[/strikethrough] Ribe head ones)
30Nm.

Downpipe to turbo (the 3 nuts that go onto the studs)
40Nm.

Banjo bolts for oil feed pipe
Turbo CHRA
Oil line securing bolt 10Nm.
Hollow bolt into CHRA 30Nm.
Oil filter housing
Oil line securing bolt23Nm.
Hollow bolt into oil housing 30Nm.

Water lines
Turbo CHRA to engine block
Hollow bolt CHRA 30Nm.
Waterline securing bolt 10Nm.
Hollow bolt engine block 35Nm.
Turbo CHRA to cooling circuit
Hollow bolt CHRA 35Nm.
Waterline securing bolt20Nm.

Oil return line
Bolts to sump 10Nm.
Bolts to CHRA 10Nm.

Turbo to engine block holding mount
Turbo 30Nm.
Block 20Nm.

Pendulum support (‘dogbone’ – under the engine) geabox to subframe mount
Bolts A (2 x the same) pendelum support to subframe – 20Nm (15lb ft) plus 1/4 turn (90 degrees)

bolts B (2 off) pendulum support to transmission – 40Nm (30lb ft) plus 1/4 turn(90degrees)

Be careful, I stripped the first bolt B trying for the 90degrees

tty console for serial control

need to remind myself about this for resetting battery state monitors on APC SmartUPS’s. This is using the (cheap) blue USB to serial, lsusb shows them as ‘Prolific Technology’

sudo apt-get install minicom

Check if the USB to serial adapter seen:

$ dmesg | grep tty
[1016778.750081] usb 1-3: pl2303 converter now attached to ttyUSB0

So start minicom accordingly:

sudo minicom –device /dev/ttyUSB0

https://www.cyberciti.biz/tips/connect-soekris-single-board-computer-using-minicom.html

https://www.stevenjordan.net/2016/05/fix-early-ups-shutdowns.html