helloSystem / ISO

helloSystem Live and installation ISO
https://github.com/helloSystem/
BSD 3-Clause "New" or "Revised" License
806 stars 58 forks source link

Allow vi (or a more friendly editor) to work in single user mode #75

Closed grahamperrin closed 3 years ago

grahamperrin commented 3 years ago

Spun off from https://github.com/helloSystem/ISO/issues/68#issuecomment-753427257

… critically, vi does not work.

image

`vi: No terminal database found

probonopd commented 3 years ago

Have you tried nano?

probonopd commented 3 years ago

Don't forget mount -uw / to mount r/w

grahamperrin commented 3 years ago

Thanks, I had performed the mount command on previous occasions.

Continuation of the VirtualBox session:

image

probonopd commented 3 years ago

Seems related:

Maybe you can figure something out. Are we still shipping vi? It may be a candidate for removal to get the ISO smaller.

grahamperrin commented 3 years ago

Result of exit – an unexpected halt:

image

Expected: exit to multi-user mode.

Guest machine reset. Reproducible with a simple exit immediately after gaining the command prompt in single user mode:

https://user-images.githubusercontent.com/192271/103453231-c317f300-4ccf-11eb-9643-6599fb977190.mp4

hello-13.0-CURRENT-2d0fc2a-amd64.iso


I see (probably older) hello-13.0-CURRENT-488dd3a-amd64.iso at https://github.com/helloSystem/ISO/releases – I'll retry with that.

The same with today's hello-0C139-12.1-amd64.iso: unexpected halt in response to exit.

grahamperrin commented 3 years ago

vi

https://github.com/helloSystem/ISO/issues/75#issuecomment-753443170

… may be a candidate for removal to get the ISO smaller.

I dislike vi but removal may be highly contentious.

Defocusing from single user mode

It's not yet clear whether my (environment) preference for nano in lieu of vi is contributory to mergemaster misbehaving; see the foot of https://lists.freebsd.org/pipermail/freebsd-current/2021-January/078083.html.

probonopd commented 3 years ago

I dislike vi but removal may be highly contentious.

I see, it is currently in base... let's not remove it for now then.

probonopd commented 3 years ago

Can we close this issue since nano works?

grahamperrin commented 3 years ago

Above https://github.com/helloSystem/ISO/issues/75#issuecomment-753442991 I could not find nano in the file system.

More generally, commands such as these fail unexpectedly in single user mode:

probonopd commented 3 years ago

Let's not change any FreeBSD defaults for single user mode. That is "low level stuff" and it best works if it is 1:1 FreeBSD.

probonopd commented 3 years ago

Please clarify that with "single user mode" you mean a Live system booted with -s or an installed system booted with -s.

Only the latter should work as usual in FreeBSD. The former is not for users, only for the developers of the Live system.

You will land here:

https://github.com/helloSystem/ISO/blob/1adff8e926328ba98fcaa02cea8b24190945640e/overlays/ramdisk/init.sh#L45

grahamperrin commented 3 years ago

To clarify:

probonopd commented 3 years ago

Yes, because the single user mode in helloSystem is used to debug its ramdisk. So I think this works as intended.