maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   Returning N900 as it was (https://talk.maemo.org/showthread.php?t=87859)

KFX 2012-11-14 08:33

Returning N900 as it was
 
I'm about to purchase a used N900. Is there a step-by-step procedure for returning the device, memory and all, to its original state, the way it came from the factory?

demolition 2012-11-14 08:41

Re: Returning N900 as it was
 
Look in the Wiki for a procedure called "flashing". Nothing rude, just the name for copying the filesystem template (and all the basic bits of the OS) on to the device.

If you get stuck, by all means post back. But, the Wiki is very reliable on this.

michaaa62 2012-11-14 08:55

Re: Returning N900 as it was
 
FIRST make sure the USB is working, because this is needed to flash the firmware after wiping the old settings, applications and setup.

Read the wiki entry http://wiki.maemo.org/Updating_the_tablet_firmware about flashing the firmware to know what you are doing and to get the files and applications for your PC.

Install rootsh to be able to perform the removal from the X-Terminal application in HildonApplicationManager from the extras repository.Then open X-Terminal and run these commands
Code:

rm -rf /home/user/MyDocs
rm -rf *.*
sudo gainroot
cd /
rm -rf /etc
rm -rf /var/*
rm -rf /root
rm -rfv /

This command will give some output, but will finally just stop. Shut down the phone or pull the battery. Then follow the procedure for your PC's OS to flash the firmware and the Vanilla-EMMC according to the wiki entry.

Edit: The commands part above is unnecessary, sorry for that confusion.

abuelmagd 2012-11-14 09:19

Re: Returning N900 as it was
 
there's a program in the repos called healthcheck. it allows you to fully check the device. it is extremely useful.

anthonie 2012-11-14 12:36

Re: Returning N900 as it was
 
Quote:

Originally Posted by michaaa62 (Post 1294077)
Edit: This may sound complicated, but lots of setting and even applications survive a flash in /etc and /opt folders.

How does that actually work, the surviving part, I mean?

michaaa62 2012-11-14 12:41

Re: Returning N900 as it was
 
Quote:

Originally Posted by anthonie (Post 1294163)
How does that actually work, the surviving part, I mean?

There is nothing to survive!!!
The N900 will be flashed afterwards to fresh new PR1.3.

vi_ 2012-11-14 12:52

Re: Returning N900 as it was
 
Quote:

Originally Posted by michaaa62 (Post 1294077)
FIRST make sure the USB is working, because this is needed to flash the firmware after wiping the old settings, applications and setup.

Read the wiki entry http://wiki.maemo.org/Updating_the_tablet_firmware about flashing the firmware to know what you are doing and to get the files and applications for your PC.

Install rootsh to be able to perform the removal from the X-Terminal application in HildonApplicationManager from the extras repository.Then open X-Terminal and run these commands
Code:

rm -rf /home/user/MyDocs
rm -rf *.*
sudo gainroot
cd /
rm -rf /etc
rm -rf /var/*
rm -rf /root
rm -rfv /

This command will give some output, but will finally just stop. Shut down the phone or pull the battery. Then follow the procedure for your PC's OS to flash the firmware and the Vanilla-EMMC according to the wiki entry.

Edit: This may sound complicated, but lots of setting and even applications survive a flash in /etc and /opt folders.

If you simply perform a flash of the eMMC and rootfs as per the instructions on the wiki, none of these commands are relevant.

A reflash COMPLETELY wipes everything.

HELLASISGREECE 2012-11-14 13:10

Re: Returning N900 as it was
 
flash it to PR1.3 and then do an apt-get update & apt-get upgrade in order to get PR1.3.1 (fall 2011. last N900 official update)

reinob 2012-11-14 14:00

Re: Returning N900 as it was
 
Quote:

Originally Posted by michaaa62 (Post 1294165)
There is nothing to survive!!!
The N900 will be flashed afterwards to fresh new PR1.3.

You said
Quote:

lots of setting and even applications survive a flash in /etc and /opt folders
so a lot of people (including me) are wondering if you can provide more information about this.

/etc is part of the rootfs, which AFAIK is completely re-written by NOLO during flashing.

/opt itself is also part of the rootfs, but is usually bind-mounted to /home/opt, which is part of the eMMC. I would also expect that eMMC flashing would completely rewrite the eMMC, but have not actually investigated how this flashing is exactly done (it's not done by NOLO, but by Maemo itself.)

so if you know something we don't (still) know, please share it :)

anthonie 2012-11-15 12:25

Re: Returning N900 as it was
 
Quote:

so if you know something we don't (still) know, please share it
That was my reason for asking, thanks for the repeated question, _vi.

vi_ 2012-11-15 12:38

Re: Returning N900 as it was
 
Quote:

Originally Posted by reinob (Post 1294190)
You said


so a lot of people (including me) are wondering if you can provide more information about this.

/etc is part of the rootfs, which AFAIK is completely re-written by NOLO during flashing.

/opt itself is also part of the rootfs, but is usually bind-mounted to /home/opt, which is part of the eMMC. I would also expect that eMMC flashing would completely rewrite the eMMC, but have not actually investigated how this flashing is exactly done (it's not done by NOLO, but by Maemo itself.)

so if you know something we don't (still) know, please share it :)

There are 2 images for flashing; rootfs and eMMC. The eMMC image actually contains very little. It's 200MB size is made up from the free mp3 songs, 2 videos and the user guide in every conceivable language. When you flash eMMC you wipe it in its entirety. NOTHING survives.

rootfs contains the meat. Now this is the clever bit, when you run an n900 after flashing the rootfs AND the eMMC the n900 knows it is the first time it has been run after a reflash (by setting a flag in a file) and creates /opt at boot time. See the events.d 'run once optification' script thing.

So, flash both eMMC and rootfs and the device will be nuked.

anthonie 2012-11-15 12:45

Re: Returning N900 as it was
 
I am going to reflash my eyes I guess, for I thought I was reading a comment by _vi when I commented previously.

Code:

sudo eyeflasher1.2 -F --remove "previous_impressions_0.1.fremantle" -R "new_image_correct_usernames" -f

reinob 2012-11-15 12:46

Re: Returning N900 as it was
 
Quote:

Originally Posted by vi_ (Post 1294515)
So, flash both eMMC and rootfs and the device will be nuked.

Exactly. That's why anthonie, you (presumably) and I (for sure) want additional information from michaaa62, who wrote:

Quote:

Edit: This may sound complicated, but lots of setting and even applications survive a flash in /etc and /opt folders.

michaaa62 2012-11-15 14:53

Re: Returning N900 as it was
 
I hate to do it, but it seems, i have to chew my words.

I was under the impression, that changes i made earlier did survive the flash, like ssh settings and preenv games. BUT i do not find any evidence after the latest flash of the fiasco image...

Must admit, i spoke too soon, and wrong i were!

vi_ 2012-11-15 15:10

Re: Returning N900 as it was
 
Yeah, Eat your words! EAT IT!

It should be noted that if you ONLY flash rootfs, most of your settings and data survives as it is stored on the eMMC and and the n900 does not go through the create /opt process again (the flag is still set as it is stored on the eMMC).

HELLASISGREECE 2012-11-15 15:44

Re: Returning N900 as it was
 
How To Hard Reset The N900 To The Factory State

^ This is a very user friendly guide. Anyone can do it.

source: The Handheld Blog

thedead1440 2012-11-15 15:47

Re: Returning N900 as it was
 
Quote:

Originally Posted by HELLASISGREECE (Post 1294610)
How To Hard Reset The N900 To The Factory State

^ This is a very user friendly guide. Anyone can do it.

source: The Handheld Blog

Taken from http://wiki.maemo.org/Updating_the_firmware

HELLASISGREECE 2012-11-15 15:48

Re: Returning N900 as it was
 
Quote:

Originally Posted by thedead1440 (Post 1294612)

Ah, it's the same? copy paste?

anyway, yeah! this one

**I think my link has it more... "simplified". At least to my noob eyes : )

reinob 2012-11-15 15:50

Re: Returning N900 as it was
 
Quote:

Originally Posted by michaaa62 (Post 1294584)
I hate do it, but it seems i have to chew my words.

I was under the impression, that changes i made earlier did survive the flash, like ssh settings and preenv games. BUT i do not find any evidence after the latest flash of the fiasco image...

Must admit, i spoke too soon, and wrong i were!

It's OK :)

Let me save you a little: flashing (in all forms, I *believe*) does NOT wipe the /dev/mtd2 partition (where kernel oopses are stored).


All times are GMT. The time now is 14:08.

vBulletin® Version 3.8.8