[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: qemu redirecting guest output in terminal



	Hi.

On Fri, Oct 26, 2018 at 03:34:55PM +0200, john doe wrote:
> >> Run QEMU this way:
> >>
> >> qemu -hda debian.img -m 1024 -nographic \
> >> 	-kernel vmlinux -append 'console=ttyS0,115200n8' \
> >> 	-initrd initrd.gz
> >>
> >> Replace -kernel, -initrd and -append with '-boot c' after the
> >> installation.
> >> Also consider using '-M q35' instead of old '-M pc' you're using now.
> >>
> > 
> > Thanks to the help of "Dejan Jocic <jodejka@gmail.com>" and to this
> > answer I manage to get the output of the guest redirected in the
> > terminal by using the following command:
> > 
> > PS C:\qemu> clear; & 'C:\Program Files\qemu\qemu-system-x86_64.exe' -hda
> > debian.img -cdrom debian-9.5.0-amd64-netinst.iso -boot d -m 1024
> > -nographic -kernel vmlinuz -append 'console=ttyS0,115200n8
> > DEBIAN_FRONTEND=text priority=low' -initrd initrd.gz
> > 
> > As you can see it is done on Windows and when attempting to install
> > Debian the output is a bit mest up:
> > 
> > Choose the next step in the install process:
> >   1: Choose language [*],
> >   2: Access software for a blind person using a braille display,
> >   3: Configure the keyboard,
> >   4: Detect and mount CD-ROM,
> >   5: Load installer components from CD,
> >   6: Change debconf priority,
> >   7: Check the CD-ROM(s) integrity,
> >   8: Save debug logs,
> >   9: Execute a shell,
> >  10: Abort the installation,
> > Prompt: '?' for help, default=1> 1
> > 
> > Select a language
> > -----------------
> > 
> > Choose the language to be used for the installation process. The selected
> > language will also be the default language for the installed system.
> > Language:
> > ←[22A←[M←[22BPrompt: '?' for help, default=2> ←
> > 
> > Looks like it is character encoding related.
> > 
> > I understand that it is Windows/powershell but if anyone has a hint,
> > that would be awesome! :)

Nah, we don't do Windows here. Way too many quirks for my personal
taste.
What you can try is to replace stdio with telnet:

qemu -hda debian.img -m 1024 \
	-chardev socket,id=tty0,port=5555,server,telnet \
	-serial chardev:tty0 -nographic \
	-kernel vmlinux -append 'console=ttyS0,115200n8' \
	-initrd initrd.gz

Port 5555 is just an example, obviously.
And you'll need telnet, but since you're using Cygwin you should got it
covered.

> > Note that this e-mail is folded by my mailer.

Meaning that I use 'format=flowed'? It's recommended to wrap lines at 72
characters here anyway.


> Using Cygwin the output is not mest up but during the installation I'm
> stuck at:
> 
> "No disk drive was detected. If you know the name of the driver needed
> by your
> disk drive, you can select it from the list.
> Driver needed for your disk drive:
>   1: continue with no disk drive [*], 46: loop,"
> 
> Should I select the default option (1) or what should I do?

No, that means that whatever you did with Cygwin denied QEMU read-write
access to a file that represents a disk drive. An installation is
impossible.

Reco


Reply to: