Welcome! Log In Create A New Profile

Advanced

practical learning - where to start from?!

Posted by InfoScav 
InfoScav
practical learning - where to start from?!
August 15, 2014 06:05AM
Hello everyone!

i have a seagate goflex home (henceforth, gfh), that has debian, webmin, squeezebox server on it. all this was set-up for me by a friend (not in my presence). i wish to learn what all he did, ie, try it out myself. am a linux neophyte, but i have a router that does downloads for me via transmission (set up for me by the same friend), and recently, i learnt how to install optware and transmission on a *(test) pendrive and attach it to the router, so i guess i would be able to handle instructions for this device as well. i wish to do the same thing with the gfh now, ie, use a test-PD for practical learning.

what i want to do:

1. take a test-PD, format and prepare it as required, and replace the presently attached PD on the gfh with this one, and try to learn & redo what all my friend did, and possibly more.

2. install squeezebox server, webmin, and install a torrent-client like vuze/deluge on it (and not transmission), and learn to install any more packages/softwares as and when required.

i have no clue from where to start, except Jeff's tutorial linked to on the first page. info on the net i found is very scattered. tried scouring the forum-pages backwards, from the 36th one, but got confused (wanted a page catering to absolute neophytes). the friend told me to look for davygravy's compact debian iso image. couldn't find. :(

could anyone, bodhi, davygravy, just anyone, please provide me with some links about where/how to start from?

thanks!
Re: practical learning - where to start from?!
August 15, 2014 06:11AM
P.S. - or, would it be recommended to attempt what am wanting to do? handling optware and all seemed easy, but am not sure about this. seems a few notches above. learning curve seems definitely higher. in case if its not recommened, then i would like to just know how to install vuze or deluge (preferably, the latter). :)

please let me know if you need any (more) info/screenshots (i have putty & winscp).



Edited 2 time(s). Last edit at 08/15/2014 06:23AM by InfoScav.
Re: practical learning - where to start from?!
August 15, 2014 10:51AM
Using a new flash drive would be ideal. Just extract the debian rootfs on the new usb drive and replace the existing one. Then go from there.
Re: practical learning - where to start from?!
August 15, 2014 02:24PM
InfoScav,

With GFHome and just starting to learn modding, you should follow Jeff's instruction to install Debian Squeeze on a USB stick:
http://projects.doozan.com/debian/

- Best to have another Linux box (Ubuntu), or Windows PC that you can run Linux VM or Linux Live CD.
- Remember to run the Squeeze script ( http://projects.doozan.com/debian/dockstar.debian-squeeze.sh), not Wheezy script.

After you done and booted in to Debian, then worry about the more advanced stuff:

- you can either upgrade to Wheezy on your USB stick, or
- follow this thread to get the latest rootfs (which runs 3.16 kernel): http://forum.doozan.com/read.php?2,12096
- install the packages that you want.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 16, 2014 02:18AM
grayman4hire Wrote:
-------------------------------------------------------
> Using a new flash drive would be ideal. Just
> extract the debian rootfs on the new usb drive and
> replace the existing one. Then go from there.


bodhi Wrote:
-------------------------------------------------------
> InfoScav,
>
> With GFHome and just starting to learn modding,
> you should follow Jeff's instruction to install
> Debian Squeeze on a USB stick:
> http://projects.doozan.com/debian/
>
> - Best to have another Linux box (Ubuntu), or
> Windows PC that you can run Linux VM or Linux Live
> CD.
> - Remember to run the Squeeze script (
> http://projects.doozan.com/debian/dockstar.debian-
> squeeze.sh), not Wheezy script.
>
> After you done and booted in to Debian, then worry
> about the more advanced stuff:
>
> - you can either upgrade to Wheezy on your USB
> stick, or
> - follow this thread to get the latest rootfs
> (which runs 3.16 kernel):
> http://forum.doozan.com/read.php?2,12096
> - install the packages that you want.


thanks a lot! will do.

as in the tutorial from Jeff, do i need to follow the 'updating uBoot' tutorial too, after removing my presently attached pen-drive, or may i start directly with the installation of debian on the fresh pen-drive?



Edited 2 time(s). Last edit at 08/16/2014 02:19AM by InfoScav.
Re: practical learning - where to start from?!
August 16, 2014 03:04AM
InfoScav,

>
> as in the tutorial from Jeff, do i need to follow
> the 'updating uBoot' tutorial too, after removing
> my presently attached pen-drive, or may i start
> directly with the installation of debian on the
> fresh pen-drive?

Jeff's Squeeze script installs both U-boot and Debian. If you can't boot after running the script, post here. Sometimes it finished without creating some boot files (It's not because of the script, but because of current "debootstrap" issue).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 16, 2014 04:21AM
bodhi Wrote:
-------------------------------------------------------
> InfoScav,
>
> >
> > as in the tutorial from Jeff, do i need to
> follow
> > the 'updating uBoot' tutorial too, after
> removing
> > my presently attached pen-drive, or may i start
> > directly with the installation of debian on the
> > fresh pen-drive?
>
> Jeff's Squeeze script installs both U-boot and
> Debian. If you can't boot after running the
> script, post here. Sometimes it finished without
> creating some boot files (It's not because of the
> script, but because of current "debootstrap"
> issue).


thanks! that's helpful (i was wondering whether i would've to install uboot as well or not).
one of my external HDDs all of a sudden turned RAW, and now am attempting data-recovery from it. will proceed with this gfh & debian-process once am done recovering the data, and then report back here.



Edited 1 time(s). Last edit at 08/16/2014 04:21AM by InfoScav.
Re: practical learning - where to start from?!
August 21, 2014 01:32AM
back to business!

before i proceed, i have a doubt. would request any of you to please assist me clear it.

had a chat with a friend. he suggested me to:

1. first remove the presently attached pen-drive, reboot the gfh, ssh into it.
2. update the uboot using Jeff's script.
3. then put davugravy's NSA320 debian-image onto a pen-drive, attach it to gfh, and boot from it.
4. then upgrade the kernel.

now am confused on what to do - the above, or what bodhi had suggested. could anyone please tell the pros/cons of both the methods?

UPDATE: got to know that the NSA img is squeeze, and kernel is v3.3.2. reading a few posts on people encountering error's on using Jeff's tutorial to download debian, am inclined to use davy's method now.



Edited 2 time(s). Last edit at 08/23/2014 02:57PM by InfoScav.
Re: practical learning - where to start from?!
August 21, 2014 03:02AM
InfoScav

Quote

> 2. update the uboot using Jeff's script.

After this, it really does not matter whether you are going to go through with the installation of Debian on USB or not (2012 U-boot is already installed). Any new wheezy Kirkwood rootfs with kernel 3.x will work. So it is really a prudent beginner's step to do the complete installation just to see how it works. And then, if the Squeeze rootfs on USB causes problem booting, you can the abandon it, and use either davygravy 3.2 rootfs or use my 3.16 rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 21, 2014 01:47PM
bodhi Wrote:
-------------------------------------------------------
> InfoScav
>
>
Quote

> 2. update the uboot using Jeff's
> script.
>
> After this, it really does not matter whether you
> are going to go through with the installation of
> Debian on USB or not (2012 U-boot is already
> installed). Any new wheezy Kirkwood rootfs with
> kernel 3.x will work. So it is really a prudent
> beginner's step to do the complete installation
> just to see how it works. And then, if the Squeeze
> rootfs on USB causes problem booting, you can the
> abandon it, and use either davygravy 3.2 rootfs or
> use my 3.16 rootfs.

thanks bodhi! upon using Jeff's uboot update-script, i got the message that i already have the latest uboot. i suppose i can then move ahead with using Jeff's tutorial then? after that will try the NSA method. after all, this is only for learning, and the test flash-drive will ultimately be discarded, and the already used flash-drive will be reinstated to its position. :)

UPDATE: used Jeff's tutorial to install squeeze. followed the partitioning guidelines, then typed the commands to install squeeze, but get the following error after typing the last command:

Your perl subsystem does not have support for {}
and must be disabled for debootstrap to work
Please disable perl by running the following command

chmod -x /usr/bin/perl

After perl is disabled, you can re-run this script.
To re-enable perl after installation, run:

chmod +x /usr/bin/perl

Installation aborted.

if i type the above command to disable perl, it returns the following prompt:

chmod: /usr/bin/perl: Read-only file system

going through this thread now --> http://forum.doozan.com/read.php?2,8722



UPDATE 2: alright, got it working after going half-way through the above-mentioned thread! installation is underway. :)



Edited 4 time(s). Last edit at 08/21/2014 03:12PM by InfoScav.
Re: practical learning - where to start from?!
August 22, 2014 01:41AM
stuck at a point!

after changing the default password, i gave the address of the Korean debian mirror to the the 'sources.list' file. the shell seemed to then have gotten stuck in an unending loop. i then closed then. since then, whenever i open the shell, it asks me for the uname/pword, and gives a warning that your password has become obsolete. i change it, but this keeps repeating whenever i try to login again.
Re: practical learning - where to start from?!
August 22, 2014 04:52AM
InfoScav Wrote:
-------------------------------------------------------
> stuck at a point!
>
> after changing the default password, i gave the
> address of the Korean debian mirror to the the
> 'sources.list' file. the shell seemed to then have
> gotten stuck in an unending loop. i then closed
> then. since then, whenever i open the shell, it
> asks me for the uname/pword, and gives a warning
> that your password has become obsolete. i change
> it, but this keeps repeating whenever i try to
> login again.

This might be the date time in your system. After you logged into Debian,
date
See if the system time is old (if it is epoc). If it is, then install ntp to get system time updated. And then change your password when you see the date time is current.
apt-get install ntp

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 22, 2014 04:26PM
thanks bodhi, but i was not able to login to either the newly installed debian, or to the rescue system. finally, re-installed the rescue system, and was thus able to login again (into rescue) using the root/root combo.

today/tomorrow i will re-try installing squeeze to the test flash-drive after cleaning and preparing it again, and while finalising the installation, would be careful to not get trapped into the password-issue again (i don't understand how/why it happened in the first place).

i have a doubt - why did you ask to specifically install 'squeeze' first, and not 'wheezy' straightaway? for learning (to upgrade the OS, to 'wheezy' next), or due to any other reason(s)?

P.S. - as you had told, i installed a virtual machine and ubuntu in it today.



Edited 2 time(s). Last edit at 08/22/2014 04:29PM by InfoScav.
Re: practical learning - where to start from?!
August 22, 2014 04:38PM
InfoScav,

Quote

> i have a doubt - why did you ask to specifically
> install 'squeeze' first, and not 'wheezy'
> straightaway? for learning (to upgrade the OS, to
> 'wheezy' next), or due to any other reason(s)?

Learning was the only reason. Jeff's script use the debootstrap process to create rootfs, which is a standard Debian way to do that entirely from the distribution. However, if you have trouble with this process, just go straight to ready-made wheezy rootfs. You can use my rootfs here: http://forum.doozan.com/read.php?2,12096

And scroll down to the section:
Updated 15 April 2014

On a different Linux box, use a freshly formatted Ext3 USB stick, extract the rootfs as described in that section. This is a very basic Debian wheezy rootfs, you can start installing packages that you need, setting up swap file ….

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 22, 2014 04:46PM
alright. thanks a lot! will try.

i had tried to use davy's nsa320 image today. however, wasn't able to log in using it (got logged in to the rescue system instead). reading in the section highlighted by you in the above post (ie, 15th April, 2014), perhaps i've found out why it didn't boot up - if your uBoot env for rootfs type is ext2, then use an ext2 USB drive. this is what caught my attention! i had formatted the flash-drive (and its partitions) in the ext2 format. if my uBoot env for rootfs type happens to be ext3, then a debian-image on a ext2 formatted flash-drive won't boot?!



Edited 1 time(s). Last edit at 08/22/2014 04:47PM by InfoScav.
Re: practical learning - where to start from?!
August 22, 2014 05:14PM
Quote

if my uBoot env for rootfs type happens to be ext3, then a debian-image on a ext2 formatted flash-drive won't boot?!

It won't boot. But the reverse is OK. So that why in my instruction I always recommend using Ext3.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 23, 2014 01:44AM
indeed! i confirm that uboot shows usb rootfs type as 'ext3' on my GFH. i will try with an ext3 formatted flash-drive now. :)
Re: practical learning - where to start from?!
August 23, 2014 10:08AM
hello there, bodhi!

some update(s):

1. after a day's mental gymnastics, was finally able to convert the stable orange light i used to get on attaching the flash-drive having the NSA320 image to GFH, to green now (ie, i figured where i was going wrong in copying the NSA320 image to the flash-drive). i had left at this y'day, so thought of resuming from here only & resolving/taking it to its end, and hence would try Jeff's and your methods after i get over with this.

2. however, now, when i try to SSH, i just get a blank black window on putty, ie, no prompt for entering login details. after a few seconds of this inactivity, the connection times out. the light on the dock stays stable green all this while.

3. if i either try to login to the rescue system (without any flash-drive attached), or to the OS by using my normal original flash-drive, i am able to log in as usual.

4. in all the cases, the router assigns the ip-addr. of 192.168.1.3 to the GFH (ie, when in rescue mode without any flash-drive attached, when with the original/normal flash-drive attached, & when with the test flash-drive with NSA320 image attached). could this be creating any conflict? not able to understand that when upon using NSA320 image, the light on the dock turns to stable green, that means i should be able to boot now into the debian OS (true?!), then why putty turns inactive.

just for info, am using a corsair flash voyager 16GB USB 3.0 flash-drive as the test flash flash-drive. the NSA320 image is currently loaded on it.

please let me know if you need me to furnish env-details or any other thing.



Edited 7 time(s). Last edit at 08/23/2014 10:14AM by InfoScav.
Re: practical learning - where to start from?!
August 23, 2014 03:20PM
phew! am ditching NSA320 image installation. can't get it to boot/log me in. rather, would go ahead with Jeff's method now, and your linux 3.16 kernel and debian wheezy rootfs, one-by-one. the flash-drive that is being used presently (the normal, original drive, set up for my by my friend), is already based on that NSA320 image. so nevermind. will try something different.
Re: practical learning - where to start from?!
August 23, 2014 03:48PM
InfoScav,

Just use my rootfs, extract it to a freshly formatted ext3 USB drive. And boot with it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 24, 2014 01:39AM
very well.
Re: practical learning - where to start from?!
August 29, 2014 03:25AM
bodhi, you rock! \o/

updates:

1. two days back, i was trying to run Jeff's script, this time, for wheezy, and was re-formatting my test flash-drive in virtual Ubuntu. after re-formatting it, i simply disconnected it from the virtual machine, before actually first ejecting it from Ubuntu, and my PC system crashed with a 'cache manager' error! spent the whole night troubleshooting. finally, with Lord's grace, it booted up fine in the morning, after keeping it shut down and disconnected from power for a few hours.

2. then proceeded with installing wheezy using Jeff's script, modifying it as per any error(s) i encountered on the way. after successfully downloading & installing it, found that the dock would boot (i guess so, as the dock's LED would be green and stay solid green all the while), but putty won't ask me to log in. it would just hang up. also, didn't use to get any IP address by the name of 'debian' from my router for the dock (same scenario as was with the NSA320 img). tried different permutations & combinations to rectify the issue, from kernel-updating to some tid-bits here & there, but to no avail.

3. then ultimately today, gave your rootfs a spin, and boy am i glad i did that! terrific! a breeze to install & download/set-up, using your brief & to-the-point instructions! a far cry from what i had been used to trying since the past few days! got an IP addr. by the name of 'debian' from my router instantly, and could log in to debian within seconds without any fuss. though you had written earlier to start from Jeff's script in order to learn, and by that way, i indeed did.

4. a (funny) revelation - my original, non-test flash-drive has infact bodhi's rootfs installed in it! got to know this after i told about the latest update to my friend, who had set-up that flash-drive for me. he told that he just recalled that he had not used davy's NSA320 img, but your rootfs in that flash-drive; he wasn't mindful of that all this while & had forgotten it (he had kept insisting since the past few days that he had used NSA320 img on that flash-drive), and just recalled about the actuality suddenly, on learning about the latest development from me. wild goose chase, in the past few days. :D

thanks a bunch, bodhi, for your asssitance & patience, and ofcourse, the rootfs & the kernel(s)! :)

will now install some packages and test them. will keep posting here from time-to-time.

P.S. - i wish to set-up netconsole. should i set it up like mentioned in step 6 here, or for this rootfs, there's another method/guide?

http://doncharisma.com/2013/09/22/build-your-own-pro-nas-seagate-goflex-net-with-debian-linux-raid1-and-openmediavault/



Edited 1 time(s). Last edit at 08/29/2014 03:25AM by InfoScav.
Re: practical learning - where to start from?!
August 29, 2014 03:52AM
InfoScav,

Cool! glad you got it working. It's not all wild goose chase :) it's good learning experience. Except that you did not give up easily when seeing the problem! so you endd up spending a little more time than if you had just gone to the rootfs installation path sooner.

And to set up netconsole, see Jeff's instruction:
http://forum.doozan.com/read.php?3,14

In this netconsole instruction, for the part about using 2 commands, one to listen, one to send inputs:
nc -l -u -p 6666 &
nc -u 192.168.1.100 6666

You can combine them into one like this, it works the same way:
nc -lup 6666 192.168.1.100 6666

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 29, 2014 07:03AM
yes, learning was the main purpose, and by a lot of reading, and trials-and-errors done in the past few days, i can safely say that i did not fall very short of it. :)

i will try setting up NC tonight. thanks, again!



Edited 1 time(s). Last edit at 08/30/2014 04:38PM by InfoScav.
Re: practical learning - where to start from?!
August 29, 2014 11:01AM
sorry bodhi, i don't quite understand how to apply the instructions on setting up netconsole. i did something, and now the dock has got 2 IP addresses mapped from the router!

pls see:

- my PC (windows) has an IP address of 192.168.1.2
- the dock has an IP addr. of 192.168.1.50
- the virtual machine running ubuntu on my PC has an IP addr. of 192.168.253.128

1. now first of all, which IP address to choose as the server IP? 192.168.1.2, or 192.168.253.128 (i suppose that netconsole-monitoring would be done on ubuntu, so should i use the IP addr. of the virtual machine)?

2. after typing the commands in putty, as illustrated on Jeff's page, do i need to restart the dock, or just let it be, and then proceed to type the
nc -l -u -p 6666
command in the ubuntu terminal?

3. do i need to follow your instructions given here? --> http://forum.doozan.com/read.php?2,9522,9702
i don't understand how to use/start netconsole, and when.

4. after all this, do i need to type the following commands too?

sync
shutdown -h now

or, simply reboot the dock and ubuntu?

P.S. - this is the fw_printenv output:

ethact=egiga0
bootdelay=3
baudrate=115200
mainlineLinux=yes
console=ttyS0,115200
led_init=green blinking
led_exit=green off
led_error=orange blinking
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
mtdids=nand0=orion_nand
partition=nand0,2
stdin=serial
stdout=serial
stderr=serial
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done
usb_scan_list=1 2 3 4
usb_scan_1=usb=0:1 dev=sda1
usb_scan_2=usb=1:1 dev=sdb1
usb_scan_3=usb=2:1 dev=sdc1
usb_scan_4=usb=3:1 dev=sdd1
usb_init=run usb_scan
usb_device=0:1
usb_root=/dev/sda1
usb_rootdelay=10
usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params
usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_bootcmd; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
arcNumber=3089
usb_rootfstype=ext3
ethaddr=00:10:75:28:25:ce
usb_bootcmd=run usb_init; setenv usb_root LABEL=rootfs; run usb_set_bootargs; run usb_boot
rescue_installed=1
serverip=192.168.253.128
ipaddr=192.168.1.50
if_netconsole=ping $serverip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
preboot=run if_netconsole start_netconsole



Edited 8 time(s). Last edit at 08/29/2014 01:56PM by InfoScav.
Re: practical learning - where to start from?!
August 29, 2014 03:57PM
InfoScav,

Your u-boot envs looks good. To run netconsole:

1. The Ubuntu VM (192.168.253.128) network NIC should be set in bridge mode (so it has visibilty both ways to the other machines).

2. On the Ubuntu VM, open a terminal and run
nc -lup 6666 192.168.1.50 6666

3. Power up the GF Home, or reboot if you are running:
shutdown -r now

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



Edited 1 time(s). Last edit at 08/29/2014 04:02PM by bodhi.
Re: practical learning - where to start from?!
August 30, 2014 01:08AM
thanks bodhi! done!

but, i got stuck in the netconsole itself, ie, typing the 'killall nc' command in the ubuntu terminal didn't do anything. LoL. had to physically restart the dock.

below is what prompt i got in the command-terminal, after typing the netconsole command:

press any key to stop automatic boot: 0
GoFlex Net>

is this correct?
Re: practical learning - where to start from?!
August 30, 2014 02:07AM
InfoScav,

> but, i got stuck in the netconsole itself, ie,
> typing the 'killall nc' command in the ubuntu
> terminal didn't do anything. LoL. had to
> physically restart the dock.

If you used the single command I mentioned above, just Ctrl-C to terminate.

>
> below is what prompt i got in the
> command-terminal, after typing the netconsole
> command:
>
>
> press any key to stop automatic boot: 0
> GoFlex Net>
>
>
> is this correct?

Yes, it is correct (you should have got the u-boot banner before that, too). But it's good and running. You have interrupted it at the u-boot count down by typing something on the keyboard, that's why it stopped at the prompt. To continue booting just enter:
GoFlex Net> boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: practical learning - where to start from?!
August 30, 2014 04:22PM
yes, you were correct. i must've pressed some key by mistake to have halted the boot process monitoring in NC.

however, there're (again) some issues now:


PART 01:


when i wrote my last post, everything was working fine. after a while, when i had shut down everything, i started my Ubuntu VM first, then powered up the dock; as a result, my router first assigned an IP addr to Ubuntu VM (192.168.1.50), and then to the dock (192.168.1.51). since earlier, these IP addresses were assigned to the opposite devices (ie, 1.50 was for the dock, and 1.51 was for the VM earlier, before i had shut down everything), i assigned a static IP to the dock and my Ubuntu VM as per the earlier instance only. so in effect, i assigned the following IPs as static IPs to each:

- dock --> 192.168.1.50
- Ubuntu VM --> 192.168.1.51

setup NC on the dock via putty as per Jeff's instructions again.

then, tried the following command from the Ubuntu VM:

nc -lup 6666 192.168.1.50 6666

i got the following error in the command terminal:

nc: cannot assign requested address

Q: what does the cmd-terminal mean by the above error? what could be wrong?



PART 02:


i don't know if the above was due to the hoch-poch earlier, but after a few trials-and-errors, i removed those static IPs. that didn't change the IP addresses of both. they were still the same, ie, 1.50 for the dock, and 1.51 for the VM. i was then able to re-run NC by doing these:

ON PUTTY:

fw_setenv serverip 192.168.1.51
fw_setenv ipaddr 192.168.1.50
fw_setenv if_netconsole 'ping $serverip'
fw_setenv start_netconsole 'setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;'
fw_setenv preboot 'run if_netconsole start_netconsole'

ON UBUNTU VM:

nc -u -l 6666 &
nc -u 192.168.1.50


THEN, AGAIN ON PUTTY:

sync
shutdown -r now

as a result, when the dock started rebooting, i could see the following on my Ubuntu command-terminal (NC window):

root@ohtiam-virtual-machine:~# nc -l -u 6666 &
[1] 4784
root@ohtiam-virtual-machine:~# nc -u 192.168.1.50
This is nc from the netcat-openbsd package. An alternative nc is available
in the netcat-traditional package.
usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length]
	  [-P proxy_username] [-p source_port] [-q seconds] [-s source]
	  [-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol]
	  [-x proxy_address[:port]] [destination] [port]
root@ohtiam-virtual-machine:~# 
U-Boot 2011.12 (Apr 18 2012 - 23:08:20)
Seagate GoFlexNet
arm-none-linux-gnueabi-gcc (Sourcery G++ Lite 2009q3-67) 4.4.1
GNU ld (Sourcery G++ Lite 2009q3-67) 2.19.51.20090709
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   Register 10011 NbrPorts 1
USB EHCI 1.00
scanning bus for devices... EHCI timed out on TD - token=0x80008c80
2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **
Creating 1 MTD partitions on "nand0":
0x000002500000-0x000010000000 : "mtd=3"
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: validate_ec_hdr: bad VID header offset 2048, expected 512
UBI error: validate_ec_hdr: bad EC header
UBI error: ubi_io_read_ec_hdr: validation failed for PEB 0
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
1 bytes read
Found bootable drive on usb 0:1
Loading file "/boot/uImage" from usb device 0:1 (usbda1)
2461416 bytes read
Loading file "/boot/uInitrd" from usb device 0:1 (usbda1)
6362802 bytes read
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2461352 Bytes = 2.3 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-3.14.0-kirkwood-tld-1
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6362738 Bytes = 6.1 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

seeing some success, i again assigned both the machines static IPs, the same ones to each, respectively, as is mentioned above. now, the issues:

1. am getting 2 IP addresses for the same MAC address of the dock, ie, 'debian' gets an IP addr 192.168.1.50, and the dock gets another IP addr (no name), 192.168.1.60.

2. with putty, am unable to log in using 192.168.1.50 now (no response in putty window), whereas, i can log in with 192.168.1.60

3. when using NC this way, i get the boot-info when i use:

nc -u 192.168.1.50

[i wonder if i would get the same boot-info if i use 192.168.1.60 instead in the above command (didn't try it)]

4. points no. 1-3 above are valid if i assign static IPs to the dock and the Ubuntu VM. if i don't assign them static IPs, the dock doesn't get assigned 2 IP addresses; instead, gets assigned only one, its pet IP - 192.168.1.50.

sorry if i confused you. am myself baffled.



P.S. - in the above boot-info, the initial part, that reads:

2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
Loading file "/rescueme" from usb device 0:1 (usbda1)
** File not found /rescueme
reading /rescueme.txt

** Unable to read "/rescueme.txt" from usb 0:1 **

- 2 USB devices, means?

and,

- is there anything wrong with rescue system?



Edited 9 time(s). Last edit at 08/30/2014 04:30PM by InfoScav.
Re: practical learning - where to start from?!
August 31, 2014 08:55AM
InfoScav,

> 1. am getting 2 IP addresses for the same MAC
> address of the dock, ie, 'debian' gets an IP addr
> 192.168.1.50, and the dock gets another IP addr
> (no name), 192.168.1.60.

Your u-boot env ipaddr is the address used for netconsole. So it was good until Debian starts booting. After that, if your /etc/network/interfaces uses DHCP then a different IP addr will be assigned. This is normal. If you can't use static IP in Debian, then you might set the router to reserve this IP based on the MAC address.


> 2 USB Device(s) found
> scanning bus for storage devices... 1
> Storage Device(s) found
> Loading file "/rescueme" from usb device 0:1
> (usbda1)
> ** File not found /rescueme
> reading /rescueme.txt
>
> ** Unable to read "/rescueme.txt" from usb 0:1
> **

> [/code]
>
> - 2 USB devices, means?
>
> and,
>
> - is there anything wrong with rescue system?

Everything looks good, this is normal behavior. And 2 USB devices because the internal hub is one of 2 devices.

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