9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] I did bad things and 9front won't boot
@ 2023-12-21  1:52 o
  2023-12-21  2:47 ` qwx via 9fans
  2023-12-21  2:56 ` ori
  0 siblings, 2 replies; 4+ messages in thread
From: o @ 2023-12-21  1:52 UTC (permalink / raw)
  To: 9fans

Hello, 

I seem to have done incredibly stupid things to my 9front instance and now on boot I get "panic: unknown keyword in config block: <some character>", followed by a "mount: sys: write on closed pipe pc=0x2008c6" and "mount /srv/boot /root: mount 185: sys: write on closed pipe pc=0x2008c6”.

At this point I did try to drop into a shell, but I can’t figure out from there how I can mount my filesystem (that I can see in the list of things under /dev/sdE0/fsmain). 

By now I’ve also figured out that the panic is happening “here”, in the mergeconf function:
http://git.9front.org/plan9front/plan9front/858893ff8ff8d3abd06742276bcb794f3422bab8/sys/src/cmd/cwfs/config.c/f.html

Is there a way for me to rewrite the config block to sensible defaults by dropping into a shell and/or using a usb drive w/ 9front on it (as if doing an install) to just backstep whatever terrible thing I performed accidentally?

Thanks,

Olivier
------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T110553196be52532-M80f68af8608c2e207405b6cc
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] I did bad things and 9front won't boot
  2023-12-21  1:52 [9fans] I did bad things and 9front won't boot o
@ 2023-12-21  2:47 ` qwx via 9fans
  2023-12-21  2:56 ` ori
  1 sibling, 0 replies; 4+ messages in thread
From: qwx via 9fans @ 2023-12-21  2:47 UTC (permalink / raw)
  To: 9fans

On Thu Dec 21 02:54:25 +0100 2023, o@o5r.ca wrote:
> Hello, 
> 
> I seem to have done incredibly stupid things to my 9front instance and now on boot I get "panic: unknown keyword in config block: <some character>", followed by a "mount: sys: write on closed pipe pc=0x2008c6" and "mount /srv/boot /root: mount 185: sys: write on closed pipe pc=0x2008c6”.

What stupid things did you do to break it?


> Is there a way for me to rewrite the config block to sensible defaults by dropping into a shell and/or using a usb drive w/ 9front on it (as if doing an install) to just backstep whatever terrible thing I performed accidentally?
> 
> Thanks,
> 
> Olivier

Yes, see fqa 9.2.5 [1].  See also fsconfig(8) [2].  What you enter
here depends on your setup.

You may want to subscribe to the 9front mailing list [3] and ask
9front-specific questions there to get better help.

Cheers,
qwx

[1] http://fqa.9front.org/fqa9.html#9.2.5
[2] http://man.9front.org/8/fsconfig
[3] http://fqa.9front.org/fqa2.html#2.2

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T110553196be52532-M0b37e672735d00be2ed8c677
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] I did bad things and 9front won't boot
  2023-12-21  1:52 [9fans] I did bad things and 9front won't boot o
  2023-12-21  2:47 ` qwx via 9fans
@ 2023-12-21  2:56 ` ori
  2023-12-21 11:00   ` Olivier Tremblay
  1 sibling, 1 reply; 4+ messages in thread
From: ori @ 2023-12-21  2:56 UTC (permalink / raw)
  To: 9fans

At a guess, you tried to run something like:

        mount /dev/sdXX/cache

which will try to negotiate a version with your raw disk data,
and write a Tversion message to the first block of your disk.
You want to mount the 9p service which lives in /srv/cwfs.

You can probably either write it back manually, or using the
fs recovery console, documented (er, kinda) in fsconfig(8).

For reference, the fsconfig should look like:
        
        filsys main c(/dev/sdN0/fscache)(/dev/sdN0/fsworm)
        filsys dump o
        filsys other (/dev/sdN0/other)
        noauth
        newcache
        blocksize 16384
        daddrbits 64
        indirblks 4
        dirblks 6
        namelen 144
        cpu% read -c 1024 /dev/sdN0/fscache
        service cwfs
        filsys main c(/dev/sdN0/fscache)(/dev/sdN0/fsworm)
        filsys dump o
        filsys other (/dev/sdN0/other)
        noauth
        newcache
        blocksize 16384
        daddrbits 64
        indirblks 4
        dirblks 6
        namelen 144


Quoth o@o5r.ca <o@o5r.ca>:
> Hello,
> 
> I seem to have done incredibly stupid things to my 9front instance and now on boot I get "panic: unknown keyword in config block: <some character>", followed by a "mount: sys: write on closed pipe pc=0x2008c6" and "mount /srv/boot /root: mount 185: sys: write on closed pipe pc=0x2008c6”.
> 
> At this point I did try to drop into a shell, but I can’t figure out from there how I can mount my filesystem (that I can see in the list of things under /dev/sdE0/fsmain).
> 
> By now I’ve also figured out that the panic is happening “here”, in the mergeconf function:
> http://git.9front.org/plan9front/plan9front/858893ff8ff8d3abd06742276bcb794f3422bab8/sys/src/cmd/cwfs/config.c/f.html
> 
> Is there a way for me to rewrite the config block to sensible defaults by dropping into a shell and/or using a usb drive w/ 9front on it (as if doing an install) to just backstep whatever terrible thing I performed accidentally?
> 
> Thanks,
> 
> Olivier

------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T110553196be52532-Mea1e17036a202917e1169d92
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

* Re: [9fans] I did bad things and 9front won't boot
  2023-12-21  2:56 ` ori
@ 2023-12-21 11:00   ` Olivier Tremblay
  0 siblings, 0 replies; 4+ messages in thread
From: Olivier Tremblay @ 2023-12-21 11:00 UTC (permalink / raw)
  To: 9fans

Quoth ori@eigenstate.org:
> At a guess, you tried to run something like:
> 
>         mount /dev/sdXX/cache

That is exactly what I tried to do.  I was experimenting with writing
my own filesystem.  I also am new at writing C, I mostly have done Go
in my career so far.  I then made unfortunate life choices and decided
to put my compiled program in cpurc.local.  Program crashes, yours
truly tries to mount the filesystem because, you know, that's what one
does when they've only ever done Linux things, hilarity ensues.


That being said, I apparently managed to successfully use ed to put
the correct values (adapted from what you provided) in place in
/dev/sdE0/fsmain, which is the thing I had utterly destroyed.


Thanks for the help!

Olivier


------------------------------------------
9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T110553196be52532-M90757b166b87b90f9541b84b
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

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

end of thread, other threads:[~2023-12-21 11:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-21  1:52 [9fans] I did bad things and 9front won't boot o
2023-12-21  2:47 ` qwx via 9fans
2023-12-21  2:56 ` ori
2023-12-21 11:00   ` Olivier Tremblay

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).