Re: can't boot XO-1 from USB, doc needed

2011-11-22 Thread Daniel Drake
On Mon, Nov 7, 2011 at 6:12 PM, S Page  wrote:
> I wanted to try 11.3.0 but my XO-1 prints scary JFFS2 warnings before
> "Boot has failed, sleeping forever.".  (After four years, no more
> olpc-update for me.)
>
> I'd like to boot off USB and look at my XO-1's NAND filesystem. But
> the wiki instructions for booting off USB[1] were out of date. I've
> updated them to de-emphasize the .ext3.img that's no longer built, but
> can't find instructions for what's in current builds. There have been
> mail threads and bug reports on the subject, recently "11.2.0 XO-1
> boot from USB or SD doesn't work for me"[2] which wound up providing
> workarounds [3] without explaining how to get started. I think there
> was a more recent thread but I can't find it.

Sorry that this boot path is a bit neglected. I've made some changes
for 12.1.0 which should make it a little easier and solve one of the
core issues behind this, but it is still a bit of a nasty process for
USB since it requires you to arrange the files in a special way (or
you may wish to take another approach like the one you found in this
thread, which is perhaps a little less horrifying). I posted info
here: http://dev.laptop.org/ticket/11233#comment:8

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


Re: can't boot XO-1 from USB, doc needed

2011-11-11 Thread James Cameron
On Fri, Nov 11, 2011 at 02:05:10PM -0800, S Page wrote:
> I wrote:
> >> I'd like to boot off USB and look at my XO-1's NAND filesystem. But
> >> the wiki instructions for booting off USB[1] were out of date.
> 
> I still can't boot 11.3.0 from USB following
> http://wiki.laptop.org/go/OS_images_for_USB_disks#Booting.

Honestly, I'm not surprised, I haven't heard of anyone having easy
success with this method, and I don't think it was part of the 11.3.0
release testing.  However, your finding below might suggest that the
problem is USB drive related.

> James Cameron helpfully replied:
> > I would use http://wiki.laptop.org/go/Tiny_Core_Linux to boot from USB
> > and investigate the cause:
> 
> That worked using boot u:\boot\olpc.fth , very nice!

It should have worked without using that command.  That it doesn't
suggests you have a USB drive that does not work correctly with
OpenFirmware, or a USB host fault.  You might explore this by upgrading
to Q2F05 and testing boot from USB without typing any commands.  Be sure
to insert the USB drive before turning on the laptop.  You might also
try a different USB drive.

> at which point after about 15 seconds I get
>  JFFS2 error: (1053) jffs2_build_inode_pass1: child dir "root" (ino
> #340448) of dir ino #340447 appears to be a hard link

Well, that's consistent with your mail of 7th November, which contained
the same error.  It suggests filesystem corruption in the JFFS2 on NAND
Flash.

> Yet the NAND flash contents look pretty good, /home/olpc, /versions,
> etc.  `find -inum 340xxx` fails to find those inode numbers, but
> prints
>   find: ./versions/run/af5b6blahblah: Input/output error
> `ls` reports this directory doesn't exist. Unfortunately there's no
> fsck.jffs2 , so this seems irreparable. I hope it's just hardware
> rather than the "steps to free up disk space" that I vaguely recall
> running before I last shut down.

The way to find out is to repeat those steps after reinstall.  If they
break it again, you've learned that the steps might need refinement.

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


Re: can't boot XO-1 from USB, doc needed

2011-11-11 Thread S Page
I wrote:
>> I'd like to boot off USB and look at my XO-1's NAND filesystem. But
>> the wiki instructions for booting off USB[1] were out of date.

I still can't boot 11.3.0 from USB following
http://wiki.laptop.org/go/OS_images_for_USB_disks#Booting.

James Cameron helpfully replied:
> I would use http://wiki.laptop.org/go/Tiny_Core_Linux to boot from USB
> and investigate the cause:

That worked using boot u:\boot\olpc.fth , very nice! I tweaked your
F.S. test steps to:

 # cat /proc/mtd
 # mkdir /mnt/MY_XO_FS
 # mount -t jffs2 mtd0 /mnt/MY_XO_FS

(I updated the wiki page with all this)

at which point after about 15 seconds I get
 JFFS2 error: (1053) jffs2_build_inode_pass1: child dir "root" (ino
#340448) of dir ino #340447 appears to be a hard link

Yet the NAND flash contents look pretty good, /home/olpc, /versions,
etc.  `find -inum 340xxx` fails to find those inode numbers, but
prints
  find: ./versions/run/af5b6blahblah: Input/output error
`ls` reports this directory doesn't exist. Unfortunately there's no
fsck.jffs2 , so this seems irreparable. I hope it's just hardware
rather than the "steps to free up disk space" that I vaguely recall
running before I last shut down.

> I would also make a backup using the xo-backup tool included on the Tiny
> Core Linux build modified for XO-1.

That worked, nice!
  % gtar -v --create --directory /mnt/MY_XO_FS/home/olpc \
 --file /mnt/sda1/xo_home_olpc.tar .

Thanks again! Now I'll install *without* using olpc-update for the
first time in years.

--
=S Page
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


RE: [Testing] can't boot XO-1 from USB, doc needed

2011-11-07 Thread Caryl Bigenho

My Motto...When in doubt... Reflash!;-DCaryl
> Date: Tue, 8 Nov 2011 14:52:20 +1100
> From: qu...@laptop.org
> To: skierp...@gmail.com
> CC: test...@lists.laptop.org; devel@lists.laptop.org
> Subject: Re: [Testing] can't boot XO-1 from USB, doc needed
> 
> I would reinstall at this point, relying on my backups.
> 
> -- 
> James Cameron
> http://quozl.linux.org.au/
> ___
> Testing mailing list
> test...@lists.laptop.org
> http://lists.laptop.org/listinfo/testing
  ___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: can't boot XO-1 from USB, doc needed

2011-11-07 Thread James Cameron
I would reinstall at this point, relying on my backups.

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


Re: can't boot XO-1 from USB, doc needed

2011-11-07 Thread S Page
Thanks for the suggestions!

On Mon, Nov 7, 2011 at 16:23, James Cameron  wrote:
> On Mon, Nov 07, 2011 at 04:12:50PM -0800, S Page wrote:
>> I wanted to try 11.3.0 but my XO-1 prints scary JFFS2 warnings before
>> "Boot has failed, sleeping forever."
>
> That sounds fixable.  Can you describe how you got to this point?

I turned on XO-1 that I had upgraded to 11.2.0 earlier, it failed to
boot. I might have run commands to delete stuff to free up disk space.
I transcribed some errors are below. I installed the q2f04rd firmware
from USB and it didn't help.

I'll try the Tiny Core Linux, and dig up an SD card for booting 11.3.0.

>> * Can I jump through hoops to mount the JFFS2 .img and transfer its
>> contents (cpio?) to an ext3 partition?
>
> Yes, except it isn't an .img.

% file /opt/download/os883.img
/opt/download/os883.img: Linux jffs2 filesystem data little endian

and Google produces complicated ways to mount it.

> Yes, the .tar.lzma does not have boot files in /boot, you need to create
> the symlink to the versioned boot directory.

 % sudo ln -s versions/pristine/883/boot boot

and now
  ok boot u:\boot\vmlinuz
Kernel startup progresses for a bit, but then prints
  VFS: Cannot open root device "(null)" or unknown-block(0,0)
  Please append a correct "root=" boot option: here are the available
partitions:
  Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

so presumably I have to make these mystical olpc.fth or boot command
changes or GRUB modifications. Any documentation for that?
[Digression: I know people have done this, please folks do the right
thing and write something on the wiki.]

== Rough copy of the errors I get booting from NAND flash ==

  Hello children of the world!
  (pause)
  JFFS2 error: (136) jffs2_build_inode_pass1: child dir "root" (ino
#340448) of dir ino #340447 appears to be a hard link
  JFFS2 notice: (136) blah blah xattr built
  dracut: Mounted root filesystem /dev/mtdblock0
  JFFS2 warning: (146) jffs2_get_inode_nodes: Eep. No valid nodes for
ino #340448
  [ JFFS2 warning: (158) jffs2_do_read_inode_internal: no data nodes
found for ino #340448
  iget() failed for ino #340448
  ls: /sysroot/versions/run/af5b6xxx: Input/output error
  purging old versions, boot may be slightly delayed...
  JFFS error again
  mkdir: cannot create directory' /sysroot/versions/run/af5b6xxx':
Input/output error

Again thanks.
--
=S Page
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: can't boot XO-1 from USB, doc needed

2011-11-07 Thread James Cameron
Oh, and I would not be terribly interested in a permanent "boot and use
OLPC OS from USB" because of the data corruption risk of USB drives
being pulled out during operation.

SD, yes.  USB, no, too fragile.

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


Re: can't boot XO-1 from USB, doc needed

2011-11-07 Thread James Cameron
On Mon, Nov 07, 2011 at 04:12:50PM -0800, S Page wrote:
> I wanted to try 11.3.0 but my XO-1 prints scary JFFS2 warnings before
> "Boot has failed, sleeping forever.".  (After four years, no more
> olpc-update for me.)

That sounds fixable.  Can you describe how you got to this point?

> I'd like to boot off USB and look at my XO-1's NAND filesystem. But
> the wiki instructions for booting off USB[1] were out of date.

I would use http://wiki.laptop.org/go/Tiny_Core_Linux to boot from USB
and investigate the cause:

# cat /proc/mtd0
# mount -t jffs2 mtd0 /mnt

I would also make a backup using the xo-backup tool included on the Tiny
Core Linux build modified for XO-1.  This is documented for XO-1.5 at
http://wiki.laptop.org/go/How_to_backup_your_XO#XO-1.5 but ought to work
in a similar fashion for XO-1 ... if you mount the jffs2 filesystem
instead.

> * Can I jump through hoops to mount the JFFS2 .img and transfer its
> contents (cpio?) to an ext3 partition?

Yes, except it isn't an .img.

> * I created an ext3 partition named OLPCRoot and used
> sudo tar --lzma --numeric-owner -xvf /path/to/os883.tree.tar.lzma
>   to extract the build's files.  But the tree doesn't have /boot ,
> initrd, or actrd?!

Yes, the .tar.lzma does not have boot files in /boot, you need to create
the symlink to the versioned boot directory.

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


Re: can't boot XO-1 from USB, doc needed

2011-11-07 Thread DJ Delorie

I'm running a Fedora 15 test image on an external USB sata drive.  I
formatted the drive as ext3 and copied the filesystem to it, and
manually boot from ofc:

boot u:\boot\olpc.fth  (or something like that)

You might have to tweak the olpc.fth file on your usb disk to boot
properly off it, and don't forget to update your /etc/fstab to use the
new drive devices.
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


can't boot XO-1 from USB, doc needed

2011-11-07 Thread S Page
I wanted to try 11.3.0 but my XO-1 prints scary JFFS2 warnings before
"Boot has failed, sleeping forever.".  (After four years, no more
olpc-update for me.)

I'd like to boot off USB and look at my XO-1's NAND filesystem. But
the wiki instructions for booting off USB[1] were out of date. I've
updated them to de-emphasize the .ext3.img that's no longer built, but
can't find instructions for what's in current builds. There have been
mail threads and bug reports on the subject, recently "11.2.0 XO-1
boot from USB or SD doesn't work for me"[2] which wound up providing
workarounds [3] without explaining how to get started. I think there
was a more recent thread but I can't find it.

* Can I jump through hoops to mount the JFFS2 .img and transfer its
contents (cpio?) to an ext3 partition?

* I created an ext3 partition named OLPCRoot and used
sudo tar --lzma --numeric-owner -xvf /path/to/os883.tree.tar.lzma
  to extract the build's files.  But the tree doesn't have /boot ,
initrd, or actrd?!  That's probably why trying to boot from it gives
  ok boot u:
  Boot device: /usb/disk: Arguments:
  The attempt to load a boot image failed.
These files are deep within u:\versions\run\883\boot , should I be
providing special arguments or creating symlinks?

Also, people have written separate instructions for booting from
SD[4], but wouldn't the procedure be the same?

I promise to write up any explanations provided...

[1] http://wiki.laptop.org/go/OS_images_for_USB_disks
[2] http://lists.laptop.org/pipermail/devel/2011-August/033009.html
[3] http://dev.laptop.org/ticket/11233
[4]  http://wiki.laptop.org/go/Installing_to_SD_Card

Thanks,
--
=S Page
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel