View Single Post
Posts: 154 | Thanked: 73 times | Joined on Jan 2009 @ Toronto
#20
Originally Posted by GeneralAntilles View Post
http://wiki.maemo.org/Booting_from_a...stall_bootmenu

Feel free to add and improve that guide.
Here is a suggestion.

Since the Wiki is aimed at users, and this thread is aimed at the less experienced, it might be worth giving some detail about the process of customizing the bootmenu, including a brief explanation of why the user could find it useful. (As an example of how useful, suppose you want to boot an ext2 file system from the partition where the default is ext3.) For reasons that appear below, this will be particularly important for N770 users who might be setting up OS2006 in one of their partitions and OS2008HE in another, and also for anyone who uses a Windows PC for updating the Tablet's internal flash.

CUSTOMIZING THE BOOTMENU

Chances are, you have read somewhere that the bootmenu is fully customizable. This may sound cryptic, but Fanoush has written initfs_flasher to be very user-friendly. If you can use the Notes application, you can edit the bootmenu (unless you are running an older OS such as OS2006). Most probably you don't have to edit it at all. Even if you have to, it involves nothing more than changing a "3" to a "2" in two locations on a page of Notes, and deleting a space and the three letters "jbd". It is important to follow Bunanson's instructions rather than the Wiki when you download and unpack initfs_flasher. Bunanson does it in home/user/MyDocs/.documents/ whereas the Wiki does it in home/user/bin/ , and that makes all the difference.

[By the way, looking at the Wiki, I don't understand how initfs_flasher moves itself from /home/user/bin/ to /home/user/local/bin/.]

First off, do you need to know about this? If you are only setting up one bootable partition on the MMC, the answer is no, you don't. The defaults will work. Just follow Bunanson's instructions. When it is all done and you turn on your Tablet again, a menu will open, giving you a choice of partitions where the boot could take effect. Use the hardware navigation keys to make your selection. The Tablet will open as you expect it to.

Some users find it handy to be able to run more than one OS on their Tablets. There may be features of an older distribution that you like better than the later ones. When you are going to have more than one bootable MMC partition on N770, or more than two on N8x0, you should consider whether to edit the bootmenu. If you need to read this guide, you are almost certainly dealing with an ext2 file system. The default menu puts ext3 in one possible partition, and you will have to change that.

After you have done the "cd initfs_flasher" and the subsequent "mv" command, the initfs_flasher folder will contain a text file called bootmenu.conf . So long as initfs_flasher is in a subfolder of /home/user/MyDocs/ , you can open it with File Manager. Double-click on "Documents" and then on "initfs_flasher". bootmenu.conf is the first non-folder item on the list of contents of initfs_flasher. (Sometimes it is preceded by a folder called "mnt", which for some reason is not always there.)

Double clicking on bootmenu.conf, you see a message that File Manager does not recognize the file type, but can search for an app to open it. Click on "OK", select "Notes", and bootmenu.conf will open. (This does not work in OS2006. Look five paragraphs below in this post.) You can edit and save bootmenu.conf just like any other document in Notes. The version you save will be the bootmenu you later see on rebooting after running initfs_flash. In fact, before running initfs_flash, it is a good idea to print out your edited bootmenu.conf and make sure it really says what you want it to say. The steps involved, starting from /home/user/MyDocs/.documents/initfs_flasher/ , are:

(1a) cp bootmenu.conf /media/mmc1/ ( for N770) or (1b) cp bootmenu.conf /media/mmc2/ (for N8x0)
(2) connect to PC or Mac
(3) open bootmenu.conf with WordPad or whatever you do with Linux or Mac
(4) print.

You might even like to print bootmenu.conf BEFORE editing it, to see what you will be working with and plan your changes.

Looking at the text of bootmenu.conf, the part you should examine starts about half-way down, at the line which reads
MENU_2_NAME="Internal MMC card, partition 2, ext2" [slightly different wording for N770]
followed by five more lines starting with MENU_2_ . Assuming that you are in fact going to have ext2 files in this partition, you don't have to make any changes to this paragraph. Optionally, you might want to change the wording in quotes on that MENU_2_NAME line at the top. This wording does not affect the operation of the Tablet; it appears on your screen as a line of the menu which comes up when you switch the Tablet on before booting. If you have more than one OS in your Tablet, you might want the menu to remind you which OS will boot when you select a particular partition. (!!On the N8x0 bootmenu.conf, there is another line beginning with MENU_2_NAME, at the bottom of the MENU_2 paragraph. DON'T CHANGE THAT ONE!!) The same applies to the MENU_y_NAME for any other partition that will be bootable.

The crucial lines that you might have to change are the ones starting with MENU_y_MODULES and MENU_y_FSTYPE, where y=4 for N8x0 and y=3 for N770. The parts in quotes must be changed for an ext2 file system. If you look at the comparable lines of the MENU_2 paragraph, you will see what should be in the quotes. Delete " jbd" and change "ext3" to "ext2" on the MODULES line. Change "ext3" to "ext2" on the FSTYPE line.

There it is: change a "3" to a "2" in two locations on a Notes page, delete " jbd", and you're done.

Running OS2006, it is not so easy to customize the bootmenu. File Manager does not let you search for Notes to open it. You will have to use a Linux text editor. If this is the first time you have ever used vi, it can be scary. RESIST THE TEMPTATION to edit the menu in WordPad on your Windows PC and copy it back to initfs_flasher via /media/mmc/ ; from experience, I can tell you it will cause a major mess.

Careful planning can get around this problem. For a start, assuming at least one of your boot partitions will be for ext2 files, don't use mmcblk0p2 for anything else (such as swap). That way, you can leave MENU_2 in Fanoush's original form and save yourself the trouble of editing it. If you want two Linux partitions plus swap on the MMC, put the swap in mmcblk0p4.

If you are going to clone OS2006 (or earlier), do that one first and clone it to mmcblk0p2. That way, you can boot it up from the default bootmenu after running initfs_flash. [It appears to be necessary to boot up the newly cloned partition before executing any further commands in X-Term. My apologies to anyone who tried to clone two OS's to MMC before ever running initfs_flash. I have edited out that suggestion on March 29, 2009.] You will have to run initfs_flash again to install a customized bootmenu, i.e. customized in Notes while running OS2007+.

Windows users must run initfs_flash again every time they run the Nokia Wizard, because the Wizard wipes out the modified initfs created in any previous run of initfs_flash. The nice features of ./flasher and 0xFFFF are for Linux and Mac users only.

[It's a little off the topic, but Windows users might take a look at http://www.internettablettalk.com/fo...49&postcount=6 . I think the reference to Fanoush might be http://www.internettablettalk.com/fo...46&postcount=2 ; nhanquy has added the "-t jffs2", without which the "mount" won't work. Those posts offer a way to back up a clean rootfs and restore it as needed, without disturbing the kernel or initfs. If you are setting up the MMC boot, and plan to have more than one OS on your Tablet, it would be a good time to do this backup. The internal flash can not be a complete backup, since it can only hold one OS.]

Last edited by scaler; 2009-03-30 at 12:45. Reason: Removed unworkable suggestion for OS2006
 

The Following 2 Users Say Thank You to scaler For This Useful Post: