Re: [Server-devel] 1TB drive of quality open content on XO/XS--won't boot

2013-05-14 Thread Braddock

Hi James,
I flew home from the XS-CE hackathon yesterday so unfortunately no 
longer have an XO-4 to test with.  So I can't create you a known-broken 
USB image of reasonable size.


I formatted the 8GB USB stick to NTFS under Linux using gparted (so 
mkfs.ntfs I presume).  The fdisk -l is below.  I did not touch or add 
any files to the partition after formatting.


The Seagate Wireless Plus USB harddrive which also had the boot problem 
had an NTFS partition formatted at the factory, but was later resized by 
me using gparted.


sudo fdisk -l /dev/sdd

Disk /dev/sdd: 8004 MB, 8004829184 bytes
1 heads, 16 sectors/track, 977152 cylinders, total 15634432 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d606e

   Device Boot  Start End  Blocks   Id  System
/dev/sdd1204815634431 78161927 HPFS/NTFS/exFAT


On 05/13/2013 03:13 PM, James Cameron wrote:

Thanks!

I acknowledge the boot flag removal did nothing.  This points me away
from the part of Open Firmware that recognises that flag.

I'm sure I can fix it as soon as I can duplicate the problem.  But
I've been unable to duplicate, possibly because I don't have the same
NTFS software as you.

I'd like to check the partitioning as well as the filesystem, because
Open Firmware tries both in sequence.  It might be reacting to the
partition table rather than the filesystem.  For that I will need a
disk image, but as small as possible because I'm quite remote.

Could you please pick the smallest USB available drive you have, (1)
erase it thoroughly, (2) format it to NTFS in the way you usually do,
without adding any files, then (3) prepare an image, (4) compress it
with gzip or zip, (5) check that the USB drive does cause the problem
still, and (6) provide me with a link to download?

If anybody else has the time to do this, feel free to contribute.

I've raised a ticket to track the problem:
http://dev.laptop.org/ticket/12678

Some suggestions for capturing the image:

1.  to erase a USB drive thoroughly, using Open Firmware,
see http://wiki.laptop.org/go/Forth_Lesson_23#erase_a_device
or in Linux use "sudo cat /dev/zero > /dev/YOUR_DEVICE" where YOUR_DEVICE
is the name that Linux has chosen for it,

2.  (no suggestion),

3.  to prepare an image on Linux, use "sudo cat /dev/YOUR_DEVICE > image",

4.  to compress, use "gzip image",

5.  checking it after making the image ensures that any changes made
accidentally by Open Firmware are not included in the image,

6.  attaching the image to the ticket may be helpful if you don't have
any public place to leave it.

(and a comment, the support for NTFS in OLPC OS kernel is not
pertinent to the problem I wish to solve.)



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Server-devel] 1TB drive of quality open content on XO/XS--won't boot

2013-05-14 Thread Braddock

Hi James
I'm using OpenFirmware Q7B26  EC Firmware 0.4.03

I have tried turning the "boot" flag off on the NTFS partition, but it 
still dumps me to the OpenFirmware ok prompt.


I can reproduce the problem by formatting a USB stick to NTFS and trying 
to boot with it plugged in.


So it is reacting badly to the mere presence of NTFS on USB media.

-braddock

On 05/12/2013 03:40 PM, James Cameron wrote:

On Sat, May 11, 2013 at 03:44:18PM -0400, Holt wrote:

Is there a way to boot a large USB hard drive attached to an XO?
At our XS Community Sprint this week outside Toronto, we've been
unable to boot XOs with the 700+ GB drive(s) containing very
polished open content provided by http://internet-in-a-box.org
The XOs (eg. XO-4 etc) refuse to auto-boot, leaving the screen at
the OK prompt.

FYI our 1TB disk is a nearly complete snapshot of:
* Wikipedia-in-41-languages, thumbnails for most all images
* OpenStreetMap for the whole world cached at all zoom levels for
fast display
* Gutenberg Prjct's full collection of 40,000+ books, images
* Khan Academy's ~4000 video classes, etc

Does firmware currently block the mounting of all large USB drives
-- NTFS in this case if not other filesystems?

Open Firmware tries the first partition that is marked bootable.

Exactly what it does next depends on the firmware version, but clearly
in your case it stops booting.


Might there be a workaround so isolated XO servers in Haiti (etc!)
can hopefully auto-boot with this quality free content?

Turn off the bootable flag using a partitioning program, ensure you
are using latest firmware Q7B30, and attach a serial console for
further debugging.

If you can tell me how to reproduce the symptom, then I'm quite sure I
can get it fixed.  I certainly can't afford to download 700 GB or 1 TB
to do that though.

I'm happy to work with whoever has the drive and an XO-4.

The nature and value of the content has no relationship to the
diagnosis process, but is interesting regardless.



___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Server-devel] 1TB drive of quality open content on XO/XS--won't boot

2013-05-14 Thread James Cameron
On Tue, May 14, 2013 at 10:45:36AM -0500, Jerry Vonau wrote:
> On Sat, 2013-05-11 at 12:58 -0700, Braddock wrote:
> > On 05/11/2013 12:44 PM, Holt wrote:
> > > Is there a way to boot a large USB hard drive attached to an XO?
> > 
> > Further detail on the trouble drive.
> > [...]
> > # fdisk -l /dev/sda
> > 
> > Disk /dev/sda: 1000.2 GB, 1000204885504 bytes, 1953525167 sectors
> > Units = sectors of 1 * 512 = 512 bytes
> > Sector size (logical/physical): 512 bytes / 512 bytes
> > I/O size (minimum/optimal): 512 bytes / 512 bytes
> > Disk identifier: 0x6f44561a
> > 
> > Device Boot  Start End  Blocks   Id  System
> > /dev/sda1   *2048 8193149 40955517 HPFS/NTFS/exFAT
> > /dev/sda2 8193150  1953520064   972663457+  83  Linux
> 
> With James' earlier comment about OFW  booting a partition that has been
> flagged as bootable, perhaps setting the second partition as bootable
> will correct this issue.

Thanks Jerry.  Yes, it will.

Open Firmware is trying to open the file u:\boot\olpc.fth ... which is
a file specification without a partition number, therefore it will
choose either the first partition with a bootable flag, or if there
are no such partitions it will use the first partition.

So my earlier advice to remove the bootable flag was incomplete; I
should have suggested moving the bootable flag away from the NTFS
partition onto the Linux partition.

If the XO is secured, it should proceed normally.  In the absence of
the fix to the bootable flag on the partition, an unsecured XO can use
a special configuration setting as a semi-permanent workaround:

ok add-tag BD int:\boot\olpc.fth

This directs the unsecured boot process to begin with the internal
storage, ignoring any external USB device or SD card.  It does not
affect secured boot, so the four-finger install method will still
work.

#12678 updated.

-- 
James Cameron
http://quozl.linux.org.au/
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: [Server-devel] 1TB drive of quality open content on XO/XS--won't boot

2013-05-14 Thread Jerry Vonau
On Sat, 2013-05-11 at 12:58 -0700, Braddock wrote:
> On 05/11/2013 12:44 PM, Holt wrote:
> > Is there a way to boot a large USB hard drive attached to an XO?
> 
> Further detail on the trouble drive.
> 
> This is a 1TB Seagate Wireless Plus connected via USB.  It mounts 
> correctly when the XO is booted, but if it is connected when the XO is 
> powered on or rebooted, the XO drops to a firmware "OK" prompt.
> 
> I wonder if it could be because the first partition has a boot flag set?
> 
> 
> # fdisk -l /dev/sda
> 
> Disk /dev/sda: 1000.2 GB, 1000204885504 bytes, 1953525167 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x6f44561a
> 
> Device Boot  Start End  Blocks   Id  System
> /dev/sda1   *2048 8193149 40955517 HPFS/NTFS/exFAT
> /dev/sda2 8193150  1953520064   972663457+  83  Linux
> 
> 

With James' earlier comment about OFW  booting a partition that has been
flagged as bootable, perhaps setting the second partition as bootable
will correct this issue.

Jerry

> Another volunteer has an external USB drive here which DOES work correctly.
> 
> Thanks,
> Braddock Gaskill
> 
> 
> > At our XS Community Sprint this week outside Toronto, we've been 
> > unable to boot XOs with the 700+ GB drive(s) containing very polished 
> > open content provided by http://internet-in-a-box.org
> > The XOs (eg. XO-4 etc) refuse to auto-boot, leaving the screen at the 
> > OK prompt.
> >
> > FYI our 1TB disk is a nearly complete snapshot of:
> > * Wikipedia-in-41-languages, thumbnails for most all images
> > * OpenStreetMap for the whole world cached at all zoom levels for fast 
> > display
> > * Gutenberg Prjct's full collection of 40,000+ books, images
> > * Khan Academy's ~4000 video classes, etc
> >
> > Does firmware currently block the mounting of all large USB drives -- 
> > NTFS in this case if not other filesystems?
> > Might there be a workaround so isolated XO servers in Haiti (etc!) can 
> > hopefully auto-boot with this quality free content?
> > Cheers!
> >
> > -- 
> > Help kids everywhere map their world, at http://olpcMAP.net !
> >
> > ___
> > Server-devel mailing list
> > server-de...@lists.laptop.org
> > http://lists.laptop.org/listinfo/server-devel
> 
> ___
> Server-devel mailing list
> server-de...@lists.laptop.org
> http://lists.laptop.org/listinfo/server-devel


___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel