Active Topics

 


Reply
Thread Tools
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#1
OK, I deserved running into trouble trying this strange approach to multi-boot without knowing much of the basics. Still, having gotten that far, could anyone who knows what goes on behind the scenes pls. explain what I missed?

What I did was:
  • Set up the boot menu on the 770 (works)
  • Take a 2GB card, put it in my desktop PCs card reader to partition and format it.
  • Use first ext2-partition for Debian (this works! I can boot into it)
  • Use 2nd ext2-partition for OS2007HE (never boots, returns to boot menu)
  • Use 3rd partition as FAT-data-partition (doesnt show up in file manager, doesnt mount automatically)

The fact that debian boots OK should mean that at least I got the basics of "How to dual boot" right, shouldn't it?

Now for the problems:

FAT-Partition (#3):
On a 2GB card, what could be the reason for a FAT-Partition not showing up in the file manager? I tried making it bootable, I tried type 6 (FAT16) or type C (WIN95 OSR2 FAT32), it simply says there's no memory card.
dmesg comes up with
Code:
[ 1758.189788] mmcblk0: mmc0:0001 MMCM   1983488KiB 
[ 1758.190185]  mmcblk0: p1 p2 p3
[ 1758.763854] FAT: bogus number of reserved sectors
[ 1758.763946] VFS: Can't find a valid FAT filesystem on dev mmcblk0p1.
which is funny because it should in fact be mmcblk0p3 (I also changed fstab to reflect that).
Does a data partition have to be #1 for the file manager to accept it? I think I can remember partition schemes where this was not the case... ?

OS2007HE (#2):
I tried to be extra-smart here. All the documents I found describe how to copy the running OS from internal flash to MMC. I run OS2006 and I didnt want to flash the HE, copy it, then re-flash OS2006 again.
What I did was: I extracted rootfs.jffs2 out of the 2007HE's fiasco image, mounted it on my PC and copied the files over to MMC. This seems to be OK; when I mount the partition and list the files, what I get seems to be a ITOS-style layout, including the correct owners, rights and stuff. Still, when I select this one from the boot menu, it won't boot.

Facts:
My original partinioning scheme was (device names taken from my desktop PC):
Code:
/dev/sdc1               1        1025     1578472+  83  Linux 
/dev/sdc2            1026        1188      251020   83  Linux 
/dev/sdc3  *         1189        1287      152460    6  FAT16
As I said, I changed the values in /dev/sdc3 quite a bit, changed the bootable flag, changed the FAT variant - had no effect at all.

I then went to do
Code:
mkdosfs /dev/sdc3
mke2fs /dev/sdc1
mke2fs /dev/sdc2
later changing mkdosfs to mkdosfs -F 32 because I read it somewhere - nada.

The relevant parts of my bootmenu.conf are
Code:
MENU_2_NAME="Debian: MMC card, partition 1"
MENU_2_ID="mmc1"
MENU_2_DEVICE="mmcblk0p1"
MENU_2_MODULES="ext2" 
MENU_2_FSTYPE="ext2"
MENU_2_FSOPTIONS="noatime"

MENU_3_NAME="OS2007HE: MMC card, partition 2"
MENU_3_ID="mmc2"
MENU_3_DEVICE="mmcblk0p2"
MENU_3_MODULES="ext2"
MENU_3_FSTYPE="ext2"
MENU_3_FSOPTIONS="noatime"
so 2 and 3 are really pretty much the same, still 3 doesn't work at all.

From reading the forums (and I guess I must have read each and every related thread here) I get the impression the few who know are sick and tired of multi.boot related questions. Still... maybe... Where alse should I ask?
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#2
Well, I can tell you right now why it doesn't show your FAT; it needs to be the first partition. (As you can see, it looks at mmcblk0p1.)

For the other, I'm not sure; your ideas seem sound, and I'd have expected it to work. Read http://www.nmacleod.com/nokia/bin/nupgrade.sh and see how it differs from what you did; I see it creates a CLONE-COPY file; could that be needed? I haven't looked in any great depth.

I used a slightly hacked-up version of that to set up my quad-boot, and everything went well.
 

The Following User Says Thank You to Benson For This Useful Post:
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#3
Originally Posted by Benson View Post
Well, I can tell you right now why it doesn't show your FAT; it needs to be the first partition. (As you can see, it looks at mmcblk0p1.)
I would have hoped for a different explanation; it seems such an unnecessary restriction. Plus, I don't want to re-partition and do all the copying again
But reading what you say, I guess I'll have no other choice. Maybe though I'll wait until someone can point me to why my OS2007HE-partition fails. - I wouldn't want it to be "because it must not be partition 2" or something.

Meanwhile, thanks for helping here; I'm especially happy about the "your ideas seem sound, and I'd have expected it to work."-part
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#4
Well, you can always hack the scripts to make it work with some other partition. But that's a pain, and you'd have to watch that some update doesn't undo it...

Still, I think /usr/sbin/osso-mmc-mount or some such is a shell script that deals with that, so that's where I'd start looking, if you do want to take that route.
 
benny1967's Avatar
Posts: 3,790 | Thanked: 5,718 times | Joined on Mar 2006 @ Vienna, Austria
#5
One more thing:

All the files within the fiasco image - is it really enough to extract and use rootfs.jffs2 only? First I thought so, but now it seems somewhat naive. Re-checking the contents, I found rootfs.jffs2 lacks not only the /mnt/initfs/-directory present on the 770, but also a whole bunch of nodes within /dev/ (and probably much more, I just have to figure out...). No wonder this doesn't boot.

I guess what I need is a way to put together all the contents of the fiasco image in the correct way on my desktop PC - this means learning a lot about how the maemo boot process works, I'm afraid

Last edited by benny1967; 2008-05-23 at 15:12.
 
Posts: 119 | Thanked: 412 times | Joined on Aug 2008
#6
Did you get this to work?

I'm doing this on my host:
Code:
FLASHER3=/everything/Downloads/Hardware/nokia_n800/flasher-3.0 
F_IMAGE=/everything/Downloads/Hardware/nokia_n800/RX-34_2008SE_2.2007.51-3_PR_COMBINED_MR0_ARM.bin
IMAGE_DIR=chinook_fiasco
PART=/dev/mmcblk0p6

mkdir -p $IMAGE_DIR
cd $IMAGE_DIR

# unpack fiasco
$FLASHER3 -F $F_IMAGE -u

# https://wiki.maemo.org/Modifying_the_root_image
mknod /tmp/mtdblock0 b 31 0
modprobe loop
losetup /dev/loop0 rootfs.jffs2 
modprobe block2mtd
modprobe mtdblock
echo "/dev/loop0" > /sys/module/block2mtd/parameters/block2mtd
modprobe jffs2
mkdir /tmp/jffs2
mount -t jffs2 /tmp/mtdblock0 /tmp/jffs2

ssh root@nut insmod /mnt/initfs/lib/modules/2.6.21-omap1/ext2.ko \; mkdir /tst \; mount $PART /tst
rsync -av /tmp/jffs2/ root@nut:/tst/
ssh root@nut umount /tst \; rmdir /tst

umount /tmp/jffs2
rmmod jffs2
rmmod mtdblock
rmmod block2mtd
losetup -d /dev/loop0
rm -f /tmp/mtdblock0 /tmp/jffs2

more notes here:
https://wiki.maemo.org/Booting_from_...card#MultiBoot
 
Reply


 
Forum Jump


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