Active Topics

 


Reply
Thread Tools
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#21
Originally Posted by tomstratton View Post
How I did it...
Nice guide, few comments below

Originally Posted by tomstratton View Post
Installing Boot Menu

go to http://fanoush.wz.cz/maemo with the browser and download:
initfs_flasher.tgz
....
If all is well you will get the "bootmenu" on restart - choose to boot from Flash
maybe console-tools does it for you but when running it directly as described you need to run cal-tool to see the menu
Code:
$ sudo gainroot
# chroot /mnt/initfs cal-tool --set-root-device ask
otherwise the default is to wait briefly for menu key press and then boot directly with no menu. best is probably to set the root device to ask:yourpreferredmenuitemid so it shows the menu but boots your preferred item automatically after countdown

Originally Posted by tomstratton View Post
NOTE - I keep getting errors from the OS saying that the Memory Card is corrupted or unformatted - just ignore them!
it is OK to ignore dialogs that pop up, the OS tries to automount your card when it is not formatted yet. However you should not ignore i/o errors when cloning, some people had issues with cards giving errors when writing data. Full format with Panasonic SD formatter sometimes helped. After cloning or when you suspect data corruption it is good idea to run dmesg command and check kernel log for mmc device i/o error messages. When something is wrong there are tons of them for every data block system failed to read or write.
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 

The Following 2 Users Say Thank You to fanoush For This Useful Post:
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#22
You have to create an entry in /etc/fstab for swap if you don't use a .swap file on the internal card. (Note that if you do, you can resize it much larger just by using dd to create a big file and mkswap .swap).

For /etc/fstab, I have the line:

/dev/mmcblk0p3 none swap swap priority=-1 0 0

and it "just works".

And a thankyou to Fanoush for adding the date/changelog entry to the webpage.
 
Posts: 22 | Thanked: 7 times | Joined on Jan 2009
#23
Originally Posted by fanoush View Post
Nice guide, few comments below

maybe console-tools does it for you but when running it directly as described you need to run cal-tool to see the menu
Code:
$ sudo gainroot
# chroot /mnt/initfs cal-tool --set-root-device ask
That was NOT my experience - I did everything exactly as outlined in my post and the bootmenu seems to be doing what I want it to (the defalut is flash but I will change that later)


Originally Posted by fanoush View Post
otherwise the default is to wait briefly for menu key press and then boot directly with no menu. best is probably to set the root device to ask:yourpreferredmenuitemid so it shows the menu but boots your preferred item automatically after countdown
I'll do that later today - thanks for the suggestion.

Originally Posted by fanoush View Post
it is OK to ignore dialogs that pop up, the OS tries to automount your card when it is not formatted yet. However you should not ignore i/o errors when cloning, some people had issues with cards giving errors when writing data. Full format with Panasonic SD formatter sometimes helped. After cloning or when you suspect data corruption it is good idea to run dmesg command and check kernel log for mmc device i/o error messages. When something is wrong there are tons of them for every data block system failed to read or write.
Good point! Now if I could just get the SWAP working ... If anyone knows a good "how to" for doing it manually please let me know!
 
Posts: 22 | Thanked: 7 times | Joined on Jan 2009
#24
Originally Posted by tz1 View Post
You have to create an entry in /etc/fstab for swap if you don't use a .swap file on the internal card. (Note that if you do, you can resize it much larger just by using dd to create a big file and mkswap .swap).

For /etc/fstab, I have the line:

/dev/mmcblk0p3 none swap swap priority=-1 0 0

and it "just works".

And a thankyou to Fanoush for adding the date/changelog entry to the webpage.
I'm not sure that I wrap my head around this at all - I have been usine console-tools to do the swap partitioning and handling the code. If you could be a little more step-by-step I'd really appreciate it...

What I have is a small (about 256 MB) Partition with Linux Swap / Solaris as the partition type (I'm not sure if it is supposed to be formatted" and if it is, what format to use, and then, what is the appropriate mkfs command to use.

AFter all that I have NO IDEA how to go about setting up a ".swap" file or how to decipher the line
"/dev/mmcblk0p3 none swap swap priority=-1 0 0"

I sure wish that there had been space in this device for the man files! Alternately, wish that the man files were online at maemo.org

Thanks

Tom
 
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#25
Swap partitions

First figure out which device/partition is swap (cat /proc/partitions is helpful).

Run the following command (as root, filling in X an Y with the correct values):

mkswap /dev/mmcblkXpY

use an editor to add this line to the /etc/fstab file on root partitions:

/dev/mmcblkXpY none swap swap priority=-1 0 0

then enter the following command

swapon -a

/proc/swaps should now show the partition and /proc/meminfo and such should reflect the swap space. To get it to happen automatically each bootup, you need to add something to /etc/init.d with proper symlink /etc/rc2.d
(e.g. /etc/init.d/doswap with just "swapon -a", and /etc/rc2.d/S99doswap symlinked to doswap).
 

The Following User Says Thank You to tz1 For This Useful Post:
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#26
There are several google-able sets of manpages. One of my favorites is at die.net:

http://linux.die.net/man/8/mkswap

From there you can find links to swapon and from there to fstab, all worth a read

Last edited by tz1; 2009-01-13 at 15:04. Reason: added other manpages of interest
 

The Following User Says Thank You to tz1 For This Useful Post:
tz1's Avatar
Posts: 716 | Thanked: 236 times | Joined on Dec 2007
#27
one note - mmc0 and mmc1 MAY be backwards in the /dev enumeration, so /proc/partitions shows my swap partition as mmcblk1p3, but I must use mmcblk0p3 to access it.

ls -l /dev/mmcblk* shows the minor devices are out of sequence, mmcblk1 has 0,1 (the external card), and mmcblk0 has 8,9,10,11 which probably explains the problem.

You can try removing the external card if you aren't booting from it and check the /dev directory to see what the correct numbers are. (I may have something else turned on which is causing this).
 
Posts: 22 | Thanked: 7 times | Joined on Jan 2009
#28
I'm not sure why it worked but this is how I got the swap working, even through a reboot.

disable the virtual memory
strat X-terminal
$ sudo gainroot
# fdisk /dev/mmcblk1
: d (deletes a partition)
: 3
: w (writes the deletion to disk)
# fdisk /dev/mmcblk1
: n (makes a new partition)
: p (primary partition)
: enter (select the default start block)
: enter (select the default end block)
: t (set the partition type)
: 82 (linux swap)
: w
# mkswap /dev/mmcblk1p3
# swapon /dev/mmcblk1p3
# exit
$ pb
select SWAP
select mmcblk1p2
select mmcblk1p3
continue through prompts
Cancel out of pb when the swap successful message has come

reboot the tablet!

Free now shows that I am using swap!

Thanks to Fanoush and PB for the vital clues that got this to work. I'm sure that there are lots of extra steps in my process but I can definitely say that this has worked and it should work for you too if you want to try it.

However! I don't really have any technical understanding of why it works. I understand what has happened and I took a lot of shortcuts by making console-tools do some of the work. If you need help I probably am not going to be a great resource but I'm glad that I was able to get this done and I hope it helps someone.

Tom
 
Posts: 23 | Thanked: 2 times | Joined on Oct 2008
#29
I also have an N810 WiMAX and was trying to get bootloader working. @tomstratton, I have a few questions. You choose not to remove the extra utilities in the initfs, and also installed dropbear and utelnetd. What was the size of your initfs partition? Mine is 4M, and the generated initfs file is close to 6M and won't fit in. I had to unselect telnet and ssh while creating the initfs file.

I also got bootmenu to work the first time. Thanks fanoush for updating it!
 
Posts: 22 | Thanked: 7 times | Joined on Jan 2009
#30
Originally Posted by sarathmenon View Post
I also have an N810 WiMAX and was trying to get bootloader working. @tomstratton, I have a few questions. You choose not to remove the extra utilities in the initfs, and also installed dropbear and utelnetd. What was the size of your initfs partition? Mine is 4M, and the generated initfs file is close to 6M and won't fit in. I had to unselect telnet and ssh while creating the initfs file.

I also got bootmenu to work the first time. Thanks fanoush for updating it!
I'm not even sure what you are asking

I started with a brand new unit, freshly flashed and with NOTHING installed so the partition would have been the original memory... I didn't need to install dropbear or utelnetd, I just blindly push buttons doing things that "seem" to make sense at the time.

As for NOT removing the extras, the bootmenu spawns an error if you remove them, so I didn't

Cheers
 
Reply


 
Forum Jump


All times are GMT. The time now is 19:45.