maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   How to mount opt folder? (https://talk.maemo.org/showthread.php?t=96318)

NotMicro 2016-01-05 13:18

How to mount opt folder?
 
Could anybody write precisely how to mount opt folder from second emmc partition under rescueOS by NIN101? Or how to uninstall package using dpkg -r (or -P) with no access to that folder.

michaaa62 2016-01-05 22:11

Re: How to mount opt folder?
 
These commands inside the rescueOS shell mount:
1. first the maemo rootfs,
2. second the optfs partition to the home directory of maemo rootfs,
3. third the opt directory inside the maemo rootfs
Code:

mmr
mount /dev/mmcblk0p2 /mnt/maemo/home
mount -o bind /mnt/maemo/home/opt /mnt/maemo/opt


michaaa62 2016-01-06 07:22

Re: How to mount opt folder?
 
Btw. it might be sufficient to erase the file /etc/modprobe.d/fcam.conf according to its content:
Quote:

~ $ cat /etc/modprobe.d/fcam.conf
# Override configuration file for the FCam camera control API replacement kernel modules for the N900 camera subsystem.
# Remove this file and reboot to restore use of the original kernel modules.

install fcam modprobe fcam-vanilla; modprobe fcam-power; echo "-1" > /proc/sys/kernel/sched_rt_runtime_us

install fcam-vanilla /sbin/insmod /usr/share/fcam/isp-mod.ko && /sbin/insmod /usr/share/fcam/omap34xxcam-mod.ko && /sbin/insmod /usr/share/fcam/omap_previewer_hack.ko && /sbin/insmod /usr/share/fcam/et8ek8.ko && /sbin/insmod /usr/share/fcam/board-rx51-camera.ko

install fcam-power /sbin/insmod /usr/share/fcam/power/isp-mod.ko && /sbin/insmod /usr/share/fcam/power/omap34xxcam-mod.ko && /sbin/insmod /usr/share/fcam/power/omap_previewer_hack.ko && /sbin/insmod /usr/share/fcam/power/et8ek8.ko && /sbin/insmod /usr/share/fcam/power/board-rx51-camera.ko

install isp-mod modprobe fcam
install omap34xxcam-mod modprobe fcam
install omap_previewer_hack modprobe fcam
install et8ek8 modprobe fcam

NotMicro 2016-01-06 13:07

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1493815)
These commands inside the rescueOS shell mount:
1. first the maemo rootfs,
2. second the optfs partition to the home directory of maemo rootfs,
3. third the opt directory inside the maemo rootfs
Code:

mmr
mount /dev/mmcblk0p2 /mnt/maemo/home
mount -o bind /mnt/maemo/home/opt /mnt/maemo/opt



Thank you very much. It works. But now I have next problem. When I have tried to remove (commands chroot /mnt/maemo/ then dpkg -P) application blessn900 (which may be the pre-reason of my problems), I got a message as follows:

"dsmesock_connect: No such file or directory
dpkg: error processing blessn900 (--purge)
subprocess pre-removal script returned error exit status 1
Failed to open connection to "session" message bus: (null)
Errors were encountered while processing"

Do you have any suggestions what to do next?

NotMicro 2016-01-06 15:40

Re: How to mount opt folder?
 
Additional: when I use df command I get information like this: rootfs 1k-blocks used: 11456 available: 0 use%: 100% .

NotMicro 2016-01-06 16:01

Re: How to mount opt folder?
 
When I have run fsck I got a message:

"The superblock could not be read or does not describe a correct ext2
filesystem. 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, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>".

michaaa62 2016-01-06 16:29

Re: How to mount opt folder?
 
Which file system did you try to repair/check ?

Did you mount additional resources of the running 'rescueOS' to the 'maemo' chroot environment, like that:
Code:

mount -o bind /dev/ /mnt/maemo/dev
mount -o bind /proc/ /mnt/maemo/proc
mount -o bind /sys/ /mnt/maemo/sys
mount -o bind /dev/pts /mnt/maemo/dev/pts

???

NotMicro 2016-01-06 16:41

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1493903)
Which file system did you try to repair/check ?

Did you mount additional resources of the running 'rescueOS' to the 'maemo' chroot environment, like that:
Code:

mount --bind /dev/ /mnt/dev
mount --bind /proc/ /mnt/proc
mount --bind /sys/ /mnt/sys
mount --bind /dev/pts /mnt/dev/pts

???

No, I did not. Any of the above.

michaaa62 2016-01-06 17:00

Re: How to mount opt folder?
 
All of them, these are directories, that get created/populated at boot time, so the non-running maemo does not work correctly without.

But note the changes of the mount points in the former post, i edited! Sorry for that.

NotMicro 2016-01-06 17:19

Re: How to mount opt folder?
 
So, what should I do now ? I am a little bit confused.

michaaa62 2016-01-06 18:43

Re: How to mount opt folder?
 
Start rescueOS according to the documentation with the flasher utility, then
Code:

mmr
mount /dev/mmcblk0p2 /mnt/maemo/home
mount -o bind /mnt/maemo/home/opt /mnt/maemo/opt
mount -o bind /dev/ /mnt/maemo/dev
mount -o bind /proc/ /mnt/maemo/proc
mount -o bind /sys/ /mnt/maemo/sys
mount -o bind /dev/pts /mnt/maemo/dev/pts
chroot /mnt/maemo /bin/ash
rm -rf /usr/share/fcam
rm /etc/modprobe.d/fcam.conf

This should remove all traces of the fcam-drivers on your device.
It might be overkill for the removal to use the chroot, but ...?!

NotMicro 2016-01-06 20:36

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1493918)
Start rescueOS according to the documentation with the flasher utility, then
Code:

mmr
mount /dev/mmcblk0p2 /mnt/maemo/home
mount -o bind /mnt/maemo/home/opt /mnt/maemo/opt
mount -o bind /dev/ /mnt/maemo/dev
mount -o bind /proc/ /mnt/maemo/proc
mount -o bind /sys/ /mnt/maemo/sys
mount -o bind /dev/pts /mnt/maemo/dev/pts
chroot /mnt/maemo /bin/ash
rm -rf /usr/share/fcam
rm /etc/modprobe.d/fcam.conf

This should remove all traces of the fcam-drivers on your device.
It might be overkill for the removal to use the chroot, but ...?!

i have done this, but nothing's changed. Still no boot. I thought that fcam-drivers might be the reason, because problem with booting started after I have preinstalled it (fcam-drivers). But now I have no idea what to do next?

michaaa62 2016-01-06 21:08

Re: How to mount opt folder?
 
Always a good idea to power down the device, pull the battery, hold the power key for a couple of seconds, then restart the N900.

In rescueOS with mounted maemo rootfs get the info about the last running kernel
Code:

ls -al /lib/modules/
Then compare the, via 'current', linked modules directory with the content of the package from the repos.
Is a complete flashing of the fiasco image possible as a last hope? There was also some info buried deep in the forum to just flash rootfs, that could be extracted from the firmware/fiasco image. Did you ever make a backup with the built-in Backup application of your setting, contacts and stuff?

NotMicro 2016-01-07 13:13

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1493933)
Always a good idea to power down the device, pull the battery, hold the power key for a couple of seconds, then restart the N900.


I am sorry for a little delay in posting. Could you please precise if I must hold down power key without battery inside and if so - what it is the reason for that.

Do you know what is the exact procedure of booting (that is - what NOLO is doing). And on which stage hardware is testing (if it is). Maybe my camera hardware is a problem - is there any way to test it under rescueOS?

NotMicro 2016-01-07 13:17

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1493933)
Is a complete flashing of the fiasco image possible as a last hope? There was also some info buried deep in the forum to just flash rootfs, that could be extracted from the firmware/fiasco image. Did you ever make a backup with the built-in Backup application of your setting, contacts and stuff?

I am trying to "rescue" my applications installation, because some of them are now inavailable. So for now I have flashed only kernel from fiasco image. Is there a possibility that NOLO is broken?

NotMicro 2016-01-07 14:03

Re: How to mount opt folder?
 
Sorry for a few posts in a row. But maybe this will help you to diagnose my problem. So once again from my post #6 :

When I have run fsck I got a message:

"The superblock could not be read or does not describe a correct ext2
filesystem. 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, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>".

So is my filesystem correct? I do manage to mount home and opt folder so my eMMC is possibly OK. Although some time ago I have had a problems with USB port on my PC (not stable connection) so maybe something wrong happened during disconnecting myN900.

NotMicro 2016-01-07 20:05

Re: How to mount opt folder?
 
After executing command ls I get information as follows:
drwxr-x--- 1 root root 568 Jan 1 1970 2.6.37

Quote:

Originally Posted by michaaa62 (Post 1493933)
Then compare the, via 'current', linked modules directory with the content of the package from the repos.

How to do this?

michaaa62 2016-01-07 20:52

Re: How to mount opt folder?
 
Sorry for the delay!!!

Quote:

if I must hold down power key without battery inside and if so - what it is the reason for that.
To discharge the N900 completely.

Quote:

I am trying to "rescue" my applications installation
Which applications do you need to rescue, that are not available from the repository mirrors, there even is an Ovi mirror somewhere.

Quote:

When I have run fsck I got a message
Which partition/file system are you trying to check? Is it unmounted?

Quote:

After executing command ls I get information as follows:
drwxr-x--- 1 root root 568 Jan 1 1970 2.6.37
This seems to be the kernel of the rescueOS. Try the path of the mounted maemo rootfs instead please
Code:

ls -al /mnt/maemo/lib/modules
Quote:

How to do this?
Download the kernel-modules package from the repository here: http://repository.maemo.org/extras/p...mo19_armel.deb
Check for content and the size, maybe even md5sum, of the package's content inside /lib/modules/2.6.28.10maemo-omap1/ inside the data.tar.gz archive.

NotMicro 2016-01-08 21:05

Re: How to mount opt folder?
 
It seems I have the kernel version 2.6.28. But to say the truth, I flashed the kernel and initfs already (using flasher 3.5). So kernel probably is not the reason of my problems. What about flashing NOLO? Is it safe? My NOLO enables flashing mode and initially starts device (NOKIA logo on the screen), but... who knows what is happening next?

And how to determine rootfs filesystem partition condition using fsck (or other command)?

And, at last, how to find how much free space is left in rootfs partition? I had different values using command df. Maybe lack of space is the reason?

michaaa62 2016-01-08 21:40

Re: How to mount opt folder?
 
Rootfs does not need any fsck action, it is ubifs file system, that even supports unclean reboots. You could read about it here: http://www.linux-mtd.infradead.org/doc/ubifs.html .

The file system is like an archive that might be unpacked for rescueOS, but will show 100% full all the time in rescueOS.

Nolo and kernel are flashed together, as far as i know, and you did that!
Kernel modules are loaded by the kernel to load the different devices of the N900, that is why i suggest to check the modules directory.

There is some knowledge about the boot process buried inside the forum or the wiki, @reinob did a real thorough investigation on the boot process here http://talk.maemo.org/showthread.php?t=87959

NotMicro 2016-01-09 17:05

Re: How to mount opt folder?
 
Thank you very much for this useful post. Do you maybe know how to track process of booting? It could explain what is going wrong when my N900 starts. Maybe there is some log file created during startup ?

NotMicro 2016-01-09 17:19

Re: How to mount opt folder?
 
I forgot to write that I have had installed overclock profile (700 MHz) when failure took place.

michaaa62 2016-01-10 08:43

Re: How to mount opt folder?
 
Quote:

Originally Posted by NotMicro (Post 1494266)
I forgot to write that I have had installed overclock profile (700 MHz) when failure took place.

Please try to get the information from your N900 via mounted rootfs and mounted optfs, but not chrooted
Code:

ls -al /mnt/maemo/lib/modules
ls -al /mnt/maemo/usr/share/kernel-power-settings

The output looks something like this from my running maemoOS, but yours should look similar
Quote:

Nokia-N900:~# ls -al /lib/modules/
drwxr-xr-x 4 root root 376 Jun 18 2015 .
drwxr-xr-x 10 root root 7840 Jun 16 2015 ..
drwxr-xr-x 2 root root 984 Oct 14 16:54 2.6.28-omap1
drwxr-xr-x 2 root root 23744 Oct 14 16:54 2.6.28.10-power53
lrwxrwxrwx 1 root root 17 Jun 18 2015 current -> 2.6.28.10-power53
Nokia-N900:~# ls -al /usr/share/kernel-power-settings/
drwxr-xr-x 2 root root 616 Jun 15 2015 .
drwxr-xr-x 123 root root 9960 Jan 6 10:01 ..
-rw-rw-r-- 1 root root 499 Nov 1 2011 default
-rw-rw-r-- 1 root root 499 Nov 1 2011 dsp
-rw-rw-r-- 1 root root 470 Nov 1 2011 ideal
-rw-rw-r-- 1 root root 499 Nov 1 2011 lv
-rw-rw-r-- 1 root root 476 Nov 1 2011 starving
-rw-rw-r-- 1 root root 499 Nov 1 2011 ulv
-rw-rw-r-- 1 root root 499 Nov 1 2011 xlv
Again, it seems to be easier, and quicker, to remember the essential applications you had on your N900, but to clinch to vague clues, what might have gone wrong weeks ago. Get them from all over the net.

NotMicro 2016-01-10 15:08

Re: How to mount opt folder?
 
Could you please write how to make a copy of rootfs.
And second, very important thing - I cannot use apt-get install even if I chroot /mnt/maemo and mount home/opt folder.

michaaa62 2016-01-10 16:15

Re: How to mount opt folder?
 
Basically it is like this. Mount maemo rootfs, create mount point for storage partition, mount MyDocs partition to rescueOS, create archive of the rootfs on the MyDocs partition and enable mass-storage mode to transfer files and folders to your PC. Make sure the hidden dot-files and -folders are also transfered
Code:

mmr
mkdir /mnt/MyDocs
mount /dev/mmcblk0p1 /media
tar -c /mnt/maemo -f /media/rootfs.tar.gz
umount /media
ems

At last copy the content of both partitions to your PC. This saves the optfs partition, containing the /home/user and the /opt folders of the Maemo OS, and the MyDocs partition, containing your rootfs.tar archive, data and stuff.

NotMicro 2016-01-10 18:27

Re: How to mount opt folder?
 
Thank you for your last post, but I have 2 problems:

1. mmrt - "command not found"
2. mkdir /mnt/MyDocs - " mkdir : can't create directory '/mnt/MyDocs' : Read-only file system."

Could you help please.

michaaa62 2016-01-10 21:48

Re: How to mount opt folder?
 
My bad!

First command must be mmr .
Second command will mount to /media.

I edited the former post http://talk.maemo.org/showpost.php?p...8&postcount=25 to have all the commands in one place!

NotMicro 2016-01-11 14:08

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1494348)
Basically it is like this. Mount maemo rootfs, create mount point for storage partition, mount MyDocs partition to rescueOS, create archive of the rootfs on the MyDocs partition and enable mass-storage mode to transfer files and folders to your PC. Make sure the hidden dot-files and -folders are also transfered
Code:

mmr
mkdir /mnt/MyDocs
mount /dev/mmcblk0p1 /media
tar -c /mnt/maemo -f /media/rootfs.tar.gz
umount /media
ems

At last copy the content of both partitions to your PC. This saves the optfs partition, containing the /home/user and the /opt folders of the Maemo OS, and the MyDocs partition, containing your rootfs.tar archive, data and stuff.


Sorry, but I still have 2 problems:

1. When I execute mkdir /mnt/MyDocs I get a message "mkdir : can't create directory '/mnt/MyDocs' : Read-only file system.""

2. When I execute mount /dev/mmcblk0p1 /media I get a message "mount: mounting /dev/mmcblk0p1 on /media failed: Input/output error."

Help.

NotMicro 2016-01-11 14:17

Re: How to mount opt folder?
 
I am about to reflash whole device - that's why I want to backup rootfs. I have done it already in case of optfs (home, MyDocs).

But I want to try - for the last time - uninstalling fcam-drivers. When I use dpkg I still get a message indicating that fcam-drivers are installed and "connected" with blessn900. I can't though uninstall blessn900, as I described in post #4.

michaaa62 2016-01-11 17:33

Re: How to mount opt folder?
 
The first error is meaningless, the mount point will not get used.
Try this please for the second error
Code:

mount -t vfat /dev/mmcblk0p1 /media

NotMicro 2016-01-12 19:36

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1494447)
The first error is meaningless, the mount point will not get used.
Try this please for the second error
Code:

mount -t vfat /dev/mmcblk0p1 /media


Great, this one does the trick.

New problem - there is not enough space on my eMMC for creating archive with rootfs. I am using, unfortunately, Windows XP on my PC. When I connect N900 to free some space and execute ems command, PC does not "see" mass storage. Do you have any solution for this problem?

michaaa62 2016-01-12 20:23

Re: How to mount opt folder?
 
Did you unmount the MyDocs partition before trying to enable mass storage mode?

NotMicro 2016-01-13 10:34

Re: How to mount opt folder?
 
I did not mount it at all. I executed only ems command in rescueOS, but my Windows do not "cooperate" with N900.

michaaa62 2016-01-13 10:48

Re: How to mount opt folder?
 
This may not sound very helpful, but i am no WindowsXYZ user:

You may need some USB drivers for the Nokia N900, or help yourself long term, install some decent linux distribution to avoid those security and driver issues of WindowsXYZ.

NotMicro 2016-01-13 13:02

Re: How to mount opt folder?
 
Quote:

Originally Posted by michaaa62 (Post 1494724)
This may not sound very helpful, but i am no WindowsXYZ user:

You may need some USB drivers for the Nokia N900, or help yourself long term, install some decent linux distribution to avoid those security and driver issues of WindowsXYZ.


I know that Windows is a piece of s..., but I must use it in case of compatibility reasons. I will try to free space on eMMC using other PC with Linux.

Halftux 2016-01-13 14:03

Re: How to mount opt folder?
 
Maybe it is possible to pipe tar gz or dd through telnet. In this case you don't need to delete files.

I have done this with ssh and I think it should also work with telnet.

NotMicro 2016-01-13 15:28

Re: How to mount opt folder?
 
OK. It is done on a PC with linux. Mass storage mode under rescueOS works perfectly fine on Linux, but not on Windows.

NotMicro 2016-01-13 15:44

Re: How to mount opt folder?
 
Now I will try to copy rootfs. Maybe somebody - in the mean time - could help me solve the problem described in post #29. If not - I must reflash whole device.

NotMicro 2016-01-14 13:24

Re: How to mount opt folder?
 
Rootfs copied and transferred to PC. Thank you very much michaaa62 for a great help in doing this.

NotMicro 2016-01-15 20:15

Re: How to mount opt folder?
 
1 Attachment(s)
I have tried once again to flash only parts of fiasco image (for testing). And I am not sure if it is going the right way. On the picture which I attached to this post you can see a messages for example:
"sending kernel image<1705 kB> ...
100% <1705 of 0 kB, avg. 1705 kB/s"

I wonder if value 0 KB in the text above is normal or not. In other words - was flashing really done?


All times are GMT. The time now is 02:04.

vBulletin® Version 3.8.8