WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #345 on: October 15, 2021, 10:00:33 PM »
Hi MTCAT
OK, so you are booting Tinycore from the pen drive, and the CF card contains the partition you are trying to expand.

Leave the CF card plugged in.
Boot from the pen drive but add the boot code:
Code: [Select]
noswapThis way it won't use partition #1.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #346 on: October 16, 2021, 11:46:32 AM »
Hi Rich,

Oh, but I thought that the linux-swap partition was just for Lubuntu, tinycore doesn't use it anyway......I'm really okay with nuking Lubuntu, would you be able to help me with getting everything (Tinycore and data acq program) going off just the CF-card, I think that's the way I would want to go anyway, I could just use dd to clone the existing boot pen drive (16 GBytes) onto the CF-card, and then (hopefully) use gparted to expand the partition to use the whole 128 GBytes on the CF-card.

I guess there would be a bit of mucking around with a couple scripts in /opt (one which auto mounts sda5, and another which makes a symbolic link), but I think that would be it, not too bad I don't think.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #347 on: October 16, 2021, 07:18:05 PM »
Hi MTCAT
Oh, but I thought that the linux-swap partition was just for Lubuntu, tinycore doesn't use it anyway...
If Tinycore finds a swap partition, it will use it.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #348 on: October 17, 2021, 05:47:36 PM »
Hi Rich,

Oh, okay, I'll try the "noswap" boot code and then run gparted and see what happens.

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #349 on: October 17, 2021, 06:16:47 PM »
Hi Rich,

I added the "noswap" boot code to extlinux.conf and I saw during bootup that it indeed was not using any swap, then I unmounted sda5 and tried running b"e2fsck -fp /dev/sda1", I got an error, "e2fsck: Bad magic number in super-block while trying to open /dev/sda1 :", and then the rest of the message I attached here in a text file.

I also ran "e2fsck -fp /dev/sda5"   and got the same result as before, and lastly, I ran "sudo gparted /dev/sda" and once again I still couldn't resize sda5, it's still stuck at 6146 MBytes....

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #350 on: October 17, 2021, 08:45:56 PM »
Hi MTCAT
Quote
... If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt ...
Since  sda1  is a swap partition, the attached error message is saying it's not a problem.

Your last fdisk attachment contained this:
Quote
Partition 1 does not end on cylinder boundary
It also looks like sda1 overlaps sda2 & sda5. Lets try fixing that and see if that helps.

Code: [Select]
sudo gparted /dev/sdaSelect resize for sda1
Shrink it by about 5 megabytes
Click the  Resize  button
Click the green  Apply  check mark

Once it finishes resizing sda1, see if it lets you resize sda5.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #351 on: October 17, 2021, 09:08:04 PM »
Hi MTCAT
I just thought of one more thing:

In gparted, click  View->File System Support
Make sure the  Grow  and  Shrink  columns have green check marks for  ext2, ext3, ext4, and linux-swap.
If they don't, the  Required Software  column will tell you what you need to install.
« Last Edit: October 18, 2021, 08:42:57 AM by Rich »

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #352 on: October 18, 2021, 08:49:15 PM »
Hi Rich, that might be it !, I'm missing "e2fsprogs" (for ext2 and ext3) and "e2fsprogs v1.41+" (for ext4), I'll try and get that !

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #353 on: October 18, 2021, 09:12:22 PM »
Hi MTCAT
In TC3, for  ext2, ext3, and ext4 , you want  e2fsprogs_apps.tcz.
For  linux-swap , you want  util-linux-ng.tcz.

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #354 on: October 18, 2021, 10:21:28 PM »
Hi Rich, thanks !, that did it !, I had all green check marks for linux-swap already but installing the e2fsprogs_apps.tcz package was needed for ext2, ext3 and ext4. I was able to re-size sda5 to almost 119 GBytes now, so that's pretty good, but..., even after I installed the e2fsprogs_apps.tcz package I still couldn't resize sda1, I got a message, "an error occurred during the requested operation" and no other information than that, so out of frustration, I thought, well, what can I do with sda1, can I delete it ?, turns out, yes I can, so sorry, I hope that doesn't come back to haunt me, but after getting rid of sda1, and installing the package, I was able to re-size sda5 to almost 119 GBytes. Thanks for all the help, now I need to try to compile the code with -O2 or -O3 and see if I can speed it up, it's a bit of a dog right now, oh, and get that USB temperature sensor going too.

Thanks again for all your help, and your patience.

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #355 on: October 18, 2021, 10:28:41 PM »
Hi MTCAT
You can recreate the swap partition if you left that section of the device unallocated.
Right click on the unallocated area and select  New
Select  linux-swap  for  File system
Click  Add
Click  Apply

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #356 on: October 24, 2021, 06:25:35 PM »
Hi Rich,

Thanks, at least there's an option, I ordered a few more new CF-cards today, I'll keep my current one as is (with Lubuntu) but on the new ones I think I'm going to try just using dd to copy over the existing boot pen drive contents onto the CF-card, and see if I can boot from the CF-card, and then obviously save data right to the CF-card too, so just run off the CF-card, and that's it, would be a bit simpler hopefully.

Right now the acquisition program works (or did), but is quite slow (in the GUI-changing tabs takes a second or two-seems boggy), so I removed the "-ggdb" flag in the Makefile and also changed "-O0" to "-O3" (go for the gusto) and now make is having problems finding a package "xcb" required by X11 ?, and also can't the header file for gtk ? I don't know what I did as this was all compiling just fine before, sigh.

Attached a screenshot here, I'm sorry but I couldn't re-direct the output of make into a .txt file for some reason, or all it showed was "main.c".

I also attached onboot.lst where you can see that libx11-xcb.tcz, libxcb.tcz,  and gtk2-dev.tcz are all being loaded, so I'm confused, as usual as to what make is complaining about, sorry for this never-ending line of questions from me.

Thanks,

David

Offline MTCAT

  • Sr. Member
  • ****
  • Posts: 370
Re: TC3.8_4 Real Time Upgrade
« Reply #357 on: October 24, 2021, 06:33:00 PM »
Hi RIch,

I forgot to add, I changed the Makefile back to its original configuration with "-ggdb" and "-O0" and still got the same error, I attached the Makefile and main.c here as well...sorry.

Thanks,

David

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11639
Re: TC3.8_4 Real Time Upgrade
« Reply #358 on: October 24, 2021, 09:02:32 PM »
Hi MTCAT
You have  libxcb.tcz  listed in your  onboot.lst  file. Maybe that should have been  libxcb-dev.tcz ?

Does running this eliminate the error:
Code: [Select]
tce-load -i libxcb-dev

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14821
Re: TC3.8_4 Real Time Upgrade
« Reply #359 on: October 25, 2021, 01:16:08 AM »
You can use pkg-config to check for missing dependencies and recursive dependencies, like this:
Code: [Select]
$ pkg-config --cflags xcb
Package xcb was not found in the pkg-config search path.
Perhaps you should add the directory containing `xcb.pc'

Then you can use the apps gui to find which extension provides xcb.pc and load it:
Code: [Select]
$ tce-load -i libxcb-dev
$ pkg-config --cflags xcb
-I/usr/local/include
$ pkg-config --libs xcb
-L/usr/local/lib -lxcb

This is particularly useful for apps with a number of recursive dependencies like gtk+-2.0 and gtk+-3.0 as it will show which of the dependencies is missing.