View Single Post
Posts: 1,397 | Thanked: 2,126 times | Joined on Nov 2009 @ Dublin, Ireland
#416
Originally Posted by reinob View Post
Basically, the boot process is as follows:

1. *NOLO* is the boot loader, which loads whatever kernel is installed in the kernel partition.

2. *kernel* loads and runs whatever it's been given as an init parameter. standard (on Maemo) is /sbin/preinit

3. *preinit* intializes various stuff about your N900 and then runs init (upstart)

4. *upstart* starts system services, X11 and the desktop.

*** U-Boot

Now if you install U-Boot it replaces *kernel*, so that NOLO passes control to U-Boot, which itself loads a kernel. If that kernel is a Maemo kernel (stock, power kernel), then that kernel loads preinit, etc.

Meaning: U-Boot replaces step 2, but the kernel loaded by U-Boot normally (if Maemo) jumps to step 3, so all is OK.

*** Bootmenu

Bootmenu is run by preinit, so that it runs between steps 3 and 4, let's call it 3.5. It is thus entirely independent of U-Boot and whatever kernel you have.

*** Backupmenu

Backupmenu is like Bootmenu. It is actually (normally) run from Bootmenu, so it kind of replaces step 4.

*** Multiboot

Multiboot replaces /sbin/preinit (step 3), so that it shows a menu similar to Bootmenu. The trick here is that when you select a kernel, it FLASHES that kernel, so that your selected kernel replaces STEP 2.

If you remember a few lines ago U-Boot ALSO REPLACES THE KERNEL.

If you do the math you'll notice that if you have U-Boot *and* Multiboot the next time you select a kernel in Multiboot it will replace U-Boot, so U-Boot is gone completely from your device. This is a common problem amongst the people who (still) don't know how the N900 and Maemo work.

*** Flashing

Your N900 has various partitions. For all practical matters you have:

disk 1:
partition 1: kernel
partition 2: root file system (/)
(NOLO and other partitions are also there, but you don't care).

disk 2:
partition 1: /home
partition 2: Mydocs
(swap is also there but you don't care)

If you flash the ROOTFS aka FIASCO aka COMBINED image you are basically replacing "disk 1", i.e. you get the stock kernel and a new root file system. Your /home and your Mydocs are not touched.

If you flash the eMMC aka VANILLA you get a new /home and Mydocs.

* NOTE (added after Pali's comment -- Thanks)
/opt is a symlink to /home/opt, meaning that if you flash the eMMC/VANILLA image *only* your /opt folder will be empty, which will likely make Maemo unbootable.

(actually should not happen, unless something actually requires /opt to be there. But yes, knowing Maemo, there is 100% something critical-essential stored in /opt).
*

Note that you can choose to only flash the kernel (i.e. without touching the rootfs). This is a way of e.g. fixing a fvcked up U-boot configuration.

I hope this makes everything a bit clearer!
Wonderful explanation, this should be copy-pasted in every opening thread about Fremantle.
 

The Following 4 Users Say Thank You to ivgalvez For This Useful Post: