Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > More E-Book Readers > iRex > iRex Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 04-08-2009, 04:26 AM   #1
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
How to create a bootable CF?

In the "Reflash from CF Howto", it says that putting a line "boot" in config.txt and iLiad will boot from CF and chroot to CF.

I am trying to replace the whole X window and GTK+ to newer version. So, booting from CF is the safest way to do the experiement. Before replacing any file in root partition, I want to make sure I can boot from CF. Still not successful. Here is my steps:

1. make a ext2 partition on CF and mount it on iLiad
2. replicate root partition to cf. "cp -a" /bin /etc /sbin (and other dir) to cf under iLiad console
3. cp config.txt to cf
4. put zImage.gz, zImage.gz.md5, initrd.gz, initrd.gz.md5 in CF/images
5. reboot just as doing reflash. I got stuck in the default screen with progress bar turned from black to white cell by cell and showing no progress any further. In logfile.txt, there is only a line: "Boot from CF:".

Any comments or advice?

Last edited by ericshliao; 04-08-2009 at 05:12 AM.
ericshliao is offline   Reply With Quote
Old 04-08-2009, 04:55 AM   #2
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Currently, I think it might be that incomplete replication of root partition caused cf failed to boot. Here is the list of directories that I copied to cf (using cp -a):
/bin, /boot, /dev, /etc, /home, /lib, /mnt/settings, /old-root, /proc, /sbin, /sys, /usr, /var
ericshliao is offline   Reply With Quote
Old 04-08-2009, 10:33 AM   #3
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
It will not help here, but /sys and /proc are not 'real' directories. They are virtual file systems maintained by the kernel. So it's not meaningfull to copy them...
hansel is offline   Reply With Quote
Old 04-08-2009, 11:06 AM   #4
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I just removed /proc and /sys on CF and boot from CF. There was something difference. In the previous case, the screen just stopped after progress bar turned to all white. In the later case (after removed the two dirs), after progress bar turned to all white, iLiad seems to boot again automatically, but this time it boot from root partition on iLiad.

Does it mean that bootloader can go further in the previous case? In this case, bootloader found root partition on cf was ok, so bootloader transferred execution right to root partition on cf, and system just failed because incomplete root partition. In the later case, bootloader found that there was no /proc and /sys on cf, so bootloader decided to reboot without cf.

Last edited by ericshliao; 04-08-2009 at 11:56 AM.
ericshliao is offline   Reply With Quote
Old 04-08-2009, 12:38 PM   #5
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Just found some useful info. I will try it later.
http://forum.irexnet.com/viewtopic.p...r=asc&start=15

Last edited by ericshliao; 04-08-2009 at 12:44 PM.
ericshliao is offline   Reply With Quote
Old 04-08-2009, 11:37 PM   #6
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
As instructed by poiuy in the above url, I made a bootable cf from app.image released by iRex. But it won't work if I use "dd" to copy root partition to cf (dd if=/dev/tffsa1 of=/dev/hda1). Besides, the size of cf will be converted to 76mb after dd. Anyway, I have a bootable cf now.

Added:
After creating a bootable cf from app.image, I copied some dirs from root partition to cf. Now I have a bootable cf with updated firmware and my own settings. It's a perfect testbed for experiement.

Added 2:
With this cf, I can manipulate iLiad root partition with my desktop. It will be much convenient.

Last edited by ericshliao; 04-09-2009 at 01:47 AM.
ericshliao is offline   Reply With Quote
Old 04-09-2009, 01:49 AM   #7
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Quote:
Originally Posted by ericshliao View Post
Now I have a bootable cf with updated firmware and my own settings. It's a perfect testbed for experiement.
Nice!
  • Does shell access work normally?
  • Is the kernel on the CF?
  • How long does it take to boot?
hansel is offline   Reply With Quote
Old 04-09-2009, 02:10 AM   #8
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
[*]Does shell access work normally?[/LIST]
Shell access is retained. I can run dropbear and confirm that "config.txt" resides on /. If "config.txt" does not exist in /, it means that iLiad does not boot from CF. Your newlister still works on the CF. Everything is just the same with ordinary iLiad.

Quote:
Originally Posted by hansel View Post
[*]Is the kernel on the CF?
I don't know exactly. But I guess not. Because I only dd root partition.

Quote:
Originally Posted by hansel View Post
[*]How long does it take to boot?
I didn't notice it. Roughly speaking, no significant delay noticed.
ericshliao is offline   Reply With Quote
Old 04-09-2009, 04:04 AM   #9
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
After dd app.image to CF, there is something that I can't explain. Please see the attached two images. I used a 128MB CF.
Attached Thumbnails
Click image for larger version

Name:	Screenshot.png
Views:	405
Size:	157.1 KB
ID:	27323   Click image for larger version

Name:	Screenshot2.png
Views:	374
Size:	196.3 KB
ID:	27324  
ericshliao is offline   Reply With Quote
Old 04-09-2009, 04:21 AM   #10
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I guess the first image shows partition info, and the second image shows filesystem info.
ericshliao is offline   Reply With Quote
Old 04-09-2009, 05:51 AM   #11
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I just found a strange thing. My shell access disappeared. I found it disappeared because I couldn't execute dropbear from shell script. I have to download and install again. But newlister is still running. It's a proof that shell access disappeared after installed, or there won't be newlister installed on my iLiad.

Last edited by ericshliao; 04-09-2009 at 05:56 AM.
ericshliao is offline   Reply With Quote
Old 04-09-2009, 07:25 AM   #12
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Hooray!
I have a 128MB root partition on cf now.
After created a bootable cf, use resize2fs and it will expand the filesystem from 76mb to 128mb (the size of my cf). Now I can put other shared objects in cf without removing anything.
Attached Thumbnails
Click image for larger version

Name:	sc.JPG
Views:	241
Size:	188.5 KB
ID:	27332  
ericshliao is offline   Reply With Quote
Old 04-10-2009, 01:11 AM   #13
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
I just found one thing:
Even when boot from CF, the system still use /mnt/settings on iLiad, not /mnt/settings on cf. That's to say, every modification made to /mnt/settings on cf won't take effect.

Added:
This problem should be fixed if I edit "/etc/fstab" and remark the line with "/mnt/settings". Then system boot from cf won't mount /dev/tffsa7 on /mnt/settings, and /mnt/settings on cf will be used.

Last edited by ericshliao; 04-10-2009 at 02:12 AM.
ericshliao is offline   Reply With Quote
Old 04-13-2009, 05:14 AM   #14
hansel
JSR FFD2
hansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheesehansel can extract oil from cheese
 
hansel's Avatar
 
Posts: 305
Karma: 1045
Join Date: Aug 2008
Location: Rotterdam, Netherlands, Europe, Sol 3
Device: iliad
Is it possible to have a bootable cf with 2 partitions? Say a 500MB ext2/3 for the os, and the rest vfat for books?
hansel is offline   Reply With Quote
Old 04-13-2009, 05:37 AM   #15
ericshliao
Guru
ericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enoughericshliao will become famous soon enough
 
Posts: 973
Karma: 687
Join Date: Nov 2007
Device: Dell X51v; iLiad v2
Quote:
Originally Posted by hansel View Post
Is it possible to have a bootable cf with 2 partitions? Say a 500MB ext2/3 for the os, and the rest vfat for books?
I had a similiar thought, too. I don't know the answer right now because I am using a 128mb cf for boot, its small size makes me never need to worry about making a second partition.
I guess the answer should depend on the bootloader. I will give it a try later, after I fixed the FBReader problem with new libs.
ericshliao is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to create new hyperlinks? lmronan Sigil 1 05-08-2010 05:53 PM
Do you know how to create a poll? Ben Thornton Lounge 8 02-22-2010 06:46 PM
Looking for a way to create ebooks Tibor Workshop 7 01-26-2009 05:23 PM
Create a collection ProDigit Sony Reader 27 12-28-2008 11:15 AM


All times are GMT -4. The time now is 11:31 PM.


MobileRead.com is a privately owned, operated and funded community.