9front - general discussion about 9front
 help / color / mirror / Atom feed
* Re: [9front] Need help with configuring the Internet
@ 2019-06-11  9:49 vp
  2019-06-11 13:26 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: vp @ 2019-06-11  9:49 UTC (permalink / raw)
  To: 9front

Did you follow the FQA instructions to build and install the
new kernel to your 9fat partition?

Build: http://fqa.9front.org/fqa5.html#5.2.2
Install: http://fqa.9front.org/fqa7.html#7.2

	- kvik



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-17  7:24 cinap_lenrek
  2019-06-17  8:59 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: cinap_lenrek @ 2019-06-17  7:24 UTC (permalink / raw)
  To: 9front

once you get packets flowing, please report back so we can add the
pci device id permanently to the driver.

good luck.

--
cinap


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-17  6:58 cinap_lenrek
  2019-06-17  7:21 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: cinap_lenrek @ 2019-06-17  6:58 UTC (permalink / raw)
  To: 9front

> Or perhaps there is another way to configure the net without
> running confignet? I merely tried that because that was the
> install step that failed...

all that does is to write some default configuration in /lib/ndb/local.
you can just set that up manually. the fqa has some examples.

> ip/ipconfig doesn't work, but it's probably because dhcp doesn't work
> in this network (I have to manually type in the ip addresses for other
> systems too).
> The output is:
> ipconfig: no success with DHCP

yes. you got a ethernet driver up.

> As for ls /net/ether*, there is a /net/ether0, so I guess there is
> ethernet afterall?

yes.

> The first step for troubleshooting at
> http://fqa.9front.org/fqa6.html#6.2.8 told me to do
> "cat /net/ndb", which returned nothing, so I just assumed ethernet is
> not working here.

/net/ndb contains the data that the *DHCP/SLAAC* client gathered. for
static ip configuration, that file shall remain empty.

please read ipconfig(8) manpage and the fqa. it should have some
chapter about setting up static ip. its easy, but i do not want to
repeat everything for everyone each time when its already documented.

> Also, I should provide you cat /dev/kmseg with a screenshot, since the
> messages are long
> (I'm actually seeing a lot of "failed"..). However, I'm unsure of how
> to attach the picture
> on a mailing list like this. Is using sites like imgur.com ok?

given that you got ethernet working now, theres no need anymore.

--
cinap


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-17  4:19 cinap_lenrek
  2019-06-17  5:01 ` 염준혁
  2019-06-17  6:45 ` 염준혁
  0 siblings, 2 replies; 29+ messages in thread
From: cinap_lenrek @ 2019-06-17  4:19 UTC (permalink / raw)
  To: 9front

> I followed your instructions until reboot. What I usually do
> for reboot is just hit ctrl+alt+del, then wait a few seconds until Plan9
> Console pops up. Is this not the right way to reboot the system?
> I saw this method somewhere on the Internet although I can't recall where.

its fine for a netbooted terminal. for a fileserver or a terminal
with a local disk, this can cause filesystem corruption. the way to
reboot a machine with disk is fshalt(8).

> Other than that, echo $objtype returns amd64 (I did change plan9.ini
> to point to amd64),
> and also the short terminal output that pops up before Plan9 Console
> does say boot=9pc64 somewhere in the middle. So up to this point, I'm
> assuming the
> kernel file loaded is 64-bit Intel...

looks good.

> Anyways, the Internet still does not work..

i have not followed that coversation.

> Running /bin/inst/main, then typing in 'confignet' returns "Could not
find ethernet card".

i dont understand, you already have a installation? theres no official
amd64 install disk. if you just want to see what ethernet devices have
been detected you can just do:

ls /net/ether*

to get ip by dhcp on the first interface, you run:

ip/ipconfig

> I checked the line for ether82563.c at line 1986 (this is where I
> modified, according to ori's solution)

if you are unsure, you can put a "print("XXX\n");" statement there
before the: "return i219;":

how was the 0x15bc device id determined?

> and the line is still there (case 0x15bc:), so I believe the changes
> applied, although it's hard for me
> to check if it applied to the kernel binary I'm currently running it with.

... add a print statement is the best test here... you can disassemble
kernel binary and check, but it is unclear if that is the actual binary
being run.

> Maybe merely adding a case wasn't enough to get rid of the "Could not
> find ethernet card"?
> Although I expected at least some other error message when I applied
> this change...

possible, check the kernel prints:

cat /dev/kmesg

--
cinap


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-14  1:16 cinap_lenrek
  2019-06-17  3:56 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: cinap_lenrek @ 2019-06-14  1:16 UTC (permalink / raw)
  To: 9front


> 4. (I'm not sure if i did 9fs 9fat again..)

> rm /n/9fat/9bootfat
> cp /386/9bootfat /n/9fat/
> chmod +al /n/9fat/9bootfat # defrag magic

this is unnecessary. as you'r reinstalling the BOOTLOADER here.
it changes so unfrequently that; i'd say unless you need it fixed;
you never need todo this.

> One thing I didn't do, was mk install one more time on
> /sys/src/9/pc64. I assumed mk install on
> /sys/src will create every necessary binaries, including the ones for
> /sys/src/9/pc64. So is that
> a necessary step?

yes, this is necessary. running mk in /sys/src only compiles the
userspace binaries (and libraries) for the current $objtype arch.
however, there are multiple kernels per architecture so these
need to be build explicitely.

the kernel build copies some userspace programs into the kernel
during build such as disk fileservers and utilities like
ipconfig. it also shares libc with userspace. so having
/sys/src built is a prerequirement for then building a kernel.

anyway, to build the kernel you just do:

cd /sys/src/9/pc64
mk install

then the resulting kernel file is /amd64/9pc64 which you can
then copy to 9fat:

9fs 9fat
cp /amd64/9pc64 /n/9fat

now you can reboot. hit any key until you see the > prompt
(this is the bootloader) and then type:

bootfile=9pc64
boot

you'r now running amd64 kernel. if that worked, you can mount
9fat again and change plan9.ini to always point to 9pc64
instead of the 386 kernel (9pc) by changingt the bootfile=
line.

a little trick. the plan9 partition has the 9fat right
at its start. so it is possible to mount the 9fat from
linux or windows. this can be handy in case you need to
edit plan9.ini... or restore a working kernel in case you
messed one up. so you might skip the bootloader step
above and edit bootfile= line in plan9.ini right away
if you have some other way to access the 9fat.

good luck.

--
cinap


^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-13  8:48 ori
  2019-06-14  0:52 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: ori @ 2019-06-13  8:48 UTC (permalink / raw)
  To: skhds1, ori; +Cc: 9front

> echo $objtype DID return 386, so I looked back and
> I'm guessing I missed these steps :
> 
> bind -b '#S' /dev # bind the local hard drive kernel device over /dev
> 9fs 9fat /dev/sdXX/9fat # specify the full path to the corresponding 9fat
> 
> I might have missed more. Anyways, echo $objtype now
> returns amd64. Unfortunately, running confignet still returns
> "Could not find ethernet card."

Yes, you might have missed more, but since you didn't tell us what
you actually did, step by step, we can't help you.

Please post the exact steps you took to rebuild the kernel,
install it, and reboot into the new kernel.
 
> Nevertheless, thanks for all your help. I think I might have missed more steps
> during install, so I'll take some time on it, and also just learning more
> about the system itself. I think I might be bothering you guys too
> much by now :)

Good questions aren't a problem. Make sure you give all the detail
you can when you ask. I should be able to reproduce the state of the
system based on the information you give.

Read https://www.mikeash.com/getting_answers.html



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-11 16:15 ori
  2019-06-12  1:14 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: ori @ 2019-06-11 16:15 UTC (permalink / raw)
  To: skhds1, 9front

> Yes, that was the part of the manual that I was following.
> Although, I might have missed some few steps..
> 
>  It is on a 64-bit system, so I followed the amd64 instructions,
> although I did try 386 and yielded the same results.

The 9front installer defaults to 32 bit. If you haven't followed
thie instructions in http://fqa.9front.org/fqa8.html#8.9,
you're probably still on a 32 bit install.

Echo $objtype to confirm. It will say '386' on a 32 bit x86
install, or 'amd64' on a 64 bit install.



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-10 15:51 ori
  2019-06-11 11:10 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: ori @ 2019-06-10 15:51 UTC (permalink / raw)
  To: skhds1, ori; +Cc: 9front

> Looking at http://fqa.9front.org/fqa3.html#3.2.3.1 (list of known
> working hardware)
> I can't seem to find the Ethernet hardware with vid/did of 8086/15bc.
> The motherboard I'm using is relatively new (B360 D3H), so
> I'm guessing either the fqa is not updated yet or the appropriate
> driver isn't yet implemented. I'll try looking around for some more
> information...

If it was known to be working, you wouldn't have to add the PCI ID to
the driver. Still, it looks like a new ID for a known chip.

Try this change:

diff -r b703b47e2940 sys/src/9/pc/ether82563.c
--- a/sys/src/9/pc/ether82563.c	Sat Jun 08 15:56:03 2019 +0930
+++ b/sys/src/9/pc/ether82563.c	Mon Jun 10 08:50:44 2019 -0700
@@ -1987,6 +1987,7 @@
 	case 0x1570:		/* i219-v */
 	case 0x15b8:		/* i219-v */
 	case 0x15b9:		/* i219-lm */
+	case 0x15bc:		/* i219-v */
 	case 0x15d6:		/* i219-v */
 	case 0x15d7:		/* i219-lm */
 	case 0x15d8:		/* i219-v */



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-10  6:59 ori
  2019-06-10  8:44 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: ori @ 2019-06-10  6:59 UTC (permalink / raw)
  To: skhds1, ori; +Cc: 9front

> Aside from all this, I managed to run confignet!
> It was done simply by running "main" on /bin/inst.
> The message I got was
> 
> "Could not find ethernet card"
> 
> This system used to run Linux and Internet worked then, so
> I'm guessing it's lack of drivers or something similar. I'm going to
> have to do a little more digging for this... (for one, I don't even know
> which ethernet card I have on my system).

Yes, you're probably right. it's likely to need a patch. Often, the
change is just adding a new PCI ID to a driver that already exists.

`pci -v` will tell you what card you have. You should see a line
like:

	0.25.0:	net  02.00.00 8086/1502   5 0:f7c00000 131072 1:f7c39000 4096 2:0000f081 32
		Intel Corporation 82579LM Gigabit Network Connection (Lewisville)

 From there, we can tell if it's a variation of something a driver
already exists for or not.



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-10  6:54 ori
  0 siblings, 0 replies; 29+ messages in thread
From: ori @ 2019-06-10  6:54 UTC (permalink / raw)
  To: skhds1, ori; +Cc: 9front

> Thanks for your reply. It really answered everything I needed to get going.
> 
> Of course, things aren't working as expected, mostly
> due to me being more familiar to Linux environments.
> I'm trying out many things, but the two most hindering
> problems at this point is the different uses of "grep" and "export".
> 
> Starting with grep, what I mostly use is  :
> 
> grep -ri "keyword" ./
> 
> Now this obviously doesn't work here, so I read the manual and tried :
> 
> grep -i -e "keyword" ./

Plan 9 grep doesn't recurse. Pass it the list of files instead.

	grep foo `{walk -f .}

The utility script in /bin/g has also recently been modified to
grep recursively. However, if you don't have internet working yet,
you probably don't have the updated version.

> The second part, "export", is the real problem for me though,
> because I don't even know where to look in this case.
>
> Many scripts including ndbsetup and confignet seems to use the keyword "export".
> Usually in Linux, I would just be able to use it and it will set-up the
> environment variable for me. Plan9-based systems seems to be different,
> as just naively typing in command export (or using the scripts) returns
> 
> can't open export: 'export' directory entry not found
> 
> I've tried "man exportfs" (that's what google shows me at least), but
> I don't think
> that was what I was looking for. In this case, just a pointer to the manual
> that explains the export mechanism would be enough for me. A suggestion to
> read the Plan9 manual is also welcome :) I'm actually considering it since I
> seem to lack too much understanding of this system right now.

You don't need export.

Plan 9's shell, rc, exports environment variables by default.
However, it caches them when they are set, so that they're not
re-read on every use.

The `export` you see in /bin/inst is a shell function defined
in /bin/inst/defs:130, to work around the caching when child
scripts modify the environment. (On plan 9, this is possible.
On unix, this is not possible.)



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-10  6:43 vp
  2019-06-10 12:47 ` Ethan Gardener
  0 siblings, 1 reply; 29+ messages in thread
From: vp @ 2019-06-10  6:43 UTC (permalink / raw)
  To: 9front

> grep -i -e "keyword" ./

Note also that the rc(1) shell uses only one type of quote, a
single quote, the double quote is a regular character just
like any other.  This means your grep query searched for a
literal string "keyword".

> A suggestion to read the Plan9 manual is also welcome :)
> I'm actually considering it since I seem to lack too much
> understanding of this system right now.

I will whole-heartedly recommend you doing so.  The System
may feel familiar because of its UNIX roots, but there are
enough differences in detail and in general approach to
doing things that taking it up as learning a wholy new thing
is very much advisable.

The papers in /sys/doc, the supplemental choice of documents
on cat-v.org, the manual pages, the source code itself, and
spending some time hanging out with and getting to know the
community and its ways should, in no particular order, be
enough to jeopardize your (prospective) computer-themed
career.



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Re: [9front] Need help with configuring the Internet
@ 2019-06-07  5:00 ori
  2019-06-10  4:46 ` 염준혁
  0 siblings, 1 reply; 29+ messages in thread
From: ori @ 2019-06-07  5:00 UTC (permalink / raw)
  To: skhds1, 9front

> Hello, newbie here.
> 
> I've installed 9front for 64bit (I did the cross-compiling too), but
> there was some failure during "confignet", so the internet overall is
> not working (cat /net/ndb returns nothing).
> 
> I thought at that time that I can just run that later, but I am having
> trouble doing so. Also, since I just bypassed that part, I can't
> recall the message for it.
> 
> So my question boils down to :
> 
> 1. Can I run confignet again AFTER installation? If there is, can you
> point me to the right methods?


I've never done re-run the installer after installation, but it's still
around:

	ls /bin/inst/

Note that inst/confignet only sets some environment variables for
future steps to run, but doesn't actually save them. That appears to
be done in

	inst/ndbsetup

Inst/ndbsetup appends a line to /lib/ndb/local. On my system, that line
looks somewhat like:

	sys=meathoook ether=560001dbcf68
 
> 2. I am unsure of how I can diagnosis the network problem when the
> installation itself failed, so a direction of where to look might be
> nice.

Take a look at 'man ipconfig', which is used for configuring your
network cards. Running it manually should give you either a working
network or some errors that can be debugged.

> Re-installing won't really be a problem right now, as I haven't done
> anything that extensive in my current system. So I am considering that
> as an option, although I'm feeling a little bit too lazy for it.

You also learn more from fixing a broken system.

> Also, I'm new to mailing lists in general (I am not an expert
> programmer and my current job is to write Javascripts for a web
> page...), and this is basically my first mail to any mailing lists, so
> please understand if I'm doing something wrong.

Nope. Nothing wrong.

> Anyways, thanks in advance! I'm looking forward to tinkering with my
> new 9front system :)
> 
> Thank you,
> Joonhyeok Yeom.



^ permalink raw reply	[flat|nested] 29+ messages in thread
* Need help with configuring the Internet
@ 2019-06-07  4:46 염준혁
  2019-06-07  5:34 ` [9front] " Stanley Lieber
  0 siblings, 1 reply; 29+ messages in thread
From: 염준혁 @ 2019-06-07  4:46 UTC (permalink / raw)
  To: 9front

Hello, newbie here.

I've installed 9front for 64bit (I did the cross-compiling too), but
there was some failure during "confignet", so the internet overall is
not working (cat /net/ndb returns nothing).

I thought at that time that I can just run that later, but I am having
trouble doing so. Also, since I just bypassed that part, I can't
recall the message for it.

So my question boils down to :

1. Can I run confignet again AFTER installation? If there is, can you
point me to the right methods?
2. I am unsure of how I can diagnosis the network problem when the
installation itself failed, so a direction of where to look might be
nice.

Re-installing won't really be a problem right now, as I haven't done
anything that extensive in my current system. So I am considering that
as an option, although I'm feeling a little bit too lazy for it.

Also, I'm new to mailing lists in general (I am not an expert
programmer and my current job is to write Javascripts for a web
page...), and this is basically my first mail to any mailing lists, so
please understand if I'm doing something wrong.

Anyways, thanks in advance! I'm looking forward to tinkering with my
new 9front system :)

Thank you,
Joonhyeok Yeom.


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2019-06-17  8:59 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-11  9:49 [9front] Need help with configuring the Internet vp
2019-06-11 13:26 ` 염준혁
  -- strict thread matches above, loose matches on Subject: below --
2019-06-17  7:24 cinap_lenrek
2019-06-17  8:59 ` 염준혁
2019-06-17  6:58 cinap_lenrek
2019-06-17  7:21 ` 염준혁
2019-06-17  4:19 cinap_lenrek
2019-06-17  5:01 ` 염준혁
2019-06-17  6:45 ` 염준혁
2019-06-14  1:16 cinap_lenrek
2019-06-17  3:56 ` 염준혁
2019-06-13  8:48 ori
2019-06-14  0:52 ` 염준혁
2019-06-14 13:35   ` hiro
2019-06-11 16:15 ori
2019-06-12  1:14 ` 염준혁
2019-06-12  9:25   ` hiro
2019-06-10 15:51 ori
2019-06-11 11:10 ` 염준혁
2019-06-10  6:59 ori
2019-06-10  8:44 ` 염준혁
2019-06-10 10:58   ` 염준혁
2019-06-10  6:54 ori
2019-06-10  6:43 vp
2019-06-10 12:47 ` Ethan Gardener
2019-06-07  5:00 ori
2019-06-10  4:46 ` 염준혁
2019-06-10  5:30   ` 염준혁
2019-06-07  4:46 염준혁
2019-06-07  5:34 ` [9front] " Stanley Lieber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).