Tiny Core Linux

General TC => General TC Talk => Topic started by: jackarius86 on March 23, 2013, 01:45:00 PM

Title: loading certain extensions
Post by: jackarius86 on March 23, 2013, 01:45:00 PM
on trying to load certain extensions, I get these kinds of errors:

mount: mounting /dev/loop72 on /tmp/tcloop/freetype_base-dev failed: Invalid argument
mount: mounting /dev/loop73 on /tmp/tcloop/imlib2_base-dev failed: Invalid argument

I am running TC on a laptop with no HD from USB persistently and have no problems with loading the majority of extensions.

Can anyone explain whats going on here or where I might be going wrong?

thanks in advance
Title: Re: loading certain extensions
Post by: gerald_clark on March 23, 2013, 01:50:59 PM
I have no problem loading either of those extensions.
What version of Core are you running?
How much RAM do you have?
What is the output of  'df /' ?
What is the output of  'df -i /' ?
Title: Re: loading certain extensions
Post by: Rich on March 23, 2013, 02:38:33 PM
Hi jackarius86
Did you use the  Apps  utility to install your extensions?
Quote
on trying to load certain extensions, I get these kinds of errors:

mount: mounting /dev/loop72 on /tmp/tcloop/freetype_base-dev failed: Invalid argument
mount: mounting /dev/loop73 on /tmp/tcloop/imlib2_base-dev failed: Invalid argument
Which extension were you trying to load that caused that error? Was it  compiletc.tcz?
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 03:08:19 PM
Wow, thanks for the prompt response!

Yes I was using Apps to load these extensions to begin with but now I have moved on to a script-like method of tce-load and yes it was compiletc but now I'm just doing it all individually, still have a problem with those files though, and others (which i cant remember right now).

What version of Core are you running?
4.7.5

How much RAM do you have?
about 250Mb, my 'mem' tab in system stats looks like:
MemTotal:         253516 kB
MemFree:          150992 kB
Buffers:           15320 kB
Cached:            52016 kB
SwapCached:            0 kB
Active:            31060 kB
Inactive:          51100 kB
Active(anon):      22376 kB
Inactive(anon):     8968 kB
Active(file):       8684 kB
Inactive(file):    42132 kB
Unevictable:           0 kB
Mlocked:               0 kB
HighTotal:             0 kB
HighFree:              0 kB
LowTotal:         253516 kB
LowFree:          150992 kB
SwapTotal:       1115592 kB
SwapFree:        1115592 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:         14812 kB
Mapped:             5336 kB
Shmem:             16520 kB
Slab:              14784 kB
SReclaimable:       6288 kB
SUnreclaim:         8496 kB
KernelStack:         728 kB
PageTables:          348 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:     1242348 kB
Committed_AS:      45084 kB
VmallocTotal:     770040 kB
VmallocUsed:        3408 kB
VmallocChunk:     766500 kB
AnonHugePages:         0 kB
DirectMap4k:       24576 kB
DirectMap4M:      237568 kB

What is the output of 'df /' ?
What is the output of 'df -i /' ?

tc@box:~$ df /
Filesystem                Size      Used Available Use% Mounted on
rootfs                  222.8M     16.3M    206.5M   7% /
tc@box:~$ df -i /
Filesystem              Inodes      Used Available Use% Mounted on
rootfs                   30.3K      5.0K     25.2K  17% /


Title: Re: loading certain extensions
Post by: Rich on March 23, 2013, 03:19:10 PM
Hi jackarius86
I'm guessing that the  freetype  and  imlib2  developement packages are not installed, both of which are dependencies
of  compiletc, or maybe they were corrupted during download.
Quote
... but now I have moved on to a script-like method of tce-load ...
By any chance, is that when you started experiencing problems?
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 03:31:32 PM
Hey Rich

By any chance, is that when you started experiencing problems?

Yes partly because of that, and partly because I am trying to build a package and am trying to figure out all of the extensions i need for it and apps isnt really the best way for me to deal with that, especially as my USB stick unmounts when it is over loaded and i find it tempormental - to that end, a quick script to get me back to where i need to be is the easiest way to deal with it as I dont want to load EVERYTHING, EVERY time i boot up as most of the time im just browsing etc..
Title: Re: loading certain extensions
Post by: Rich on March 23, 2013, 03:46:51 PM
Hi jackarius86
Quote
... as I dont want to load EVERYTHING, EVERY time i boot up as most of the time im just browsing etc..
I believe the   lst=   boot code allows you to specify an alternative to   onboot.lst
Title: Re: loading certain extensions
Post by: gerald_clark on March 23, 2013, 03:49:11 PM
It sounds to me like a failing USB stick.  Perhaps those files are damaged.
The USB stick should not be umounting itself.
Title: Re: loading certain extensions
Post by: Rich on March 23, 2013, 03:56:02 PM
Hi gerald_clark
Quote
The USB stick should not be umounting itself.
Could it be getting remounted RO because an error was encountered, and the OP didn't realize it?
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 04:11:40 PM
Hi Rich

I believe the   lst=   boot code allows you to specify an alternative to   onboot.lst

I knew about that option but I feel that it is easier for me to just pick it up without rebooting when i think I'm ready to try something different, it also helps me to keep things in a set order without having to try and remember every little package to be loaded for it.

Hi Gerald_Clark,

I believe it is an ongoing issue with flash drives being overworked, I dont know if it is actually unmounting or what happens when the fail occurs. I just know that things will stop working and I will get messages like 'cannot write: read only filesystem' or something similar.

Havent got any other flash drives about but i guess if i delete the tcz and then download it again it should work - as the rest of the tcz do work..? What are your feelings on that logic?

Rich, It isn't remounting, it is just binning out, but it is not these failures which are causing this, it seems to be caused whenever i try and run firefox or too much at once..
Title: Re: loading certain extensions
Post by: gerald_clark on March 23, 2013, 04:38:49 PM
There is no"ongoing issue with flash drives" that I am aware of.
Since you only have one flash drive, perhaps it is an ongoing issue with your flash drive.
Since you are having i/o issues with your flash drive, you cannot trust anything on that drive.
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 04:46:29 PM
As it happens, I checked out the .tcz's, one of them said 0kb and the other seemed of normal size, I deleted them, re-downloaded and then loaded them, worked like a charm.

Maybe it is just the USB being a bit naff, either way its up and running now, thanks alot guys youv been very helpful :-)



Oh I've done my homework on it, there is an issue with flash drives, not specific to TC.. Think your right about this one though!
Title: Re: loading certain extensions
Post by: tinypoodle on March 23, 2013, 04:52:42 PM
Best to do a thorough fsck ASAP (unmounted!)
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 05:03:27 PM
Best to do a thorough fsck ASAP (unmounted!)

i dont know anything about fsck, why do it unmounted?
Title: Re: loading certain extensions
Post by: tinypoodle on March 23, 2013, 05:57:34 PM
Which filesystem types does drive in question feature?
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 06:06:01 PM
Which filesystem types does drive in question feature?

300+Mb FAT32 partition - this contains my bootloader and wifi stuff from when i installed it from windows
1Gb Linux swap partition
5-6Gb EXT4 partition
Title: Re: loading certain extensions
Post by: coreplayer2 on March 23, 2013, 06:24:52 PM
I wonder,  why use a swap partition on a USB ??    surely performance would be pitiful ?
Title: Re: loading certain extensions
Post by: tinypoodle on March 23, 2013, 06:26:41 PM
Boot with code "base".
In case you need extensions in order to connect to net, manually mount storage and copy extensions to /tmp/tce/optional, then umount again.

Code: [Select]
tce-load -wi e2fsprogs.tcz
tce-load -wi dosfstools.tcz
e2fsck -vc -C 0 /dev/sdxN  #on ext4
dosfsck -vVrft /dev/sdxN  #on vfat
Title: Re: loading certain extensions
Post by: tinypoodle on March 23, 2013, 06:49:00 PM
Additionally:

Boot with code "noswap".

Code: [Select]
badblocks -svw /dev/sdxN #on swap partition
Be careful to select swap partition only with this, as it is erasing data!
Title: Re: loading certain extensions
Post by: gerald_clark on March 23, 2013, 07:09:22 PM
Swap on a flaky flash drive is a disaster waiting to happen.
Title: Re: loading certain extensions
Post by: jackarius86 on March 23, 2013, 07:54:14 PM
wow ok, i thought swap was a good thing :-/.

Instead of doing all that, would it eliminate the problem to just delete the swap partition and resize my ext4? (as this is what i will eventually end up doing after those comments lol).

If not will it be better to do before or after the repartitioning?
Title: Re: loading certain extensions
Post by: tinypoodle on March 23, 2013, 08:31:53 PM
Sure a coup de grace could be considered eliminating a problem...

And partitioning when either corrupted file systems or faulty hardware is involved might result in a coup de grace.

If you have any valuable data on that drive, it might be a good idea to rescue it first, and then to do all the checks as already mentioned and see what they show, before using the drive in any other way.

And please re-read Reply #10.
Title: Re: loading certain extensions
Post by: jackarius86 on March 24, 2013, 09:31:18 AM
hi tinypoodle.

I am doing as prescribed, looks like it will take a while for the ext4. probably a couple of hours. I dont understand what i have to do when it is finished - i take it its not going to fix anything while its unmounted/read-only mode. how do i fix any bad blocks when its done?
Title: Re: loading certain extensions
Post by: tinypoodle on March 24, 2013, 11:18:52 AM
hi tinypoodle.

I am doing as prescribed, looks like it will take a while for the ext4. probably a couple of hours.
Correct

Quote
I dont understand what i have to do when it is finished

Depending on errors found (if any), you should either get prompted or informed by dosfsck and e2fsck.
Not sure about running badblocks directly, but no data to lose on swap area, at worst it could require a "mkswap" again in the end.

Quote
take it its not going to fix anything while its unmounted/read-only mode. how do i fix any bad blocks when its done?

Oh yes, these are read-write repair options, that's exactly why the filesystems must not be mounted.
Title: Re: loading certain extensions
Post by: jackarius86 on March 25, 2013, 10:44:44 AM
OK, I did all that, but still have issues with my USB 'offlining'. here is the link to my DMESG output: http://pastebin.com/RQqbiUpB . It just seems to happen for no specific reason..

Title: Re: loading certain extensions
Post by: gerald_clark on March 25, 2013, 11:01:14 AM
As you were told earlier. I/O errors.
Replace that flash drive.
Title: Re: loading certain extensions
Post by: tinypoodle on March 25, 2013, 11:28:24 AM
OK, I did all that

Well, did you get any output?

Quote
EXT4-fs (sda5): warning: maximal mount count reached, running e2fsck is recommended

EXT4-fs (sda5): recovery complete

That shouldn't show after having run e2fsck.
Title: Re: loading certain extensions
Post by: jackarius86 on March 25, 2013, 11:33:01 AM
i did get output but didnt write any of it down, i remember reading the number of bad blocks and it said 0 which is vivid for me as i remember it confusing the hell out of me as i was expecting to see that loads of blocks were bad.. Think i just need a new usb, the annoying thing is that this one works fine for the boot procedure, but then just lets me down when im in the middle of trying to do stuff
Title: Re: loading certain extensions
Post by: tinypoodle on March 25, 2013, 11:38:40 AM
If there is any data on this device which you want to salvage, I suggest you don't connect it again except for the purpose of data rescue, and then use boot codes "base" and "noswap" and mount read-only.
Title: Re: loading certain extensions
Post by: gerald_clark on March 25, 2013, 11:43:55 AM
When USB flash drives fail they often become suddenly and completely inaccessible by any means.
Title: Re: loading certain extensions
Post by: tinypoodle on March 25, 2013, 07:24:47 PM
For future reference, if you must swap on UFD, it might be best to use a dedicated UFD, so when it reaches end of lifespan it doesn't put any data storage at risk. That said, if you could get hold of even a very small hard disk instead that would be preferable.