maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   [SOLVED] mounting ubifs in meego? - of course you can! (https://talk.maemo.org/showthread.php?t=73751)

tcm34riu234h 2011-06-04 22:36

[SOLVED] mounting ubifs in meego? - of course you can!
 
Solved! Thanks to the friendly people in #meego!

Everything is done on the Nokia N900 and ubuntu 10.04 LTS

Here's what I wanted to do:
  • mount the maemo root filesystem in meego
  • correct a dumb misspelling that killed my input

Here's the way I finally solved it:
  1. Downloaded the meego images
  2. installed them
  3. booted meego (basically as it is described here)
  4. used USB-Networking and ssh to overcome the missing characters problem (as it is described here)
  5. used wireless lan to connect to the internet
  6. got the packages "mtd-utils" and "mtd-utils-ubi" (mtd-utils-ubi-1.3.1-2.5.armv7l.rpm in my case since I used meego 1.1) (zypper can be a big help with this!)
  7. attached ubi by
    Code:

    ubiattach /dev/ubi_ctrl -m 5
  8. then mounted it with
    Code:

    mount -t ubifs -o rw,bulk_read,no_chk_data_crc ubi0:rootfs /media/maemo

Then it was mounted as usual and I correct my dumb misspelling:
Code:

[root@localhost maemo]# cd usr/lib/xorg/modules/input/
[root@localhost input]# ls
evdev_drev.so  evdev_drv.so.mousesupport  joystick_drv.so
[root@localhost input]# mv evdev_drev.so evdev_drv.so

I hope that help can help someone who has the same or a related problem.

Thanks again for all your help in #meego and thanks to Hurricane from the maemo talk forum.

tcm


Old post:
Quote:

Originally Posted by tcm34riu234h (Post 1022505)
Hello everybody,

I kind of messed up my "evdev_drv.so" file. I didn't like the mouse support anymore, fooled around, missspelled "evdev_drv.so.orig" and so now the file is missing. Of course I rebooted before I figured it out so yay - looks like a reflash.

The thing is I thought about what I would do, if something like the would happen to my pc. Of course I would just boot another OS, fix the missspelled filename and done.

Since the n900 is pretty open and I've got meego as an alternative, I tried it. At the moment I'm stuck. I got this far:

- "The 256 MB NAND is formatted as UBIFS and contains the bootloader, kernel and root directory "/" with about 100 MB of free space." (wikipedia)

- the filesystem is ubifs
- meego does not load ubifs in the kernel natively so I use modprobe ubifs, which turns out to be working since it appears in lsmod
- the "proper" device to mount if there is any seems to be "/dev/mtdblock5"
- additional options could be "rw,bulk_read,no_chk_data_crc"

so all in all I tried "
Code:

mount -t ubifs /dev/mtdblock5 -o rw,bulk_read,no_chk_data_crc /media/maemo/
"

and either get "
Code:

unknow filesystem: ubifs
" or I get
"
Code:

mount: wrong fs type, bad option, bad superblock on /dev/mtdblock5,
      missing codepage or helper program, or other error
      Sometime Syslog helps:
      Try  dmesg | tail

"

"
Code:

dmesg | tail
" gives me:
"
Code:

[  182.204833] UBIFS error (pid 1081): ubifs_get_sb: cannot open "/dev/mtdblock5", error -22
"

On other OS I saw things like "ubimkvolume" or similar. Not on meego though.

Has anybody ever successfully mounted the rootfs of maemo in another os?

Or has someone an idea to solve the problem with the "endev.." without reflashing?

Thanks in advance for your help!

If you need any further information I will be happy to reply ;)

tcm

Here is the output of fdisk -l (sorry it's in german but I think you know the format anyway)
"
Code:

[root@localhost media]# fdisk -l

Platte /dev/mtdblock0: 0 MByte, 131072 Byte
59 Köpfe, 106 Sektoren/Spuren, 0 Zylinder
Einheiten = Zylinder von 6254 × 512 = 3202048 Bytes
Disk identifier: 0x00000000

Festplatte /dev/mtdblock0 enthält keine gültige Partitionstabelle

Platte /dev/mtdblock1: 0 MByte, 393216 Byte
59 Köpfe, 106 Sektoren/Spuren, 0 Zylinder
Einheiten = Zylinder von 6254 × 512 = 3202048 Bytes
Disk identifier: 0xffffffff

Festplatte /dev/mtdblock1 enthält keine gültige Partitionstabelle

Platte /dev/mtdblock2: 0 MByte, 262144 Byte
60 Köpfe, 106 Sektoren/Spuren, 0 Zylinder
Einheiten = Zylinder von 6360 × 512 = 3256320 Bytes
Disk identifier: 0x646f6d5f

Festplatte /dev/mtdblock2 enthält keine gültige Partitionstabelle

Platte /dev/mtdblock3: 2 MByte, 2097152 Byte
60 Köpfe, 106 Sektoren/Spuren, 0 Zylinder
Einheiten = Zylinder von 6360 × 512 = 3256320 Bytes
Disk identifier: 0x00000000

Festplatte /dev/mtdblock3 enthält keine gültige Partitionstabelle

Platte /dev/mtdblock4: 2 MByte, 2097152 Byte
60 Köpfe, 106 Sektoren/Spuren, 0 Zylinder
Einheiten = Zylinder von 6360 × 512 = 3256320 Bytes
Disk identifier: 0xffffffff

Festplatte /dev/mtdblock4 enthält keine gültige Partitionstabelle

Platte /dev/mtdblock5: 263 MByte, 263454720 Byte
60 Köpfe, 106 Sektoren/Spuren, 80 Zylinder
Einheiten = Zylinder von 6360 × 512 = 3256320 Bytes
Disk identifier: 0x00000000

Festplatte /dev/mtdblock5 enthält keine gültige Partitionstabelle

Platte /dev/mmcblk0: 8018 MByte, 8018460672 Byte
4 Köpfe, 32 Sektoren/Spuren, 122352 Zylinder
Einheiten = Zylinder von 128 × 512 = 65536 Bytes
Disk identifier: 0x000a5a4c

        Gerät  boot.    Anfang        Ende    Blöcke  Id  System
/dev/mmcblk0p1              1      24415    1562500  83  Linux
/dev/mmcblk0p2          24417      28320      249856  83  Linux

Platte /dev/mmcblk1: 32.0 GByte, 32015122432 Byte
4 Köpfe, 16 Sektoren/Spuren, 977024 Zylinder
Einheiten = Zylinder von 64 × 512 = 32768 Bytes
Disk identifier: 0x00000000

        Gerät  boot.    Anfang        Ende    Blöcke  Id  System
/dev/mmcblk1p1              2      884865    28315648    c  W95 FAT32 (LBA)
/dev/mmcblk1p2          884866      950401    2097152  83  Linux
/dev/mmcblk1p3          950402      974977      786432  82  Linux Swap / Solaris

"

"enthält keine gültige Partitionstabelle" means "does not contain valid partition tables"


Hurrian 2011-06-04 23:17

Re: mounting ubifs in meego? - "evdev_drv.so" messed up
 
Code:

ubiattach /dev/ubi_ctrl -m 5 && mount -t ubifs -o rw,bulk_read,no_chk_data_crc ubi0:rootfs /media/maemo
Give it a go.

tcm34riu234h 2011-06-05 07:01

Re: mounting ubifs in meego? - "evdev_drv.so" messed up
 
Quote:

Originally Posted by Hurrian (Post 1022418)
Code:

ubiattach /dev/ubi_ctrl -m 5 && mount -t ubifs -o rw,bulk_read,no_chk_data_crc ubi0:rootfs /media/maemo
Give it a go.

Thanks!

When I try "ubiattach" it says command unknown.
Code:

[root@localhost dev]# ubiattach
-bash: ubiattach: Kommando nicht gefunden.

I modprobed ubifs, still no difference.

I did
Code:

[root@localhost dev]# ls -a -R / | grep ubi
ubi_ctrl
misc:ubi_ctrl
anubis.ko
ubifs
/lib/modules/2.6.35.3-10.3-n900/kernel/fs/ubifs:
ubifs.ko
ubi
ubi_ctrl
/sys/class/ubi:
ubi_ctrl
/sys/devices/virtual/misc/ubi_ctrl:
/sys/devices/virtual/misc/ubi_ctrl/power:
tcp_cubic
ubifs
/sys/module/tcp_cubic:
/sys/module/tcp_cubic/parameters:
/sys/module/ubifs:
/sys/module/ubifs/holders:
/sys/module/ubifs/notes:
/sys/module/ubifs/sections:
ubi-user.h

Filesystems on meego:
Code:

[root@localhost dev]# cat /proc/filesystems
nodev        sysfs
nodev        rootfs
nodev        bdev
nodev        proc
nodev        tmpfs
nodev        binfmt_misc
nodev        debugfs
nodev        sockfs
nodev        usbfs
nodev        pipefs
nodev        anon_inodefs
nodev        devpts
        ext2
        ext3
        ext4
        cramfs
nodev        ramfs
        btrfs
nodev        mqueue
nodev        mtd_inodefs
nodev        ubifs

I think I need to somehow attach it before I can mount it. That's the main thing.

tcm

tcm34riu234h 2011-06-05 08:24

Re: mounting ubifs in meego? - "evdev_drv.so" messed up
 
Oh my gosh... solved the f**cking problem ;)

You need "mtd-utils" in meego - that's the problem. So you actually "just" need to get "mtd-utils" and "mtd-utils-ubi".
Then you've got "ubiattach" and everything works like a charm with Hurrians commands.

Thank god!

I'm gonna write a more complete version of what I did later...

tcm

NIN101 2011-07-29 16:45

Re: [SOLVED] mounting ubifs in meego? - of course you can!
 
Yeah, you can...

I am currently developing some kind of rescueOS, based on the meego kernel. My first tests with the community edition kernel resulted in some errors:

"ubi error -74 while writing ...", like here

UBI FAQ

I have used the mtdutils 1.1, debian package.

Well, I kinda knew this couldn't be "real" write errors, physical, as maemo works without problems. I didn't have any bad PEB, so anyway.

I compared the kernel conifg options between maemo and meego.

maemo:
# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
meego:
CONFIG_MTD_ONENAND_VERIFY_WRITE=y

Recompiled meego ce kernel without CONFIG_MTD_ONENAND_VERIFY_WRITE, and now it works.


All times are GMT. The time now is 20:32.

vBulletin® Version 3.8.8