maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Troubleshooting (https://talk.maemo.org/forumdisplay.php?f=6)
-   -   problem installin the OS on SD Card (https://talk.maemo.org/showthread.php?t=16737)

iliaden 2008-02-17 00:16

problem installin the OS on SD Card
 
I have a nokia n800, OS 2008.

when following one of the [many] instructions on creating a dual-boot, I encountered a problem.
I was following http://thisweekinnuclear.com/KDEonN800.html since he said that it worked on a n800 with 2008.

however, on the

# mkdir /opt/
# mount /dev/mmcblk0p2 /opt
# mkdir /floppy/
# mount -t jffs2 -o ro /dev/mtdblock4 /floppy

the system said that:
1) /opt/ and /floppy/ directories existed before.

2) after a
# rm -rf /opt/
# mkdir /opt/
# mount /dev/mmcblk0p2 /opt

I got :
mount: mounting /dev/mmcblk0p2 on /opt failed

why???
Is there anything I can do?

thank you in advance

bunanson 2008-02-17 00:54

Re: problem installin the OS on SD Card
 
If you have try the instructions more than once, chances are the directory has already been created, so re-created an existing directory will give you an err message. In this case, just move on to the next step will be fine. Same for mounting device, if there is error message, just move onto the next step would be just fine. You may want to try this, I think it is easier, http://www.internettablettalk.com/fo...mplified+clone, thread #1 and #292, for a step by step instruction. After able to make a cloned OS, you can then proeed with this, http://www.internettablettalk.com/fo...t=15491&page=7, thread #66 for the KDE install.

The advantage of Milhouse's script is 1) total handsoff, automatic, 2) one line command upon reuse. Yup, dont have to redo all the BS dls, just re-issue the command ./nupgrade.sh -optional parameters and go get a cup of coffee, and when you are back, it is done.




bun

iliaden 2008-02-17 01:01

Re: problem installin the OS on SD Card
 
if it was so easy...

i had this error the first time I tried (a few hours ago), and decided to skip.
the result was that when it started copying the OS, it all looked OK, but I was not paying attention. Then, it started saying "cannot copy ..., insufficient space on disk" when I looked at the memory usage, mmc2 was completely free, and the device memory had 1kb free.
I presume that the mount failed, but i'm not certain. Is there any way of removing the mount and re-mounting it afterwards.
any clue how?

bunanson 2008-02-17 06:54

Re: problem installin the OS on SD Card
 
Are you booting from flash or MMC?

bun

iliaden 2008-02-17 14:14

Re: problem installin the OS on SD Card
 
right now - flash.
trying to make it from mmc

bunanson 2008-02-17 18:58

Re: problem installin the OS on SD Card
 
More info here, http://www.internettablettalk.com/fo...ad.php?t=16770

what size is your SD? if 2 G and above, read here, http://www.internettablettalk.com/fo...ighlight=clone.



post if question.


bun

iliaden 2008-02-17 21:22

Re: problem installin the OS on SD Card
 
hi,

thanks a lot from your help.
I ran the Milhouse's script, paying careful attention. although it is automatic, the problem occurred on the same spot: on the
./nupgrade.sh 1
i got:
[...] unable to mount to /opt
done.

i took a guess and proceeded with the rest of the script. on the ./nupgrade.sh 3, [as suspected], after some time, the system said that it could not copy the files since there was insufficient space on disk.
after the reboot, there might have been a menu (i said might), but after a split-second the system started to boot from flash (as it said on the top of the screen).
in the control panel/memory, it said that device memory had 1kb free, ~256mb total.
by now, I am reflashing the device to factory state (OS 2008). I do this every time after a failed try.

the SD card i'm using is a 2gb pqi Hi-Speed 60 (guess that's the name)
any clue what to do now?
Btw, I do not plan to install Sardine nor the KDE. I need the flash since I lack space for simple programs (my canola2 took 40mb - album covers...)

thanks again

ilia

iliaden 2008-02-17 21:39

Re: problem installin the OS on SD Card
 
OH i have a clue!

re-reading carefully the instructions i noticed :
See various Wiki entries for details. Alternatively see post #49 in this thread which details the partitioning of various sized memory cards, ultimately creatiing a 0.5GB second partition in each case - formatting of the second partition will take place later on during the cloning process. Use the built-in Internet Tablet File Manager, a Windows PC or mkdosfs on the tablet/Linux PC to format the FAT partition).

I did not format the card using mihouse's script. this (i hope) is the problem. retrying right away. I'll post the results.

ilia

Christian K 2008-02-17 21:43

Re: problem installin the OS on SD Card
 
Iliaden:

Did you or did you not load the module for EXT2 mount?
Eg. did you run the two commands below?

# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko

Did you check so that you had the 2.6.21-omap1 directory?

When you failed to mount the drive you copied the internal flash memory to itself; that is why you ran out of space.
Another reason for the failed mounting could be that the memory card wasn't detected. You have to check for the mmcblk0p2 directory in /dev/

iliaden 2008-02-17 23:09

Re: problem installin the OS on SD Card
 
nope... the formatting allowed me to make a 500 mb partition visible in file manager (yes, i know i'm not EXACTLY following all the instructions, but i will need ~1.4Gb for the OS)


# insmod /mnt/initfs/lib/modules/2.6.21-omap1/mbcache.ko
# insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko
have been ran;
and yes, i figured that it was due to a failed mount.

#/dev/ ls showed
[...]
mmcblk0
mmcblk0p1
mmcbllk0p2

until now, the 1st partition is correctly formated into FAT16.
the second one, however, is kinda tricky:
the process did run, and the output was correct, but: after this (as read elsewhere) I simply typed:
# shutdown -r now
for a simple reboot after each step.
It did nothing, nor didn't the
# reboot

I closed my eyes on this (maybe the formatting wasn't successful?) and proceded with the
# ./nupgrade.sh 1
I quote:

Target device: Internal Flash Card, second partition (/dev/mmcblk0p2)
Using filesystem: ext2fs
Continue? (YES/no) :
i type: "y"
Installing ext2.ko module and mounting Internal Flash card, second partition...
mount: mounting /dev/mmcblk0p2 on /opt failed
Done
/home/user/bin #

the result is identical after
# cd ..
# cd ..
# cd ..
# rm -rf /opt
# mkdir /opt/

what now?

ilia

P.S. thanks a lot for your time and help

iliaden 2008-02-18 02:11

Re: problem installin the OS on SD Card
 
interesting:
I just found out that the command
# mount /dev/mmcblk0p1 /opt
works fine (gives no error message)

I'm thinking of reflashing my rom (to remove all the vain attempts once again) and formatting the card to have the 1st partition as the boot and the second as storage.
the problems I'm expecting (but praying that don't occur):
1) partition 2 will not be visible, even if formatted into FAT16 just because it's the second partition, not the first
2) the mount will once again be unsuccessful, yet it will work with the second partition (fat16)

I'm trying this because i'm out of ideas. If you have anything to suggest, i'll try it out.

bunanson 2008-02-18 03:18

Re: problem installin the OS on SD Card
 
First, installing the boot menu and cloning the Os are 2 different business. One does NOT affect the other and does not depend on the other. You can always clone the system 1st then install bootmenu or other ways around. It does not matter.

Patititon of the SD is the critical step. Formatting does not matter. You can do the fat16 formatting either before or after the Os cloning. Either way is fine.

Milhouse's script will format your system partition during the 0-4 .nupgrade.sh script. So again, formatting of the mmcblk0p2 is not necessary.


Finally, reflash your tablet is, again, not necessary. If you have to reinstall a lot of apps afterward, I would say just leave your tablet alone, should be fine. If your tablet is fresh anyway, reflash wont hurt.

Edit: Reflesh does hurt, i.e, you now will have to redo steps 1 - 6 of Milhouse's script. You may be able to avoid it if no reflesh.


Now, do you have anything to look at your disk? The one I like to use is diskUsage. It is a very convenient tool to look at your partition. Go www.gronmayer.com/it and search for it, install it and maybe that will help you to look at your SD disk. If not you can try either Control panel>memory or GPE file manager. They probably wont do squat if you have not format either partition.

For now, if you alread done all those dl wget, dl .nupgrade etc, you should not have to redo any of these. ALL you have to do is to partition your SD card, and just run the script, you are home.

Tell me I am full of BS.................

I am prepared.


bun

iliaden 2008-02-18 03:58

Re: problem installin the OS on SD Card
 
I don't think you understood the problem.

the ONLY step that I have not been able to complete was
# mount /dev/mmcblk0p2 /opt

this step is present in the script (./nupgrade 1 if i'm not mistaking)
I was not able to complete this step manually either.

right now, I am trying it again with a 1gb SD card.

edit: the boot menu installation was successful and flawles

edit: the reflashing of the device was a must since it copied everything on the internal memory, so i have every file in double, and 1kb free space.

edit: thanks for the hints on the formatting. Can you explain why I need to leave a second partition and not just have one, full-card boot partition?

ilia

P.S. just noticed (on 1GB card, but i guess its the same on 2GB previously used)

# sfdisk /dev/mmcblk0 -uM
0,256,06
,,,
[...]
Do you want to write this to disk? [ynq] y
Successfully wrote the new partition table

Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before usink mkfs


this means something significant?

p.p.s. i was rebooting after this process before

bunanson 2008-02-18 04:33

Re: problem installin the OS on SD Card
 
Quote:

Originally Posted by iliaden (Post 143902)
Re-reading the partition table ...
BLKRRPART: Device or resource busy
The command to re-read the partition table failed
Reboot your system now, before usink mkfs


this means something significant?

p.p.s. i was rebooting after this process before

No. They all say that, just reboot and proceed with the script, you do not have to do anything else, ........um, maybe you have to, since your reflashed your system. Well, then you will have to go thru the same steps, but now you are better, right?

bun

iliaden 2008-02-18 04:45

Re: problem installin the OS on SD Card
 
IT WORKS!!!!!!!!!

on a 1GB card, it worked perfectly, i'll boot it in 3 min!

edit: it boots!!!!
now, i just have to find out whats wrong with the 2GB...

ideas:
1) no low level partitionning (whatever it is...)
2) corrupted card (or some parts)
3) i'll retry on another 2gb card tomorrow to see

thanks for your assistance.

P.S. before i've destroyed my work due to ignorance - will an old backup work on a mmc?

bunanson 2008-02-18 05:01

Re: problem installin the OS on SD Card
 
Quote:

Originally Posted by iliaden (Post 143914)
IT WORKS!!!!!!!!!

on a 1GB card, it worked perfectly, i'll boot it in 3 min!

edit: it boots!!!!
now, i just have to find out whats wrong with the 2GB...

ideas:
1) no low level partitionning (whatever it is...)
2) corrupted card (or some parts)
3) i'll retry on another 2gb card tomorrow to see

thanks for your assistance.


Congratulation! now if you just leave your tablet alone, no reflesh, you can partiton whatever SD cards you have and just type
'./nupgrade.sh wipe' they will do all steps 0-4 automatically and give a cloned system, be it 1G or 2G, or sometimes 16G if the card is right


Good job.


bun

bun

iliaden 2008-02-18 05:37

Re: problem installin the OS on SD Card
 
the main part is a success.

now, the finalizing touches - I have restored all the previous data from a backup; it's downloading the applications (I expect them to be done by morning... GMT-5)

is there any ways of setting the default boot device to mmc2 ext2?

I know reboots should never occur, but if they do and I forget that i'm booting from an SD i'll panick :(

I still believe that the problem is with the card itself...

ilia

iliaden 2008-02-18 05:59

Re: problem installin the OS on SD Card
 
HELP!!! (sorry, for disturbing again)

both boots (flash and mmc) became INCREDIBLY slow. the system boots fast, but afterwards it is unusable since it looks slower than a 386 with windows on it (i know what a 486 with windows 3.11 looks like, and what my nokia shows me is only worse)

any clue
1) why?
2) what to do?

iliaden 2008-02-18 06:07

Re: problem installin the OS on SD Card
 
it's getting worse and worse

is there any way of either:
1) removing the boot menu
2) while having the boot menu installed, connect to a pc and restore it to the factory settings (which, by experience, worked correctly?)

iliaden 2008-02-18 16:34

Re: problem installin the OS on SD Card
 
update:
I realized why the speed was so slow.
On my last backup, i had ~100 programs installed, as well as ~30 repositories. therefore the program restore feature ate all the ressources I had and froze. I reflashed and am restoring the applications manually. Once it's done, i'll recreate the second boot and it'll have all the apps already installed, thus (as i hope) working flawlessly.

Is my logic OK?

iliaden 2008-02-19 03:19

Re: problem installin the OS on SD Card
 
Final update (and summary of what I've learned):

1) original 2GB pqi Hi-Speed 60 was not (and still isn't) working properly. The reason is yet to be determined
2) user must pay careful attention to the results of the commands he enters
3) after creating a second bootable partition, DO NOT format the first partition by going into File manager and selecting "format". This formats the entire card, not only the desired partition. the command mkdosfs is the appropriate way.
4) try to keep the amount of installed programs at a minimum so that the restore process does not murder your device (eat all of it's resources for an indeterminate amount of time)

5) [my status]: dual-boot, 2GB, ~1.2 GB OS partition, all the installed programs & functions working flawlessly (except the unfixed bugs - but that's another story)


All times are GMT. The time now is 15:56.

vBulletin® Version 3.8.8