I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods

Click Here!
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / I-Opener Areas / I-Opener Technical Stuff
running V2 image in QEMU emulator
running V2 image in QEMU emulator

New Messagerunning V2 image in QEMU emulator (modified 0 times) slylock
Profile
I have an iOpener that was my mom's, and this iOpener was in use as a normal email machine with an Earthlink account until very recently, when it went south. She's moved on to a real PC, but I have the project of trying to recover her email address book from the iOpener, if it's in there. I know the iOpener uses imap for email, and I don't know enough about imap to be certain, but I don't think imap provides address book services, therefore I think her address book must be someone on the SANDISK in the iOpener (please correct me if I'm wrong).

I've become handy with the hacking process, I converted another iOpener to a picture frame. This iOpener has the symptom that it tries to phone home to do some sort of update, even though it was working perfectly with Earthlink until it got weird. My theory is that something on the SANDISK crashed. My plan was to use the techniques outlined on Joe LaGreca's web site to boot virgin QNX using a harddrive, then mount the SANDISK and try to find the address book. Joe's website is here: http://www.joe.flintaero.com/iopener/

I downloaded the image and burned it onto the harddrive using dolly. But the iOpener won't boot from the hard drive with this image. Maybe something peculiar with the hard drive. Joe says his system doesn't work with all hard drives. Or maybe it's because I used DOS and dolly to burn the image onto the hard drive, instead of linux.

My next idea is to do the opposite: boot the iOpener into DOS and use dolly to copy the SANDISK image to a file. But what can I do with the file? This is when the idea hit me: I've used an intel emulator called QEMU to run embedded linux (damnsmalllinux) in emulation. Could QEMU be used to run the iOpener QNX image in emulation? I don't see what not. I downloaded the V2 image from Joe's site and tried it. I got this:
Booting from Hard Disk...
Waiting for access to path /dev/hd0t77
mount -p: open() on /dev/hd0 failed: No such file or directory
/bin/Fsys.eide terminated (SIGSEGV) ...

I'm no unix guru, can anyone shed light on these messages? I'm not even sure what hd0t77 might refer to, unless it is the special partition where the iOpener put its anti-hack hash file.

Anyone ever tried this? Not sure why it took me so long to think of it.

06-20-2005 17:43:40

New MessageRE:running V2 image in QEMU emulator (modified 0 times) Wild_Pencil
Profile | Email
Under QNX, /dev/hd0t77 is a partition on the primary hard-drive.

I think the easiest way to do it is to copy the sandisk to a file, and use Linux to mount the copied file. The trick is that you need to supply an offset so that Linux knows how far into the file to find the partition you're trying to mount. The offsets are in the technical reference archives.. I think they're under "V3" hacking methods. Your linux distribution needs to have QNX filesystem support.

Joe's image should've worked. Maybe you need to change a BIOS setting to use the hard-drive in LBA mode?

I'm not optimistic about running the IOpener's QNX under an emulator, but hey, it's worth a shot. Let us know if it works out.

06-21-2005 14:03:18

New MessageRE:running V2 image in QEMU emulator (modified 0 times) Linuxguru
Profile | Email
The idea is clever, but there are several things you have to do to make it work in qemu.

1) Since the Sandisk is the primary hard disk in the IOpener, the extracted image file also has to be the primary hard disk to qemu. You need to invoke qemu with the '-hda <filename>' argument.

2) The geometry of the Sandisk as set in the IOpener BIOS must be identical to the geometry which qemu uses to access the hard disk image file. This is the tricky part, and probably this is why the QNX image is unable to find the appropriate partition.

The steps to kludge this are as follows:

1) Use a hard disk with a geometry set similar to the Sandisk in the IOpener BIOS, i.e., the same number of sectors and heads, but different number of cylinders. Install it on a Linux host as primary slave.

2) Install a minimal bootable Linux distro on this hard disk (on the Linux host) with this geometry, with some tools like fdisk, dd, mknod, etc.

3) Create a primary partition using fdisk (say /dev/hdb2 in Linux) with the exact number of cylinders as the Sandisk.

4) Now transfer this hard disk to the IOpener and connect it as the primary slave with the same geometry as the host.

5) Boot the hard disk (as primary slave) on the IOpener into the minimal Linux and copy out the raw data from the Sandisk to /dev/hdb2 using dd, e.g. dd if=/dev/hda of=/dev/hdb2.

6) Mount this hard disk with the same geometry in the host Linux (with qemu) system, and use this primary partition as qemu's primary hard disk, e.g. qemu -hda /dev/hdb2.

06-24-2005 21:52:10

New MessageRE:running V2 image in QEMU emulator (modified 0 times) slylock
Profile
Thanks for the responses! Since my original post, I've managed to cure some of my ignorance, and also accomplish my original goal, which was to extract my mom's email address book from the Sandisk. I'll give you the rundown on how I did that, but I guess that's really off-topic from the QEMU question, so first about QEMU...

QEMU docs say it automatically figures out geometry of disk images, but it has an option to specify geometry: -hdachs c,h,s[,t] so I tried it like this: -hdachs 490,2,32 and that gave the same result, the failure to access /dev/hd0t77. Same thing when I give auto or none for the optional part at the end, the translation mode. However, when I saw Wild-pencil's comment about lba, I also tried lba. It worked less well, I think, the emulator started chewing cpu cycles, but did not get past Booting from Hard Disk. Does the iOpener's Sandisk use lba mode? I always assumed it was normal mode.

By the way, I figured out what the "t77" in hd0t77 means. I believe it means file system type 77, or QNX-4 format.

My next step was to explore running QNX in QEMU, and I ended up downloading the CD image for QNX 6.1 and installing it in QEMU, and that worked great. Next I tried giving the Sandisk image file to QEMU as the second disk image, and booting into QNX, and that also worked great, QNX automatically mounted the QNX-formatted partitions from the Sandisk image into three directories in /fs.

The rest of my story is about QNX, so maybe it's not interesting to folks on linux-haker, but here it is anyway. This installer for QNX 6.1 really made things easy for me. After having good luck with it in QEMU, I next installed it onto a laptop hard drive and tried to boot the iOpener with it. This did not work, QNX hung early in the boot process. I had good luck with Windows 98 on my previous iOpener, and the QNX installer has an interesting option where you can install it to a file under Windows, and that file holds the entire QNX space, and when Windows is booting, QNX will swap itself in and take over. A dual boot system of their own invention. So I installed Windows 98 onto the hard drive, copied the QNX installer to the hard drive, booted the iOpener into Windows 98 (I already knew how to do this). Then I ran the QNX installer, installed QNX to file, and rebooted. Magically, the iOpener booted up into QNX from the hard drive.

As it did in the emulator, QNX automatically mounted the partitions from the Sandisk into /fs, so I was able to browse them, and in about 5 minutes I found the email address book. The partition was mounted in /fs/hd1-qnx4, and the file was .../dsm/<ten digit number>_addressbook.acap. I need to ask about dsm and the acap file format, which I'll do in a separate thread. Remember the hard drive is formatted DOS, and the QNX space is inside a file on this DOS drive. QNX also had mounted the "host" DOS file system in /fs, so I was able to cp this file out there, switch the hard drive to another computer and retrieve the file. Ta da!

So that was my goal accomplished, but I still want to play out the emulation question as far as I can. So the next thing I did was to boot the iOpener in Windows again and use Dolly to copy the Sandisk image to a file. So now I have my mom's Sandisk image to compare with the pristine v2 image. While I was at it, I also used cp -R to copy the contents of the QNX partitions into the DOS space, as a form of backup, but in the process, cp failed on a currupt file: np-misc.fs. Hmmm, could this corrupt file be the problem the brought down the iOpener? Can I replace this file with the same file from the v2 image and get the iOpener working again as an email machine? We shall see. First I have to figure out how to use QEMU to get the good np-misc.fs out of the v2 image. To do that, I need networking to work between the QEMU machine and the host machine, and I haven't gotten that going yet. That's next.

I tried one more time to boot the iOpener disk image using QEMU, this time using the file I'd just made with Dolly from my mom's iOpener. Interestingly, it boots very much like it does on the real machine, until it once again complains it cannot access /dev/hd0t77. I'll follow this post with a screenshot.

Regarding Linuxguru's post, so far I've not using Linux to do anything, I've done my disk image copying with Windows and Dolly. Would I get better results if I used Linux and dd?

I'm not too surprised that QEMU will not boot the iOpener Sandisk image. Early on in my experiments, I had zapped the v2 Sandisk image to the hard drive using Dolly, and after I did that, my PC would no longer boot with the hard drive attached. I couldn't even boot from floppy or CD with this hard drive simply attached. Something in that disk image is incompatible with the (old) BIOS of my PC. So I'm not surprised that the BIOS of the QEMU emulator has trouble with it as well. I wonder what it is. I'm out of ideas for getting it booted in QEMU, but I'll add some more to the thread when I figure out QEMU networking and get the np-misc.fs file out of the image.

06-28-2005 13:22:45

New MessageRE:running V2 image in QEMU emulator (modified 0 times) slylock
Profile
promised screenshot of iOpener image not booting in QEMU: http://homepage.mac.com/slylock/.Pictures/qemu/qemu.jpg
06-28-2005 16:27:58

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3