Welcome! Log In Create A New Profile

Advanced

Installing Debian from stock U-Boot/firmware

Posted by haridsv 
Installing Debian from stock U-Boot/firmware
August 26, 2017 09:05AM
I bought a Pogoplug E02 back in 2013 wanting to do something, but never even got around to do it, so it was lying unused. I now have certain things my mind, like setting up google cloud print and some home automation, so powered it on for the very first time today and activated it. I realized that ssh can no longer be enabled via Pogoplug account, but I was able to use the below curl hack to hit /sqdiag/HBPlug for starting dropbear:

$ curl -k "https://root:ceadmin@192.168.1.53/sqdiag/HBPlug?action=command&command=dropbear%20start";


I am able to ssh into it:

ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.1.53


I am wondering if I can just follow a debian installation guide or if I must first enable ssh permanently, using the serial cable method. I don't have a cable right now and never did anything like that, so it would make my life much easier if that is not required.

Also, is there any criteria to help decide whether to install Debian or Arch linux on this?



Edited 1 time(s). Last edit at 08/31/2017 04:03AM by haridsv.
Re: Can I install Debian without permanently enabling ssh?
August 26, 2017 05:29PM
haridsv,

> I was able to use the below curl hack to hit /s
> qdiag/HBPlug for starting dropbear:

Thanks for confirming this curl hack works! there was conflicting info about this hack in the forum.

> I am wondering if I can just follow a debian insta
> llation guide or if I must first enable ssh perman
> ently, using the serial cable method. I don't have
> a cable right now and never did anything like that
> , so it would make my life much easier if that is
> not required.
>

It is OK not to have serial console. You can install Debian in stock OS after SSH into it. But you will need to be careful to follow instruction to install Debian, and U-Boot.

Because at the minimum, you will need to change some u-boot envs to boot with the Debian rootfs on USB. Without serial console, you can't fix some mistake easily, if at all. So if you are willing to connect serial console should something goes wrong, then it is OK to proceed.

The Pogo E02 serial console is quite easy to connect (no soldering needed). Open the box, take a look at the serial header on the board to confirm that it is there. After that, you only need to buy a 2-3$ serial module converter on eBay (which already has correct connector on wires that fit the Pogo E02 header), and plug it in.

> Also, is there any criteria to help decide whether
> to install Debian or Arch linux on this?

It is entirely your your preference, there is really no difference in capability or any limitation comparing the 2 distros, as far as the Pogo E02 is concerned.

If you decide to install my released Debian and U-Boot images, then you could proceed and post the entire session of what you did, before reboot. I'll double check for you to spot any potential problem before you reboot (so that you can avoid connecting serial console if there were mistakes).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 26, 2017 06:05PM
bodhi Wrote:
-------------------------------------------------------
> haridsv,
>
> > I was able to use the below curl hack to hit /s
> > qdiag/HBPlug for starting dropbear:
>
> Thanks for confirming this curl hack works! there
> was conflicting info about this hack in the forum.
>
It depends on the version of the software loaded. He had this for some time not connected so it was able to work. The one I had bought had the newer version where they locked the ability out.
Re: Can I install Debian without permanently enabling ssh?
August 26, 2017 06:32PM
feas Wrote:

> It depends on the version of the software loaded.
> He had this for some time not connected so it was
> able to work. The one I had bought had the newer v
> ersion where they locked the ability out.

Ah, that makes sense. Thanks feas.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 26, 2017 10:49PM
feas Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
> > haridsv,
> >
> > > I was able to use the below curl hack to hit /
> s
> > > qdiag/HBPlug for starting dropbear:
> >
> > Thanks for confirming this curl hack works! ther
> e
> > was conflicting info about this hack in the foru
> m.
> >
> It depends on the version of the software loaded.
> He had this for some time not connected so it was
> able to work. The one I had bought had the newer v
> ersion where they locked the ability out.

Yes, I never even powered it on till now, though I bought it in 2013. Even then, I disabled internet access for it ASAP after activation via router rules, just in case it would get a forced update that could disable this feature, though I am not sure if they are actually doing this.
Re: Can I install Debian without permanently enabling ssh?
August 26, 2017 11:04PM
bodhi Wrote:
-------------------------------------------------------
> haridsv,
> > I am wondering if I can just follow a debian insta
> > llation guide or if I must first enable ssh perman
> > ently, using the serial cable method. I don't have
> > a cable right now and never did anything like that
> > , so it would make my life much easier if that is
> > not required.
> >
>
> It is OK not to have serial console. You can insta
> ll Debian in stock OS after SSH into it. But you w
> ill need to be careful to follow instruction to in
> stall [url=http://forum.doozan.com/read.php?2,1209
> 6]Debian[/url], and [url=http://forum.doozan.com/r
> ead.php?3,12381]U-Boot[/url].
>
> Because at the minimum, you will need to change so
> me u-boot envs to boot with the Debian rootfs on U
> SB. Without serial console, you can't fix some mis
> take easily, if at all. So if you are willing to c
> onnect serial console should something goes wrong,
> then it is OK to proceed.
>
> The Pogo E02 serial console is quite easy to conne
> ct (no soldering needed). Open the box, take a loo
> k at the serial header on the board to confirm tha
> t it is there. After that, you only need to buy a
> 2-3$ serial module converter on eBay (which alread
> y has correct connector on wires that fit the Pogo
> E02 header), and plug it in.

OK, I will double check the serial connection and order a cable, in case I need to troubleshoot the boot problems. I will also do a test boot to make sure my serial cable setup is working.

bodhi Wrote:
-------------------------------------------------------
> If you decide to install my released Debian and U-
> Boot images, then you could proceed and post the e
> ntire session of what you did, [b]before reboot[/b
> ]. I'll double check for you to spot any potential
> problem before you reboot (so that you can avoid c
> onnecting serial console if there were mistakes).

Thank you so much! I will save the session transcript and share.
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 01:02PM
I am flashing u-boot and have some output from erase that is not matching what is expected, so would like to double check.

-bash-3.2# ./flash_erase /dev/mtd0 0 4
Erasing 128 Kibyte @ 60000 -- 100 % complete 
-bash-3.2# ./nandwrite /dev/mtd0 ../uboot.2016.05-tld-1.pogo_e02.mtd0.kwb 
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000

According to the guide, the expected output of erase is:

Erase Total 4 Units 
Performing Flash Erase of length 131072 at offset 0x60000 done

Anything to worry here?
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 01:20PM
bodhi,
I am unclear on what the step 8 in section A is talking about here.
  • There is a special note about /etc/fw_env.config having 0xc0000 as the starting address, but I had to set it to 0xa0000 as I had the stock u-boot. You indicated in the other thread that I don't have to change this until it is rebooted but I would like to double confirm please. I ran fw_printenv without changing the address and it looks fine.
  • Do I need to perform the steps in section B? If so, do I use 0xc0000 address or 0xa0000? I am also not clear how this image is different from the one written in step 8 of section A.
Thank you so much for your ongoing help, much appreciated!
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 01:44PM
I figured I can start over as long as I don't reboot, so I continued with the below steps. Again, the output of erase is not matching what is expected:

-bash-3.2# ./flash_erase /dev/mtd0 0xc0000 1
Erasing 128 Kibyte @ c0000 -- 100 % complete 
-bash-3.2# ./nandwrite -s 786432 /dev/mtd0 ../uboot.2016.05-tld-1.environment.>
Writing data to block 6 at offset 0xc0000

I am not stuck becaues the tools that I downloaded doesn't have fw_setenv. Why is it missing and where can I find it? I saw some reference to doing a soft-link from fw_printenv to fw_setenv, but I haven't tried it because something tells me that this is the high time to update /etc/fw_env.config or it would end up writing to wrong address. Please advise!
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 04:47PM
haridsv Wrote:
-------------------------------------------------------
> I am flashing u-boot and have some output from era
> se that is not matching what is expected, so would
> like to double check.
>
>
> -bash-3.2# ./flash_erase /dev/mtd0 0 4
> Erasing 128 Kibyte @ 60000 -- 100 % complete
> -bash-3.2# ./nandwrite /dev/mtd0 ../uboot.2016.05-
> tld-1.pogo_e02.mtd0.kwb
> Writing data to block 0 at offset 0x0
> Writing data to block 1 at offset 0x20000
> Writing data to block 2 at offset 0x40000
> Writing data to block 3 at offset 0x60000
>
>
> According to the guide, the expected output of era
> se is:
>
>
> Erase Total 4 Units
> Performing Flash Erase of length 131072 at offset
> 0x60000 done
>
>
> Anything to worry here?

Everything looks OK here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 04:48PM
haridsv Wrote:
-------------------------------------------------------
> [*] Do I need to perform the steps in section B? I
> f so, do I use 0xc0000 address or 0xa000
> 0
? I am also not clear how this image is diffe
> rent from the one written in step 8 of section A.
> [/list]
> Thank you so much for your ongoing help, much appr
> eciated!

Don't worry about this. The address is only relevant in the USB rootfs itself after you rebooted.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 04:55PM
haridsv Wrote:
-------------------------------------------------------
> I figured I can start over as long as I don't rebo
> ot, so I continued with the below steps. Again, th
> e output of erase is not matching what is expected
> :
>
>
> -bash-3.2# ./flash_erase /dev/mtd0 0xc0000 1
> Erasing 128 Kibyte @ c0000 -- 100 % complete
> -bash-3.2# ./nandwrite -s 786432 /dev/mtd0 ../uboo
> t.2016.05-tld-1.environment.>
> Writing data to block 6 at offset 0xc0000
>
>

Everything looks good here also.

The output of flash_erase and nandwrite look different from the instruction, because it was a different version. What you are using is most defintely newer than one when I wrote the instruction. The newer version seems to have not printed out the completed list of what going on.

Again, there is no need to worry about the fw_setenv, fw_printenv or fw_env.config. Those are only relevant after you you have booted in Debian. As long as the flashing of u-boot image, and u-boot envs image are shown without error, then it is all OK.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 11:29PM
bodhi Wrote:

> Again, there is no need to worry about the fw_sete
> nv, fw_printenv or fw_env.config. Those are only r
> elevant after you you have booted in Debian. As lo
> ng as the flashing of u-boot image, and u-boot env
> s image are shown without error, then it is all OK

Does this mean, I can ignore all the rest of the steps and go straight to the steps for installing Debian on USB stick? Why do the instructions assume that one is already booted into Debian? Isn't installing U-Boot a precursor to booting into Debian? Is there a different guide that I can follow to start from the factory U-Boot? Sorry if I am missing something obvious here, I may have read too much in too little time to reach this confused state. :(

Honestly, though I am not a complete newbie to tinkering with Linux, the vast number of combinations of factors such as hardware, OS (and OS versions), U-Boot, firmware and guides/blogs is making me dizzy and nauseous. :)

Perhaps there is one guide that is more specific to my needs, which is going straight from a virgin E02 to "Debian on a USB stick", that I can follow?
Re: Can I install Debian without permanently enabling ssh?
August 28, 2017 11:37PM
Should I perhaps follow this guide from feas as is: Pogoplug E02 Debian Linux Installation Guide ? Would it be OK to start over at the stage where I am yet? I normally prefer to understand what is happening under the surface and don't mind getting my fingers dirty, which is why I started looking at the individual guides such as U-Boot setup, Debian installation and Rescue system separately, but at this point I should probably stick to something at a higher level that is proven to work :)
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 12:01AM
haridsv,

> I may have read too much

Yes, you did!

> U-Boot, firmware and guides/blogs is making me diz
> zy and nauseous. :)

Don't worry. Even most seasoned Linux desktop users never installed a boot loader using a manual procedure. So it is understandable if you try to absorp too much information.

> Perhaps there is one guide that is more specific t
> o my needs, which is going straight from a virgin
> E02 to "Debian on a USB stick", that I can follow?

Simply if from stock OS, at command line:

1. Create a rootfs on USB.
2. Install the new u-boot.
3. Reboot

Along the way, what you cannot do or if you get a different outputs than the instruction stated, then just post question about that step.

The instruction I wrote was for all Kirkwood boxes (except where it said otherwise for a specific box such as the HP T5325). So it is quite general and seems intimidating. But that's is what I can do currently. Either I have to write 14 different installation instructions, or finalize the automated installation script ( which I seems never have time to think about, i.e. continuing from what one of our members has done).

So far, you have installled the new u-boot (you still need some adjustments, but it is not going to prevent you from booting). So create the USB rootfs if you have not done so.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 12:08AM
haridsv Wrote:
-------------------------------------------------------
> Should I perhaps follow this guide from feas as is
> : [url=http://forum.doozan.com/read.php?2,29068,29
> 068] Pogoplug E02 Debian Linux Installation Guide[
> /url] ? Would it be OK to start over at the stage
> where I am yet? I normally prefer to understand wh
> at is happening under the surface and don't mind g
> etting my fingers dirty, which is why I started lo
> oking at the individual guides such as U-Boot setu
> p, Debian installation and Rescue system separatel
> y, but at this point I should probably stick to so
> mething at a higher level that is proven to work :
> )

Bodhi's guides work perfectly well. It is a lot to take in at once and there was alot of old and conflicting information at the time I was trying to figure out how to do what you are doing now is the reason I wrote that.
Honestly, I am not really sure where you are in the stage right now but I would listen to what Bodhi has been telling you. He is defiantly the man with the plan.
He has upgraded versions of the software since I wrote that guide and will be providing you with your best bet to getting a working system up and running.
I could have just followed his instructions at that time but I was overwhelmed with all of the differing info on different sites. [b]I should probably have Bodhi remove that post completely so as not to add to the confusion for new people.[/b]

I would suggest right now that you read through Bodhi's guides for u-boot and Debian rootfs each twice and then write out all of the commands you would do for each and have it reviewed before you proceed. Do not worry about differences from other or older post, just use the recent for each. Once you are good you can do each and then worry about the other stuff.

----- edit

HaHAHa looks like I was typing as Bodhi posted



Edited 1 time(s). Last edit at 08/29/2017 12:10AM by feas.
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 12:10AM
bodhi Wrote:
-------------------------------------------------------

> The instruction I wrote was for all Kirkwood boxes
> (except where it said otherwise for a specific box
> such as the HP T5325). So it is quite general and
> seems intimidating. But that's is what I can do cu
> rrently. Either I have to write 14 different insta
> llation instructions, or finalize the automated in
> stallation script ( which I seems never have time
> to think about, i.e. continuing from what one of
> our members has done).

No worries! I am already very appreciative of the time you spend helping users. Besides, I know how difficult it is to support a fully automated solution that is fail-proof and works on multiple configurations, that too without having physical access to all these variations :)

> So far, you have installled the new u-boot (you st
> ill need some adjustments, but it is not going to
> prevent you from booting). So create the USB rootf
> s if you have not done so.

Great! I guess I can still boot into the stock OS (if required) at this point, though I flashed a newer U-Boot. I will go ahead with the additional steps to partition USB drive and install Debian on it.
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 12:11AM
feas Wrote:

> I would suggest right now that you read through Bo
> dhi's guides for u-boot and Debian rootfs each twi
> ce and then write out all of the commands you woul
> d do for each and have it reviewed before you proc
> eed. Do not worry about differences from other or
> older post, just use the recent for each. Once you
> are good you can do each and then worry about the
> other stuff.

Thank you!
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 01:02AM
haridsv,

> Great! I guess I can still boot into the stock OS
> (if required) at this point, though I flashed a ne
> wer U-Boot.

No, you will not be able to do that. Later, you can set it up if wish to do so. The new u-boot default envs will not boot stock OS.

> I will go ahead with the additional st
> eps to partition USB drive and install Debian on i
> t.

Yes.

Since u-boot was flashed successfully, the worse case is you have to connect serial console to monitor the boot activities, if you have any problem. But I don't think you will have problem, because the default envs were set up to be able to boot the Pogo E02/Dockstar/GoflexHome/GoFlexNet automatically with the new rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 01:14AM
Hi feas,

> should proba
> bly have Bodhi remove that post completely so as n
> ot to add to the confusion for new people.

I think it is still valuable for users who are really new to embedded Linux devices and just want to run an automated installation script.

If you put the warning in that says:

"This instruction allow you to run Jeff's old installation script successfully, but it will install a very old version of u-boot and Debian. After this is done, you can upgrade either u-boot, kernel, or both by following instruction in http://forum.doozan.com/read.php?3,12381 and http://forum.doozan.com/read.php?2,12096";.

And say what you think is the best: either skip it altogether and go to the manual instllation, or for a beginner user perhaps it is good to do this first.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 02:36AM
bodhi Wrote:
-------------------------------------------------------
> Hi feas,
>
> > should proba
> > bly have Bodhi remove that post completely so as
> n
> > ot to add to the confusion for new people.
>
> I think it is still valuable for users who are rea
> lly new to embedded Linux devices and just want to
> run an automated installation script.
>
> If you put the warning in that says:
>
> "This instruction allow you to run Jeff's old inst
> allation script successfully, but it will install
> a very old version of u-boot and Debian. After thi
> s is done, you can upgrade either u-boot, kernel,
> or both by following instruction in http://forum.d
> oozan.com/read.php?3,12381 and http://forum.doozan
> .com/read.php?2,12096".
>
> And say what you think is the best: either skip it
> altogether and go to the manual instllation, or fo
> r a beginner user perhaps it is good to do this fi
> rst.

You got it BOSS! But still feel free to kill it if you think it is causing more confusion than it is helping.
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 11:39AM
I am now following steps in Linux Kernel 4.12.8 Kirkwood package and Debian rootfs and here is the transcript so far:

# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.21.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): o
Building a new DOS disklabel with disk identifier 0x84c52df4.

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 
Using default value 1
First sector (2048-15728639, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-15728639, default 15728639): 15728127
Partition 1 of type Linux and of size 7.5 GiB is set

Command (m for help): n
Partition type:
   p   primary (1 primary, 0 extended, 3 free)
   e   extended
Select (default p): p
Partition number (1-4, default 2): 
Using default value 2
First sector (15728128-15728639, default 15728128): 
Using default value 15728128
Last sector, +sectors or +size{K,M,G} (15728128-15728639, default 15728639): 
Using default value 15728639
Partition 2 of type Linux and of size 256 KiB is set

Command (m for help): p

Disk /dev/sdc: 8053 MB, 8053063680 bytes
248 heads, 62 sectors/track, 1022 cylinders, total 15728640 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: 0x84c52df4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048    15728127     7863040   83  Linux
/dev/sdc2        15728128    15728639         256   83  Linux

Command (m for help): a
Partition number (1-4): 1

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
# mkfs.ext4 /dev/sdc1 -L rootfs
mke2fs 1.42.6 (21-Sep-2012)
Filesystem label=rootfs
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
491520 inodes, 1965760 blocks
98288 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2013265920
60 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done 
# mkswap /dev/sdc2 -L swap
Setting up swapspace version 1, size = 252 KiB
LABEL=swap, UUID=dfc91059-3ed1-4fe5-9ba5-7adafbc2c65
# mkdir /tmp/sdc1
# mount /dev/sdc1 /tmp/sdc1
# cd /tmp/sdc1
# tar xjf /initrd/mnt/dev_save/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 
# cd boot
# cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt
# cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
# mv uImage uImage.orig
# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt  uImage
Image Name:   Linux-4.12.1-kirkwood-tld-1
Created:      Tue Aug 29 16:29:34 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3833423 Bytes = 3743.58 kB = 3.66 MB
Load Address: 0x00008000
Entry Point:  0x00008000
# sync
#

Shall I go ahead and try to reboot with this flash drive?
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 06:34PM
haridsv,

So far so good until here.

> Setting up swapspace version 1, size = 252 KiB
> LABEL=swap, UUID=dfc91059-3ed1-4fe5-9ba5-7adafbc2c
> 65


Quote
Installation instruction
1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest U-Boot for Kirkwood then you can use Ext4.

Note the bold instruction. There is no need to create swap partition. I would use a swap file. However, if it is your preference, it won't hurt. You have the rootfs label for partition 1 set correctly below, so the fact that you have rootfs on the 1st partition then it will be OK (if you had created swap on 1st partition and rootfs on 2nd partition then there would be a problem with booting).

Are you root user before this point?

> # mkdir /tmp/sdc1
> # mount /dev/sdc1 /tmp/sdc1
> # cd /tmp/sdc1
> # tar xjf /initrd/mnt/dev_save/Debian-4.12.1-kirkw
> ood-tld-1-rootfs-bodhi.tar.bz2


You should not do step 4. Because you are installing new u-boot at the same time.

Quote
Installation instruction
4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

> # cd boot
> # cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt
> # cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
> # mv uImage uImage.orig
> # mkimage -A arm -O linux -T kernel -C none -a 0x0
> 0008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld
> -1 -d zImage.fdt  uImage
> Image Name:   Linux-4.12.1-kirkwood-tld-1
> Created:      Tue Aug 29 16:29:34 2017
> Image Type:   ARM Linux Kernel Image (uncompressed
> )
> Data Size:    3833423 Bytes = 3743.58 kB = 3.66 MB
> Load Address: 0x00008000
> Entry Point:  0x00008000
> # sync
> #
>

Reverse step 4:

mv uImage uImage.fdt
mv uImage.orig uImage
sync

And you can reboot (if the answer to the "root user" question above was "yes").

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 11:48PM
I reverted the change to uImage and tried to boot and I think it booted fine, but I didn't get the IP address that I assigned it from my router by MAC rule. It looks like the MAC address is now different, so is this the time when we would need to create the fw_env.config and update the ethaddr value?
Re: Can I install Debian without permanently enabling ssh?
August 29, 2017 11:56PM
Also, do I need the instructions for using systemd?
Re: Can I install Debian without permanently enabling ssh?
August 30, 2017 02:49AM
haridsv,

> and I think it booted fine,

Cool!

> but I didn't get the I
> P address that I assigned it from my router by MAC
> rule. It looks like the MAC address is now differe
> nt, so is this the time when we would need to crea
> te the fw_env.config and update the ethaddr value?

That's expected. Because note that I did say you need some adjustment to envs.

These are optional:
fw_setenv arcNumber 3542
fw_setenv machid dd6

These are required:
fw_setenv mtdparts 'xxxxxxxxx'                # you already have the correct mtdparts in the default envs
fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'
fw_setenv dtb_file '/boot/dts/kirkwood-pogo_e02.dtb'  # you already have the correct DTB  in the default envs

Anf the fw_env.config is already defined correctly in the rootfs.

So go ahead. Check them

fw_printenv

And then set ethaddr. Replace xx:xx:xx:xx:xx:xx with the real one.

fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'

And reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Can I install Debian without permanently enabling ssh?
August 30, 2017 06:11AM
bodhi Wrote:
-------------------------------------------------------
> Anf the fw_env.config is already defined correctly
> in the rootfs.
>
> So go ahead. Check them
>
>
> fw_printenv
>
>
> And then set ethaddr. Replace xx:xx:xx:xx:xx:xx wi
> th the real one.
>
>
> fw_setenv ethaddr 'xx:xx:xx:xx:xx:xx'
>
>
> And reboot.

I didn't find the fw* tools installed, so I think I have to copy them in manually, and then soft link fw_printenv to fw_setenv to make these modifications.

Thank you so much for all the time you spent in helping me get this far, much appreciated! I think I am more than half way through now. Since the original factory partition is still in tact, I will also read up on how to get it setup as a rescue partition so that U-Boot can boot using that when the flash drive is not connected. I also need to configure the software such as Samba, Rsyncd and possibly some media software.

Edit: I almost forgot the reason I started with this project.... I need to get Google Cloud Print working :)



Edited 1 time(s). Last edit at 08/30/2017 06:18AM by haridsv.
Re: Can I install Debian without permanently enabling ssh?
August 30, 2017 08:32AM
bodhi Wrote:
-------------------------------------------------------
> Note the bold instruction. There is no need to cre
> ate swap partition. I would use a swap file. Howev
> er, if it is your preference, it won't hurt.

Isn't a swap partition a better option than swap file for setting RAID1 for rootfs, unless of course the swap file is created elsewhere other than the rootfs?
Re: Can I install Debian without permanently enabling ssh?
August 30, 2017 09:06AM
I was able to restore ethaddr and it picked up the right IP address on reboot. Sweet!
Re: Can I install Debian without permanently enabling ssh?
August 30, 2017 01:33PM
> I have to copy them in manually, and then soft lin
> k fw_printenv to fw_setenv to make these modificat
> ions.

The download link was mentioned in the u-boot installation instruction. And also since you have created the rootfs on USB, fw_printenv/setenv binary is already in the rootfs, which can be executed directly while in stock OS, or after booting into Debian.

-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: