maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   Access internal N800 memory from PC? (https://talk.maemo.org/showthread.php?t=21943)

dgec 2008-07-15 15:19

Access internal N800 memory from PC?
 
Love my little N800 but I'm getting something similar to the WSOD.

I hope it's still alive, and just an out of memory condition in the onboard memory (not the internal card) preventing it from loading, as the N800 memory was getting low just before this happened. I need to try to save some data files which are (of course) unfortunately not backed up.

So, before I try reflashing it, is there was some way to get to that memory? Maybe a non-GUI boot or something? I'm not sure if I have the SSH server installed or not, I think I might have tried installing it.

Particulars:
- N800
- OS 2008 (v4.0)
- had a 2GB and followed instructions somewhere to "extend memory" onto the card so I could install more programs. Not sure if it worked, didn't seem to make much difference.

- powering on, NOKIA appears, then 2 startup screens, UFP symbols, then the LCARS PADD image. (yes, yes, I iinstalled the Star Trek theme awhile ago but when I uninstalled, it didn't remove those screens.
- then it goes white and does nothing else.
- there's no sounds, probably because I had sound turned off

- power button brings up the menu, and I can shutdown, etc
- the daily alarms I have set (with the Status Bar Clock) all come on as usually, with the Close and Snoose buttons operating normally.
- nothing else has any effect

- I tried powering up while holding down the Home key but it diesn't seem to make any difference.

Help?

dgec 2008-07-16 13:07

Re: Access internal N800 memory from PC?
 
Anyone? Do I need to reflash for sure?

lazuli 2008-07-16 13:33

Re: Access internal N800 memory from PC?
 
did you try to remove the battery before restarting? also try to remove all memory cards.. i had lots of "wsods" but i just stuck with the tablet and after many reboots it usually comes out fine.. don't lose hope! :p

ericdkirk 2008-07-16 13:46

Re: Access internal N800 memory from PC?
 
It is still alive you have just messed up the OS and it will not boot all the way, you can reflash it just fine but you will loose your data, sorry.

dgec 2008-07-16 16:08

Re: Access internal N800 memory from PC?
 
@lazuli yep, tried all those, including leaving it out for awhile as per one post.

@ericdkirk Sigh. Bah.

Hmmm.... but this highlights something: Most PCs can boot from CD or floppy or network etc, there should be some "safe" or recovery mode as standard, I'm thinking. CLI at least.

Do I understand correctly that to boot from SD requires a customized kernal/initfs already installed?

i.e. http://fanoush.wz.cz/maemo/#initfs or http://maemo.org/community/wiki/HowT...From_MMC_card/

fanoush 2008-07-16 19:14

Re: Access internal N800 memory from PC?
 
Quote:

Originally Posted by dgec (Post 203616)
Do I understand correctly that to boot from SD requires a customized kernal/initfs already installed?

i.e. http://fanoush.wz.cz/maemo/#initfs or http://maemo.org/community/wiki/HowT...From_MMC_card/

Well, no but it is a bit easier to have bootmenu in initfs and already cloned system to card when this happens. Now you can prepare SD card with ext2 partition and extract rootfs.jffs2 image (from stock firmware) to it and use linux flasher to set root device to 'mmc'. Then you will boot clean firmware from mmc, install ssh, log-in and and mount internal flash.

Extracting rootfs from firmware and mounting it on linux PC was discussed here few times so maybe search gives something.

EDIT: check this http://www.internettablettalk.com/fo...ad.php?t=21028

dgec 2008-07-17 23:15

Re: Access internal N800 memory from PC?
 
Oh! I will check that out. Thanks!

fanoush 2008-08-12 14:27

Re: Access internal N800 memory from PC?
 
Got this followup via PM, perhaps it is better to continue here so others can join with helping or learn something
Quote:

Originally Posted by dgec
I'm trying to add the boot menu so I can boot from the SD card so that 1) I don't lose the data on the internal memory and 2) have more program space.

After reading your reply at http://www.internettablettalk.com/fo...00&postcount=6

I downloaded the flasher package from your page (as of June 2008 date I think), and I (just) downloaded the latest 4.2 diablo image.

I unpacked the flasher, but I can't find a script by the name "flash_initfs", although there's a initfs_flash.

As I understand it, I need to boot into linux, install the 0xffff .deb in the linux folder. Do I need to do that before or after I run the script?

Is the http://www.internettablettalk.com/fo...ad.php?t=21028 thread "fiasco" file talking about the diablo file I downloaded?

Then I need to format the SD card in linux (xf2 format?) - Can I format with FAT32 so it's readable from Windows as well?

Then I follow some? of the instructions in that last thread above?

I'm really confused, I don't know enough to figure out what I need to know and my NIT has been dead for nearly a month

Yes, it is initfs_flash and it must be run on the tablet directly. I have fixed the README now (did it few times but the wrong name always sticks in some version :-).

If your tablet is already not booting then the script needs to be heavily modified but still it theory it is possible to do same thing on PC. But in this case it is easier to extract rootfs from firmware to mmc card and set root device to 'mmc' via Nokia linux flasher
Code:

flasher-3.0 --set-root-device mmc
and boot tablet with clean image first. Then it is easier to do recovery or install bootmenu directly on the device.

Extracting rootfs is described in the link you mentioned http://www.internettablettalk.com/fo...ad.php?t=21028

Additionally you need to format card with ext2 filesystem. You may also re-partition it first and leave first partition as FAT16/32. This is not needed for first recovery but is preferred setup for maximum compatibility with Windows and tablet OS itself.

dgec 2008-08-26 15:17

Re: Access internal N800 memory from PC?
 
I'm getting there...

But I can't get the flasher to run in the GUI or in a terminal.

Ubuntu (Heron) tells me it's not an executable file, although "ls -l" says it is, and even when I force the flag on in the GUI file browser.

dgec 2008-08-31 21:05

Re: Access internal N800 memory from PC?
 
Anybody????

klohmann 2008-08-31 22:21

Re: Access internal N800 memory from PC?
 
1. Are you running the script as root? Otherwise, you may not have access to the usb port.
2. I had the experience that the executable would only run from the physical root filesystem, and not a mounted usb, where I originally had saved the file (I am using a EeePC 701). I think that because the physical filesystem is not loaded as root, but I'm not sure.

Hope that helps. K.

dgec 2008-09-02 23:59

Re: Access internal N800 memory from PC?
 
I wasn't even running the script, I was doing each command, one by one. But when I sudo'd them it was good. I'm not sure what happened when I tried to do it from the usb drive, I finally installed Linux to hard drive anyway.

However, I have figured out some of my issues. I will continue to post my "experiences" as I fumble along so stay tuned for more hilarity as the newbie trips over himself continually!

- I was doing too many things at once and thought I had the same error for all of them. In fact, I was stuck with command not found...

:eek: *** Microsoft refugees take note **** :eek:
"/.flasher" NOT = "flasher"

The current directory is NOT in the command path, unlike MS products. This is for security apparently, so you don't get caught by a FAKE command or script (like ls) in a directory that you happen to be in. Smart design. Aggravatingly different, but smart.

Right now I'm trying to figure out why I can't mount the file copy I can copy it to the card. Sigh.

dgec 2008-09-03 04:33

Re: Access internal N800 memory from PC?
 
Well, not sure what the differences in the commands are, but I finally got the new jffs2 mounted.

Used PartEd to set Disklabel to clear my 8GB card: created a 256MB FAT32, a 4GB ext2, 3 GB ext2 and 1.2GB swap.

But I can't write anything to them! What now? I thought I saw a post somewhere about fixing a non-writable USB drive but can't seem to find it now. I guess this is more of a general Linux newbie issue. :)

dgec 2008-09-06 02:45

Re: Access internal N800 memory from PC?
 
Well, I finally got through all the items on the list and.... it still doesn't work.

The flasher confirms it the root device is MMC i.e. start from the SD card, looking at the SD card on my PC shows all the files from the jffs2 extract are there, but I still get a white screen after it finishes booting.

dgec 2008-09-06 22:58

Re: Access internal N800 memory from PC?
 
:D:D:D:D:D:D YEHAW!!! I can boot from SD! :D:D:D:D:D:D

It was the fact that it's an 8GB card - I needed to use the Panasonic Low Level Format program.
Formatted it, used gparted (because I couldn't figure out how to point at the card from shell on my PC) to resize the FAT32 to 500MB and the rest to ext2 (well, 2 ext2 - 4GB & 3GB), recopied (tar) the jjfs2 to the ext2 partition on the card and boom! Up she came! :cool::cool:

The last issue... despite the control panel memory showing as 3.5GB available, I have no available memory to do save anything?! Sigh.

Doing a search of the message base now.

dgec 2008-09-08 01:10

Re: Access internal N800 memory from PC?
 
I partially figured out what's going on... the entire file system is read-only?!

How do I fix that? I assume that tar copied the file permissions from the read-only jjfs2 mount from the PC onto the "internal" SD card (mmc2).

The control-panel/memory says there's no virtual space and nothing in the GUI will find the "external" SD card (mmc1). Xterm will find /media/mmc1 but that's the only thing.

Of course, I can't install anything either.

fanoush 2008-09-08 05:10

Re: Access internal N800 memory from PC?
 
Quote:

Originally Posted by dgec (Post 221773)
I assume that tar copied the file permissions from the read-only jjfs2 mount from the PC onto the "internal" SD card (mmc2).

unlikely, I think I did it like this and had no such problem, mount should not modify permissions when seting fs to read only via -o ro. Why do you think it is read only? Can you copy here output of "ls -la / /home /home/user"?

dgec 2008-09-08 11:35

Re: Access internal N800 memory from PC?
 
I have the 8gb card partioned into 500mb fat32, 4gb ext2, 3.5 gb ext2.
There's also the 2gb card in the external slot.
Also where is/should the internal flash memory mount when booting from the card?
A friend saw that there are two root mounts and wondered why?!

~ $ ls -la /
drwxr-xr-x 24 root root 4096 Jan 1 1970 .
drwxr-xr-x 24 root root 4096 Jan 1 1970 ..
drwxr-xr-x 2 root root 4096 Jun 12 17:03 .dev
drwxr-xr-x 2 root root 4096 Jun 12 17:03 bin
drwxr-xr-x 2 root root 4096 Jun 12 17:03 boot
drwxr-xr-x 2 root root 4096 Jun 12 17:03 cdrom
drwxr-xr-x 12 root root 3600 Sep 6 21:14 dev
drwxr-xr-x 63 root root 4096 Sep 6 21:14 etc
drwxr-xr-x 2 root root 4096 Jun 12 17:03 floppy
drwxr-xr-x 3 root root 4096 Jun 12 17:06 home
drwxr-xr-x 2 root root 4096 Jun 12 17:03 initrd
drwxr-xr-x 6 root root 4096 Jun 12 17:03 lib
drwx------ 2 root root 16384 Sep 6 21:16 lost+found
drwxr-xr-x 4 root root 4096 Jun 12 17:06 media
drwxr-xr-x 3 root root 4096 Jan 1 1970 mnt
drwxr-xr-x 2 root root 4096 Jun 12 17:03 opt
dr-xr-xr-x 99 root root 0 Jan 1 1970 proc
drwxr-xr-x 3 root root 4096 Sep 6 17:38 root
drwxr-xr-x 2 root root 4096 May 22 07:33 sbin
drwxr-xr-x 2 root root 4096 Jun 12 17:03 srv
drwxr-xr-x 11 root root 0 Jan 1 1970 sys
drwxrwxrwt 9 root root 680 Sep 8 01:32 tmp
drwxr-xr-x 14 root root 4096 Jun 12 17:05 usr
drwxr-xr-x 12 root root 4096 Jan 1 1970 var

~ $ ls -la /home
drwxr-xr-x 3 root root 4096 Jun 12 17:06 .
drwxr-xr-x 24 root root 4096 Jan 1 1970 ..
drwxr-x--- 8 user users 4096 Sep 6 17:38 user

~ $ ls -la /home/user
drwxr-x--- 8 user users 4096 Sep 6 17:38 .
drwxr-xr-x 3 root root 4096 Jun 12 17:06 ..
-rw------- 1 user users 16 Sep 6 21:38 .esd_auth
drwx------ 2 user users 4096 Sep 6 17:38 .gnome2
lrwxrwxrwx 1 root root 21 Sep 6 21:20 .icons -> /usr/share/user-icons
drwxr-xr-x 2 user users 4096 Jun 5 12:40 .mediaplayer-engine
drwxr-xr-x 3 user users 4096 Sep 6 21:38 .osso
drwxr-xr-x 2 user users 4096 Jun 12 17:06 .osso-cud-scripts
drwxr-xr-x 3 user users 4096 Jun 12 17:05 .osso_rss_feed_reader
drwxr-xr-x 7 user users 4096 Jun 12 17:05 MyDocs
-rw-r--r-- 1 user users 0 Jun 12 17:03 first-boot-flag

here's what I get from mount::

~ $ mount
rootfs on / type rootfs (rw)
/dev/root on /mnt/initfs type jffs2 (ro)
none on /mnt/initfs/proc type proc (rw)
none on /mnt/initfs/sys type sysfs (rw)
none on /mnt/initfs/tmp type tmpfs (rw)
/dev/mmcblk0p2 on / type ext2 (ro)
none on /tmp type tmpfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
none on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

~ $ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/mmcblk0p2 2048 2048 0 100% /mnt/initfsnone 512 128 384 25% /mnt/initfs/tmp
/dev/mmcblk0p2 4159876 249584 3700644 6% /
none 512 128 384 25% /tmp
none 1024 68 956 7% /dev
tmpfs 1024 0 1024 0% /dev/shm
~ $

fanoush 2008-09-08 12:51

Re: Access internal N800 memory from PC?
 
Quote:

Originally Posted by dgec (Post 221957)
Also where is/should the internal flash memory mount when booting from the card?

not mounted and not used at all, you can mount it by hand if you need it
Quote:

Originally Posted by dgec (Post 221957)
A friend saw that there are two root mounts and wondered why?!

That's 'normal', first root is in initfs partition, then real root is mounted and swapped with previous one via pivot_root.

file permissions look good but this
Quote:

Originally Posted by dgec (Post 221957)
/dev/mmcblk0p2 on / type ext2 (ro)

is pretty strange. Nokia initfs mounts root rw by default not ro as you have there, do you have some linuxrc customizations there (like Debian booting)?

dgec 2008-09-08 13:59

Re: Access internal N800 memory from PC?
 
I was going to wait to sort everything out before posting the entire list, but here's my steps (so far) cribbed from your notes to me and to benny and a few others.

1. installed Ubuntu 8, downloaded flasher-3, diablo ARM binary, download & install Panasonic LLF program (full format, no erase).

1.5 sudo su
>>> all the following commands need to be executed as root, so either go superuser, or prepend sudo to the commands.

2. ./flasher-3.0 --set-root-device mmc
>>> (well, I ran it and found the stuff to do this, not done it yet, just in case, you know?)

3. ./flasher-3.0 -u -F diablo_ARM.bin
>>> finally realized ./ needed & renamed binary to make it easier to type

4. sudo su
>>> kept forgetting which commands needed sudo, just went to su.

5. losetup -f
>>> gave me /dev/loop1 << apparently 1 being the next available "loop" (virtual disk) on my default Ubuntu at least
>>> note the /dev/loop# and use it in the next command

6. losetup /dev/loop1 rootfs.jffs2

7. modprobe block2mtd block2mtd=/dev/loop1,131072
>>> BUT trying to mount immediately didn't work, I had to pull the extra commands from the script:

8. modprobe jffs2

9. modprobe mtdblock

10. mount -t jffs2 -o ro /dev/mtdblock0 /mnt/jffs2/

11. tar -cf - -C /mnt/jffs2 . | tar -xvf - -C /media/disk
>>> had to add the "-" on the second tar

fanoush 2008-09-09 12:02

Re: Access internal N800 memory from PC?
 
all looks fine (flasher should be run as root too?), without seeing output it is hard to say it for 100%

So then you did 'umount /media/disk', moved card to the tablet and booted it without installing bootmenu or otherwise messing with initfs partition at all? And root filesystem is mounted read only? What firmware (kernel,initfs) is flashed on the tablet, same Diablo?

dgec 2008-09-10 19:30

Re: Access internal N800 memory from PC?
 
Yes, flasher was either sudo or su as well. there is no output errors, maybe there's a verbose report.
I tried to do a chmod but it wouldn't let me touch anything.

I think it's the partition somehow. I tried to copy it all over again, and I copied to media/disk instead of media/disk1 as I (apparently) did the first time.

However, media/disk would not let me write anything to it, no permissions. The other ext2 partition had no complaints however.

Unmounting and deleting the partition allowed me to move the existing one, going to try and mount that one... moving it apparently erased it instead of moving.
Great.

So.... one more time.

dgec 2008-09-12 19:09

Re: Access internal N800 memory from PC?
 
Finally!! Everything works on when I boot from SD. I even went and installed a bunch of my favourite programs again. :-)
It must have been related to the ownership or something, I had to go in as root and chmod everything to 0777... EXCEPT /etc/sudoers which has to be 0440.

Now to figure out how to backup (and restore) it... Actually, a couple more things as well.

Quote:

Originally Posted by fanoush (Post 221967)
not mounted and not used at all, you can mount it by hand if you need it

How?! Can't figure out what device or whatever it is. My Linux use is limited to mostly user so far.

Can we use that memory for swap/virtual space? :D

Also, to make a backup of this, can I just do a copy to another card? (Ok, maybe another tar at least)

Finally, is this worth putting together into another post or wiki article "How to create a bootable card on your PC - booting tablet not required" ;)

fanoush 2008-09-15 06:20

Re: Access internal N800 memory from PC?
 
Quote:

Originally Posted by dgec (Post 223396)
How?! Can't figure out what device or whatever it is. My Linux use is limited to mostly user so far.

mount -t jffs2 /dev/mtdblock4 /opt

Quote:

Originally Posted by dgec (Post 223396)
Can we use that memory for swap/virtual space? :D

Well, you can do anything but this is not a good idea, jffs2 compresses data by default when writing which is slow. Also it is not a filesystem suited for a lot of writing. IMO the best usage for it is to keep clean bootable system there for recovery when your main system on mmc breaks.

Quote:

Originally Posted by dgec (Post 223396)
Also, to make a backup of this, can I just do a copy to another card? (Ok, maybe another tar at least)

yes

dgec 2008-09-15 14:54

Re: Access internal N800 memory from PC?
 
Yes! THANK YOU so much for all your help, Fanoush!! :):)

By the way, your ITT message box is full, Fanoush... no doubt by all our newbie pleas for help :cool:

Quote:

Quote:

Originally Posted by dgec
How?! Can't figure out what device or whatever it is. My Linux use is limited to mostly user so far.
mount -t jffs2 /dev/mtdblock4 /opt
Total awesomeness! :D:D At last I can backup my comic bookmarks! ;-) I mean, save my valuable phone numbers, addresses and other data.

Quote:

Quote:

Originally Posted by dgec
Can we use that memory for swap/virtual space?
Well, you can do anything but this is not a good idea, jffs2 compresses data by default when writing which is slow. Also it is not a filesystem suited for a lot of writing. IMO the best usage for it is to keep clean bootable system there for recovery when your main system on mmc breaks.
Ah, yes. I was thinking of reformatting the flash to swap but a working, recovery spot is probably the best idea, given my usual "test to destruction" behaviour. :o

Quote:

Quote:

Originally Posted by dgec
Also, to make a backup of this, can I just do a copy to another card? (Ok, maybe another tar at least)
yes
Perfect! Eh.... except my external card seems to have mysteriously vanished. I hope it didn't pop out somehow when my N800 fell out of my pocket while I was running to the car through the pouring rain on the weekend. :o Everything else that detaches came off except the (secured) internal card. Dried it off before daring to put the battery in again; thankfully it didn't fall into an actual puddle.
[edit] for all those of me worrying, found it whew!

Anyway, thanks again. I hope other people can use this too. I'll put everything together in one final post to this asap.


All times are GMT. The time now is 10:53.

vBulletin® Version 3.8.8