WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] TC3.8_4 Real Time Upgrade  (Read 40342 times)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #315 on: August 17, 2021, 08:12:59 PM »
Hi MTCAT
Plug in both drives, but do not mount them. Assuming you want to copy  sdb  to  sdc , try this:
Code: [Select]
dd if=/dev/sdb of=/dev/sdc conv=noerror,sync,fsyncThen go do something else. This will take a while.

noerror instructs dd to continue operation, ignoring all read errors. Default behavior for dd is to halt at any error.
sync fills input blocks with zeroes if there were any read errors, so data offsets stay in sync.
fsync instructs dd to physically write data out before finishing.
« Last Edit: August 23, 2021, 08:42:02 AM by Rich »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #316 on: August 18, 2021, 04:42:30 AM »
Thanks Rich, that worked great ! I was confused about mounting (or not) the drives too, thanks for explaining that.

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #317 on: August 18, 2021, 08:27:16 AM »
Hi MTCAT
You are welcome. Thank you for confirming it worked.

Just a couple of notes:
1. If someone comes along and says  "hey, that  dd  command will run a lot faster if you add  bs=64k" , don't do it.
   dd  defaults to  bs=512 , so it reads and then writes 512 bytes at a time. With the  noerror,sync  flags, if you get
   a read error, it will zero out that block. While a larger block size (i.e. bs=64k) will run faster, that same read error
   would zero out a much larger (64k) block.

2. Run  sync  and wait for the command prompt to return before removing your devices. I'll add that to my last post.

3. Your  64 GByte  device should look like your  16 GByte  device, with 48 GBytes unallocated. Use a program like
   gparted  to expand your partition or add partitions if you want to be able to use those 48 GBytes.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #318 on: August 23, 2021, 07:15:05 AM »
Hi Rich,

That's good to know, I was tempted to try using a larger block-size, but I didn't, I think it took about 45 minutes to do the job with the default blocksize, so not too bad really. I didn't do the "sync" part though, but I did verify that the newly created pen-drive boots up the system just fine, so that was great, this will be very useful in the future when we get everything working properly, can just clone a bunch more pen drives !

On other matters, I got ssh installed and a fellow from Brazil (freelancer.com) is logging in remotely to see if he can figure out why the acquisition program is hanging up, I have a feeling it's something simple for someone who knows what they're doing with C code...I guess I'm missing out on a learning opportunity in a sense but I need to get this going to move on to other things, hopefully this guy will be able to find the problem..

I did have a strange occurrence this weekend though, not sure what I did to cause this, maybe the monitor wasn't turned on during boot up ?, but when I booted up the little Vortex I ended getting stuck at a "XVesa Resolution" screen, with choices of "0-1 or q(uit)", not sure how that happened, I just gave it the three finger salute and started over and has been okay ever since then, I'm trying to recall the error from memory but it was something like a missing "xession" file or something, I actually have a post written out at home and can send you the exact error message if you want.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #319 on: August 23, 2021, 08:38:31 AM »
Hi MTCAT
... I didn't do the "sync" part though, but I did verify that the newly created pen-drive boots up the system just fine ...
If you lost data it would have been near the end of the device, so it would still boot up. I presume the 16 GByte device
was not full, so if you pulled it early you likely didn't lose any data.

For the future, you can do the command like this:
Code: [Select]
dd if=/dev/sdb of=/dev/sdc conv=noerror,sync,fsyncThat should force dd to sync the device before returning the command prompt. I'll update my other post to reflect that.

... I actually have a post written out at home and can send you the exact error message if you want.
Attach it as a  .txt  file in your next post.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #320 on: August 23, 2021, 04:18:14 PM »
Hi Rich,

Here's the .txt file describing what happened a couple of mornings ago.

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #321 on: August 23, 2021, 04:21:08 PM »
Hi Rich,

Forgot to add, after I hit "q", I did end up at a command prompt, and then I hit Ctrl-Alt-Del to re-boot. So technically TC did boot, but couldn't start flwm for some reason.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #322 on: August 23, 2021, 05:24:21 PM »
Hi MTCAT
I'm not sure why that happened.
It appears  xsetup.sh  was called because  startx  could not find  /home/tc/.xsession.
Because you quit  xsetup.sh , it did not create  /home/tc/.xsession.
Control then returned to  startx  and it tried to execute  /home/tc/.xsession  which still did not exist.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #323 on: September 03, 2021, 06:11:59 PM »
Hi Rich,

The acquisition program is mostly working !, all I needed to do was input a PPS signal to the ADC ! ! A remote programmer stepped through the C program to find where the problem was, and I immediately clued in as to what was going on, very embarassing. As you know, the acquisition code does both "burst" recording of time localized transient events, but also collects a down-sampled continuous data-stream. The continuous data is time synchronized so that each one minute file (1,200,000 samples) starts and stops at the beginning and end of a one minute time period, but it needs the PPS input to CH6 of the 24DSI12 in order to do it, that's all it really was ! The GUI was frozen as it didn't have the PPS there on CH6 to synchronize the continuous data-stream ! !

There is one oddity though, the symbolic link I made (with your direction of course) points home/tc/data to the CF card (128 Gbyte), but Peter's program indicates that home/tc/data only has 2 GBytes free space left ! So there's something odd with my Lubuntu install on the CF card, the program that copied the image file of Lubuntu onto the CF-card (can't recall the name) did something undesirable so that there's a lot of wasted space on the CF-card it seems.

So I could just re-format the CF card and get rid of Lubuntu altogether ?, or, maybe I could even install TinyCore onto the CF-card and just work everything off that.

Otherwise, I just need to get this USB port temperature sensor going so that I have some meaningful temperatures to report too..by the way, those neat commands you made up for me to parse the chrony files are working like a charm, the lat/long position and clock offset information is being displayed in the program perfectly, thanks a lot.

Finally, almost there, thanks again for everything, now I just have to build 5 more or so ! Would be great if the program could be made to run on both cores of the Vortex too, it's a little bit sluggish at the moment (running on one core), but I'll still enjoy the 12W or so power saving and the lighter battery needed to run it all day !

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #324 on: September 03, 2021, 06:32:38 PM »
Hi MTCAT
... There is one oddity though, the symbolic link I made (with your direction of course) points home/tc/data to the CF card (128 Gbyte), but Peter's program indicates that home/tc/data only has 2 GBytes free space left ! ...

And that is why I mentioned this after you ran the  dd  command:
...
3. Your  64 GByte  device should look like your  16 GByte  device, with 48 GBytes unallocated. Use a program like
   gparted  to expand your partition or add partitions if you want to be able to use those 48 GBytes.

Or are you referring to a different CF card?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #325 on: September 03, 2021, 06:51:51 PM »
Hi MTCAT
I just reread the statement. Install  gparted.tcz. Then from the command line:
Code: [Select]
sudo gparted /dev/hdaReplace  hda  with the designation for the CF card. This should give you a picture of how all of the space is allocated
on your device.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #326 on: October 03, 2021, 12:22:06 PM »
Hi Rich,

Sorry for taking so long to get back to you, I was away for a few weeks....I installed gparted.tcz and then executed "sudo gparted /dev/sda5" and then a nice GUI came up reporting sda5 as 6 GByte's ? I then clicked on "View --> Device Information" and saw the following;

Model: Unknown
Size: 6.00 GiB
Path: /dev/sda5
Partition Table: loop
Heads: 255
Sectors/track: 63
Cylinders: 783
Total sectors: 12587008
Sector Size: 512

I also re-directed the output of "fdisk -l" into a text file attached here, also, in FLWM, in the mount tool or app, I only see "sda5" and "sdb1" as mountable partitions, of course sdb1 is my boot pen drive (16 GBytes).

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #327 on: October 03, 2021, 12:54:46 PM »
Hi Rich,

Executing "sudo gparted /dev/sda" worked a bit better, read your post again, sorry, showed me that 112.25 GBytes are unallocated....,/dev/sda1 is a "linux-swap" of size 1019 MBytes, /dev/sda2 is "extended" of size 6 GBytes, and it appears that /dev/sda5 is a sub-category under /dev/sda2 and is of type "ext4" of size 6 GBytes, 4.10 GBytes of which is used, and 112.25 GBytes are unallocated ?

Maybe I need to re-format the CF-card and in the process "nuke" Lubuntu ? I think that would be okay, the only thing Lubuntu has going for it really is that it's able to see the 1000 MBit/sec ethernet port on the DX3, maybe TinyCore 3.8.4 could be made to see that too but at the moment TC only "sees" the 100 MBit/sec ethernet port, which is not too bad anyway.

On my existing (Pentium) receivers I use the ethernet with "scp" command to copy data off the receiver (daily), can be 15 GBytes or more sometimes, with 100 MBit/sec ethernet port (on my old Pentium SBC) I'm getting around 6 MBytes/sec copy speed, takes as long as 1 hour just to b/u the data to an external SSD, would be nice if I could use the faster ethernet port on the DX3, or maybe even the USB 2.0 ports on the Vortex DX3 would be faster than 6 MBytes/sec ? Believe it or not, the old Pentium SBC has only two USB 1.0 ports !

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 10307
Re: TC3.8_4 Real Time Upgrade
« Reply #328 on: October 03, 2021, 04:17:23 PM »
Hi MTCAT
First:
Code: [Select]
sudo gparted /dev/sda
Right click the  sda5  line.
Click  Resize/Move  in the popup menu.
Select your new size.
Click the  Resize  button.
Click the green checkmark in the toolbar and wait for the operation to complete.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 357
Re: TC3.8_4 Real Time Upgrade
« Reply #329 on: October 05, 2021, 05:24:07 PM »
Hi Rich,

Thanks for the help, unfortunately I'm not able to resize sda5 though, after running "sudo gparted /dev/sda" I had to unmount sda5 before "resize/move" became active, but even after unmounting, right clicking on sda5, and selecting "resize/move", it shows sda5 as minimum/maximum size of 6146 MBytes ?, I can click on the unallocated space entry though, and it looks like I could create a new partition of size 112.25 GBytes but then I would also need to change the symbolic link (/home/tc/data ---> /mnt/sda5/data) and the little script in /opt that mounts sda5.

Or, should I unmount sda5, delete it, and then absorb that ~ 6 GBytes into the 112.25 GBytes and then make a new sda5 partition that's 112.25+6 GBytes in size ?

Thanks,

David