Gentoo Archives: gentoo-embedded

From: Ross Carlson <rcarlson@××××××.com>
To: gentoo-embedded@l.g.o
Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
Date: Fri, 19 Aug 2005 13:55:52
Message-Id: 200508191355.j7JDt1T2019993@robin.gentoo.org
In Reply to: RE: [gentoo-embedded] GNAP Media Formatting Error? by Ross Carlson
1 Okay! We figured this thing out...
2
3 Our compact flash disk is too slow essentially. If we formatted the media
4 manually, that worked. If we then mounted the disk manually, that worked as
5 well. But if we let gnap_overlay perform those exact same commands, it
6 failed. After hacking at gnap_overlay a bit we discovered that it seemed
7 like a timing issue. Ian (Ennis) put a couple of simple "sleep" statements
8 in gnap_overlay before and after the formatting code chunk. 10 seconds was
9 not enough after the format, but it was sufficient before the format. He
10 bumped the sleep up to 20 seconds after the format and before the mounting
11 and it worked perfectly! Our CompactFlash was just too slow, apparently. I
12 wonder if anyone else has seen this? Seems like it could possibly be the
13 size of the CF Disk (256MB)? Perhaps with a smaller 16 or 32mb disk the
14 format happens fast enough to allow proper mounting? I don't have a smaller
15 CF Disk here so I can't test this.
16
17 Here is the output of "hdparm -Tt" for the SanDisk for those interested in
18 the speed of the media:
19
20 /dev/hdc1:
21 Timing cached reads: 1032 MB in 2.01 seconds = 514.53 MB/sec
22 Timing buffered disk reads: 8 MB in 3.01 seconds = 2.66 MB/sec
23
24 We can simply hack gnap_overlay ourselves for now. But I wonder if others
25 have experienced this, and if so, perhaps there should be a config option to
26 the effect of "DIRT_SLOW_DISK" that toggles some sleep statements for those
27 of us writing to disk on speed-challenged boxen.
28
29 Thanks for the help, Koon and Sune!
30
31 Ross Carlson
32 Ian Ennis
33 Corvus Technologies
34
35
36 -----Original Message-----
37 From: Ross Carlson [mailto:rcarlson@××××××.com]
38 Sent: Friday, August 19, 2005 8:57 AM
39 To: gentoo-embedded@l.g.o
40 Subject: RE: [gentoo-embedded] GNAP Media Formatting Error?
41
42 Koon, Thanks for the suggestion.
43
44 Unfortunately, it seems not to be the formatting process (as seen below) but
45 perhaps the mounting of the disk. I will dig around some more in the source
46 and see if I can find something.
47
48 # mkfs.msdos /dev/hdc1
49 mkfs.msdos 2.11 (12 Mar 2005)
50
51 Successful format!
52
53 # gnap_overlay -c overlays/project/etc/overlay.conf -d /dev/hdc1 -r hda1 -o
54 overlays/project/ -n -m -s 9600
55
56 GNAP overlay tool gnap_overlay 1.8
57 * Checking parameters...
58 [ ok ]
59 * Warning : you have selected disk install
60 * Make sure you are root or have full access to /dev/hdc1
61 * /dev/hdc must have an MBR installed, run:
62 * dd if=/usr/lib/gnap/mbr/mbr.bin of=/dev/hdc bs=512 count=1 if needed
63 * /dev/hdc1 must contain an active partition:
64 * use fdisk /dev/hdc if needed
65 * Current data on /dev/hdc1 will be destroyed !
66 * Are your sure you want to continue [N]: Y
67 * Expanding /usr/lib/gnap/gnap-core.tar core...
68 [ ok ]
69 * Preparing overlay...
70 [ ok ]
71 * Adding baudrate for serial console...
72 [ ok ]
73 * Adding overlays/project/ (directory overlay)...
74 [ ok ]
75 * Adding overlays/project/etc/overlay.conf (overlay.conf file)...
76 [ ok ]
77 * Creating overlay tarball...
78 [ ok ]
79 * Formatting /dev/hdc1...
80 [ !! ]
81 * Cleaning temporary directories...
82 [ ok ]
83 Overlay failed, try gnap_overlay -h for more help
84
85 Here's the output of mount, so it doesn't appear to be related to an
86 automounting issue (suggested by Sune):
87
88 # mount
89 /dev/hda3 on / type ext3 (rw,noatime)
90 proc on /proc type proc (rw)
91 sysfs on /sys type sysfs (rw)
92 udev on /dev type tmpfs (rw,nosuid)
93 devpts on /dev/pts type devpts (rw)
94 shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev) usbfs on /proc/bus/usb
95 type usbfs (rw)
96
97
98
99 Thanks for the help. I'll keep poking at it.
100
101
102 Ross Carlson
103 Corvus Technologies
104
105
106 -----Original Message-----
107 From: Thierry Carrez [mailto:koon@g.o]
108 Sent: Friday, August 19, 2005 5:08 AM
109 To: gentoo-embedded@l.g.o
110 Subject: Re: [gentoo-embedded] GNAP Media Formatting Error?
111
112 Ross Carlson wrote:
113
114 > * Creating overlay tarball...
115 > [ ok ]
116 > * Formatting /dev/hdc1...
117 > [ !! ]
118 >
119 > I had GNAP running on 1.7.1 (syslinux 2.13) but can't seem to get it
120 > running now with 1.8. The box that I'm using to build on has been
121 > reloaded in the past few days. Perhaps I am missing something in the
122 > kernel (2.6.12-gentoo-r9)? The target disk (SanDisk Compact Flash
123 > 256MB) has been re-partitioned with a single, bootable partition. The
124 > gnap MBR has been copied using dd. And then gnap_overlay as shown
125 > above. Can't seem to figure this out. Thierry? Anyone?
126
127 Here is the code snippet that gnap_overlay runs on the "Formatting..."
128 part :
129
130 gbegin "Formatting ${OUTPUT}"
131 mkfs.msdos "${OUTPUT}" > /dev/null 2>&1
132 gtest $?
133
134 The [ !! ] is written by gtest if an error code is set by the previous
135 command. So it's the mkfs.msdos that failed. I suppressed the output (might
136 not be a good idea) so you obviously miss the message. Try "mkfs.msdos
137 /dev/hdc1" directly and see what happens.
138
139 My wild guess : a required msdos/fat/vfat module is missing in your
140 brand-new kernel.
141
142 --
143 Koon
144 --
145 gentoo-embedded@g.o mailing list
146
147
148 --
149 gentoo-embedded@g.o mailing list
150
151
152 --
153 gentoo-embedded@g.o mailing list