Welcome! Log In Create A New Profile

Advanced

U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood

Posted by notoneofmyseeds 
U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
January 30, 2016 02:22PM
A great person, bodhi, helped me about a half year ago rescue my pogo E02. I had spent years, on and off, trying to get ssh access to it.

Now, I want to do two things:
1. http://forum.doozan.com/read.php?3,12381 (U-Boot Kirkwood)
2. http://forum.doozan.com/read.php?2,12096 (Linux Kernel 4.2 Kirkwood)

I know 2 will give me Jessie. I faintly understand the benefits from 1. And given the grave warning bodhi gave in that thread, I have stopped for two reasons; I don't want to brick this unit and in respect for the time of those who may try to help me unbrick.

I have attached two images from the first portion; 1.
The first is I did not get the expected output from running: nanddump --noecc --omitoob -l 0x80000 -f mtd0 /dev/mtd0
And the second, I can't be sure, since my NAND error check gave errors, whether they are located within the first 1MB of my NAND.
By the way, is it possible to 'clear' up the NAND of such errors?

And this is where I have stopped on 1. I have not started 2 yet, waiting to complete 1.

Related question: can someone please confirm for me that 2 will give me Jessie, and throw some light on the need to do 2. As well, do I need to do 1; could I get 1 from just doing 2?

Finally, I feel like stopping now and putting a new and bigger USB stick in there. I have now: rootfs version 3.16. How can I migrate to a bigger USB? Can I just take the current one out, restart with a new bigger one and install Jessie? What commands would I run, if so?

Thanks a lot for your help. Much appreciated.
Attachments:
open | download - Screenshot - 01302016 - 09:00:34 PM.png (33.2 KB)
open | download - Screenshot - 01302016 - 09:03:18 PM.png (28.7 KB)
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
January 30, 2016 03:37PM
notoneofmyseeds,

You're welcome!

Q1.
> The first is I did not get the expected output
> from running: nanddump --noecc --omitoob -l
> 0x80000 -f mtd0 /dev/mtd0
> And the second, I can't be sure, since my NAND
> error check gave errors, whether they are located
> within the first 1MB of my NAND.
> By the way, is it possible to 'clear' up the NAND
> of such errors?
>

a) "nandump not found" error is simple: you have not installed mtd-utils, so
apt-get intsall mtd-utils

b) The bad erase blocks errors are also OK. They are way out of the 1st MB (1MB is from block 0 to 7). So it's OK to ignore them and flash new u-boot. These are permanent errors, and they are marked as such in NAND. Linux & U-Boot tools are designed to work around them so there is no harm.

Q2.
> Related question: can someone please confirm for
> me that 2 will give me Jessie, and throw some
> light on the need to do

Yes it would. However, you are running 3.16, and it is wheezy. So:

- backup your current rootfs. This is important because the changes will be massive.
- upgrade the kernel to 4.2
- change /etc/apt/sources.list to point to jessie,
- run "apt-get upgrade".

But here things get interesting, there are several gotchas (systemd vs. sysvinit issue). You need to lay out a procedure to do what you want so things can go smoothly. So if you need help, I'll write it out (or you can search for the thread in this forum that we discussed this subject). Or you can do research, prepare the procedure, and I'll check it over.

Q3.
> could I get 1 from just doing 2?

No. They are 2 different procedures.

Q4.
> Finally, I feel like stopping now and putting a
> new and bigger USB stick in there. I have now:
> rootfs version 3.16. How can I migrate to a bigger
> USB? Can I just take the current one out, restart
> with a new bigger one and install Jessie? What
> commands would I run, if so?

It is best to take it off line and copy it. So you need to take it to another Linux box, login as root. And mount botth sticks. Assuming they are mounted as /media/current_stick and /media/new_stick (the empty and larger USB):

cd /media/new_stick/
time cp -aR /media/current_stick/* . &

When it is done, the statistics will be displayed. Then make sure that everything got written to disk:
sync

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
January 31, 2016 12:49PM
bodhi Wrote:
-------------------------------------------------------
> notoneofmyseeds,
>
> You're welcome!
>
> Q1.
> > The first is I did not get the expected output
> > from running: nanddump --noecc --omitoob -l
> > 0x80000 -f mtd0 /dev/mtd0
> > And the second, I can't be sure, since my NAND
> > error check gave errors, whether they are
> located
> > within the first 1MB of my NAND.
> > By the way, is it possible to 'clear' up the
> NAND
> > of such errors?
> >
>
> a) "nandump not found" error is simple: you have
> not installed mtd-utils, so
>
> apt-get intsall mtd-utils
>
>
> b) The bad erase blocks errors are also OK. They
> are way out of the 1st MB (1MB is from block 0 to
> 7). So it's OK to ignore them and flash new
> u-boot. These are permanent errors, and they are
> marked as such in NAND. Linux & U-Boot tools are
> designed to work around them so there is no harm.
>
> Q2.
> > Related question: can someone please confirm
> for
> > me that 2 will give me Jessie, and throw some
> > light on the need to do
>
> Yes it would. However, you are running 3.16, and
> it is wheezy. So:
>
> - backup your current rootfs. This is important
> because the changes will be massive.
> - upgrade the kernel to 4.2
> - change /etc/apt/sources.list to point to jessie,
>
> - run "apt-get upgrade".
>
> But here things get interesting, there are several
> gotchas (systemd vs. sysvinit issue). You need to
> lay out a procedure to do what you want so things
> can go smoothly. So if you need help, I'll write
> it out (or you can search for the thread in this
> forum that we discussed this subject). Or you can
> do research, prepare the procedure, and I'll check
> it over.
>
> Q3.
> > could I get 1 from just doing 2?
>
> No. They are 2 different procedures.
>
> Q4.
> > Finally, I feel like stopping now and putting a
> > new and bigger USB stick in there. I have now:
> > rootfs version 3.16. How can I migrate to a
> bigger
> > USB? Can I just take the current one out,
> restart
> > with a new bigger one and install Jessie? What
> > commands would I run, if so?
>
> It is best to take it off line and copy it. So you
> need to take it to another Linux box, login as
> root. And mount botth sticks. Assuming they
> are mounted as /media/current_stick and
> /media/new_stick (the empty and larger USB):
>
>
> cd /media/new_stick/
> time cp -aR /media/current_stick/* . &
>
>
> When it is done, the statistics will be
> displayed. Then make sure that everything got
> written to disk:
>
> sync
>


Oh, wow! It's my favorite person on this forum; and as it happens the ONLY person with a response. Wow! Great; my lucky day.

I've read your response, bohdi, with great care. And before I proceed with this project and as you've suggested; can I please ask one question:

What are the advantages, practical, advantages for risking and doing the kernel upgrade.

I've heard the cries about systemd; and know that Jessie is laced with it. I suppose I can't have Jessie without systemd.

And to get systemd, I need the kernel upgrade; have I just answered by question, or is there more to it?

Based on the response, I'd decide whether to risk it; or just settle for the latest version of Debian for which I don't need systemd, or a kernel upgrade.

Thanks for your earlier response. Has been printed and kept.

Cool, you're pretty cool, with your kind, gentle and helpful responses.
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
January 31, 2016 01:37PM
notoneofmyseeds,

> What are the advantages, practical, advantages for
> risking and doing the kernel upgrade.

There are risks in some new bugs introduced in each major upgrade, such as wheezy to jessie, but the advantage with newer kernel is newer package versions, and security fixes.

Since kernel 4.4 is an LTS kernel, it is a good place to be, meaning you won't need to upgrade for a while, just updating packages.

> I've heard the cries about systemd; and know that
> Jessie is laced with it.

:)

> I suppose I can't have
> Jessie without systemd.
>

Not true. For example, if you started with my 3.18.5 rootfs, then it is jessie, and it is running sysvinit.

> And to get systemd, I need the kernel upgrade;
> have I just answered by question, or is there more
> to it?
>

After upgrading to kernel 4.4 (just released!), change apt sources, and running apt-get upgrade, you will be automatically switched to systemd. To put it right back to sysvinit, all you need to do is install these 3 packages:

apt-get install sysvinit-core sysvinit sysvinit-utils

Reboot, and your system will boot with sysvinit.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
February 05, 2016 03:19AM
bodhi Wrote:
-------------------------------------------------------
> notoneofmyseeds,
>
> > What are the advantages, practical, advantages
> for
> > risking and doing the kernel upgrade.
>
> There are risks in some new bugs introduced in
> each major upgrade, such as wheezy to jessie, but
> the advantage with newer kernel is newer package
> versions, and security fixes.
>
> Since kernel 4.4 is an LTS kernel, it is a good
> place to be, meaning you won't need to upgrade for
> a while, just updating packages.
>
> > I've heard the cries about systemd; and know
> that
> > Jessie is laced with it.
>
> :)
>
> > I suppose I can't have
> > Jessie without systemd.
> >
>
> Not true. For example, if you started with my
> 3.18.5 rootfs, then it is jessie, and it is
> running sysvinit.
>
> > And to get systemd, I need the kernel upgrade;
> > have I just answered by question, or is there
> more
> > to it?
> >
>
> After upgrading to kernel 4.4 (just released!),
> change apt sources, and running apt-get upgrade,
> you will be automatically switched to systemd. To
> put it right back to sysvinit, all you need to do
> is install these 3 packages:
>
>
> apt-get install sysvinit-core sysvinit
> sysvinit-utils
>
>
> Reboot, and your system will boot with sysvinit.

bodhi, hello

I have read a lot and I'm confused a lot. I've read this forum and for ideas I don't understand have gone elsewhere looking for all the answers that I need to bring this pogo to kernel 4.4 and then to Jessie, from it's particular status. I've found, for example, that I can't seem to find someone with a pogo in my current state.

And so, for fear of risking bricking it, and taking heed of your earlier warnings, I will take you up on the offer to lead/direct me. This makes sense since you're familiar with it and helped me rescue it from the bin where it has been for years.

In return, I will use my experience and do a proper HowTo, send it to you for approval and you can 'pin' it in the forum. And so others, for there are sure others who will come, will simply take it up from there. I will write it clear enough, from the perspective of someone who knows nothing about this. No assumptions will be made other that you own a pogo like this and can type letters and numbers.

So, my friend, what do you think? You know my pogo more than I do...I'm listening. And will learn! Better to learn from you anyway, than the myraid of ideas out there.
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
February 05, 2016 01:09PM
notoneofmyseeds,

The jessie upgrade is simple, a lot of people are in your situation when they have rootfs 3.16 and want to upgrade to newer kernel. I think I've confused you with additional issue of "systemd or not systemd". Assuming you want systemd for now. And that can be taken care of after you have upgraged to jessie.

I'm writing out the steps here in the folowing post. But I'll fill in the details slowly, time permitted. Keep the questions coming in this thread if you are not clear about something!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/05/2016 01:13PM by bodhi.
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
February 05, 2016 01:12PM
Debian Upgrade to jessie from non-FDT kernel version (3.16.0-kirkwood-tld-2 or earlier)

1. Back up current rootfs

Making a backup rootfs tarball:
http://forum.doozan.com/read.php?2,12096,24034#msg-24034


2. Upgrade kernel to linux-4.4.0-kirkwood-tld-1

3. Make sure 4.4 works in your current rootfs

4. Backup rootfs

5. Change apt sources to jessie and do the upgrade.

6. Make sure the rootfs run OK (systemd does ot break anytthing).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/05/2016 06:46PM by bodhi.
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
February 19, 2016 04:40PM
bodhi Wrote:
-------------------------------------------------------
> Debian Upgrade to jessie from non-FDT kernel
> version (3.16.0-kirkwood-tld-2 or earlier)

>
> 1. Back up current rootfs
>
> Making a backup rootfs tarball:
> http://forum.doozan.com/read.php?2,12096,24034#msg
> -24034
>
>
> 2. Upgrade kernel to linux-4.4.0-kirkwood-tld-1
>
> 3. Make sure 4.4 works in your current rootfs
>
> 4. Backup rootfs
>
> 5. Change apt sources to jessie and do the
> upgrade.
>
> 6. Make sure the rootfs run OK (systemd does ot
> break anytthing).

Dear bodhi,

First, please forgive my late response. I've been reading and been hesitant.
But today, I thought, I'd give the first seemingly simple step number 1. And even that I can't do.
I have attached a picture.
Meanwhile, I've found a good sized USB stick that I'd rather use. Can I just start from that, and skip this backup?
As well, if yes; how?
OK, assuming I got that do, I follow the rest of the steps; 2-6.
Can I ask; how? I promise, I will write an idiot guide on this, if someone can only hold my hand through. And I will learn.
I thank, you, bodhi; very much!
Just on the side, why can't I log into the pogo, WITHOUT the rootfs stick in it. I tried, shh'ing there, with password root, but it won't let me in.
Attachments:
open | download - Screenshot_2016-02-19_23-34-21.png (99.7 KB)
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
February 19, 2016 06:58PM
notoneofmyseeds,

For step 1. If you run Windows PC and have Acronis True Image, I would recommend using that and be done quickly.

If you do it as instructed in a Linux box, then the drive letters need to be adjusted to whatever being mounted in your box. Sometime the drive is mounted using its parttion label, or using a special name (which is your situation).

So in this thread:
http://forum.doozan.com/read.php?2,12096,24034#msg-24034

The commands:
cd /media/sdb1
time tar -cjf /media/sda1/bonk-rootfs.tar.bz2  . &
The above means: /media/sdb1 is the USB rootfs drive that is your source disk (the rootfs that you want to backup), and the /media/sda1 is your destination disk where the bonk-rootfs.tar.bz2 tarball will be created (which is your Linux box system drive).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
notoneosmfyseeds
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
February 26, 2016 04:29PM
bodhi Wrote:
-------------------------------------------------------
> notoneofmyseeds,
>
> For step 1. If you run Windows PC and have Acronis
> True Image, I would recommend using that and be
> done quickly.
>
> If you do it as instructed in a Linux box, then
> the drive letters need to be adjusted to whatever
> being mounted in your box. Sometime the drive is
> mounted using its parttion label, or using a
> special name (which is your situation).
>
> So in this thread:
> http://forum.doozan.com/read.php?2,12096,24034#msg
> -24034
>
> The commands:
>
> cd /media/sdb1
> time tar -cjf /media/sda1/bonk-rootfs.tar.bz2  .
> &
>
> The above means: /media/sdb1 is the USB rootfs
> drive that is your source disk (the rootfs that
> you want to backup), and the /media/sda1 is your
> destination disk where the bonk-rootfs.tar.bz2
> tarball will be created (which is your Linux box
> system drive).

My dear friend, bohdi,

I'm happy to report that step 1 is now done, well, almost.

I did it on a linux box by creating a mount point on fstab and manually mount the flash disk.

I say almost because it seems to be running, and as not given me an exit status. It would be nice to get a verbose output. But hey, I will be patient and simply leave the machine and go do something else.

Step 2? Any suggestions, instructions?

Thanks a lot so much for all your help.
notoneosmfyseeds
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
March 03, 2016 09:37AM
Dear bohdi,

I thought this worked. The size, when it was done is zero.

And so, I'm back to number 1. And I don't have a windows box.

Something so seemingly simply has thousands of pages on the internet on this same issue. Not one has worked for me.

This is the linux world, I suppose.

Any ideas folks?
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
March 03, 2016 02:49PM
notoneosmfyseeds,

What you should do is post the log (don't attach it) here in code tag. Don't post screenshot, copy and paste the teminal session here. I'm sure everybody will chime in and point out the mistake somewhere. Peope don't bother to look at screenshot or downloas attached file, unless they are really curious.

This is a basic Linux task, so it's not difficult, perhaps a missing step somewhere or a typo. The log should show the entire session. How you format the drive, create ext3 partition, mounting it, what drive letter or name of the disk after mounting,..... everything.

So back to my post about back up rootfs and follow the instruction:
http://forum.doozan.com/read.php?2,12096,24034#msg-24034

Now of course if you can find different instruction (i.e. using dd) then post it here and ask if that can be used.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
April 30, 2016 02:28AM
I have backed up rootfs

And have downloaded and extracted "Debian-4.4.0-kirkwood-tld-1-rootfs-bodhi.tar.bz2"
to an ext3 formatted usb stick, that is named rootfs.

I plugged this into the pogo, got an ip, ssh in but the passwords, "root" and "admin," are refused.

But this time, I did not do after extracting:
sync
sync
sync

Could this be the problem? If so, how do I proceed, please?
Re: U-Boot Kirkwood and Linux Kernel 4.2 Kirkwood
April 30, 2016 03:34PM
notoneofmyseeds,

> But this time, I did not do after extracting:
> sync
> sync
> sync
>
> Could this be the problem? If so, how do I
> proceed, please?

Not likely the reason.

One possible cause is how you created the rootfs. You might have not followed the instruction closely enough. For example, If you did not copy and paste the instruction, but having to change it or use a different commands, were you logged in as root, ....

The best way to troubleshoot this is for you to

- Post info about which u-boot version that you have installed so far.
- Post the u-boot envs using the fw_printenv command.
- Post the entire log of how you created the rootfs. And I meant verbatim, copy and paste the entire session, don't worry about cleaning up (a lot of time, some wrong step taken without you realized that happened).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: