Article 4YDRT chroot: Can't see first few lines when using vi

chroot: Can't see first few lines when using vi

by
aikempshall
from LinuxQuestions.org on (#4YDRT)
These are the scenarios -
  1. Might have forgotten to create a new grub.cfg or initrd
  2. Need to migrate an existing install to a bigger drive
What I do is
  1. Boot from slackware install disk (14.2)
  2. At the prompt load correct keyboard
  3. logon as root
  4. Mount the existing install as /mnt
  5. chroot /mnt
  6. then do what needs to be done
No problems whatsoever in doing the business. The only problem I have is when I need to edit a file using vi.

When I start vi I can't see the top 8 lines or so of the file being edited. As a workaround once in vi I make sure I'm at the start of the file being edited with the command

1G

I then blindly insert lines until the first line of the file appears on my display

I can then do what needs to be done.

It would be nice if I didn't have to do this in vi.

I think, by writing this post, I'm starting to think of an idea of what I need to do.

Maybe I need to set up some environment variable to let the system know what type of monitor I'm using in chroot? Myabe chroot doesn't automatically kick off any of my profiles.

Any suggestions welcome.

Alexlatest?d=yIl2AUoC8zA latest?i=w5tGzPqGIOI:JQXQRWSQ4sg:F7zBnMy latest?i=w5tGzPqGIOI:JQXQRWSQ4sg:V_sGLiP latest?d=qj6IDK7rITs latest?i=w5tGzPqGIOI:JQXQRWSQ4sg:gIN9vFww5tGzPqGIOI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments