LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
LinkBack Search this Thread
Old 01-26-2007, 11:58 PM   #1
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 65
qemu: Keyboard does not work


Trying to install XP in qemu, but it does not pass keyboard strokes to XP install.

Standard ps/2 keyboard, no mappings.

Running Slackware 11,full install

Running Alien Bob's qemu package, self-compiled kqemu module
 
Old 01-27-2007, 01:42 AM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 464

Rep: Reputation: 43
Funny you should post this the day after i finished doing the same thing!

The only thing I didn't have was the key problem. Can you check these:

1. The window is a key-grab window, make sure you click into it before trying to type anything (obvious, i know ..)
B. Append the -k language switch (see here for languages: http://fabrice.bellard.free.fr/qemu/qemu-doc.html) and force it.
iii. Reduce the other arguments passed at boot time to just the keyboard, hda and cdrom, you can pnp whatever else at a later date (once past the install, everything is much less hinky).

Failing all of that, can you post your invocation line?

- Piete.
 
Old 01-27-2007, 09:19 AM   #3
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Original Poster
Rep: Reputation: 65
Actually, I found out what the issue was:
I was su'd as root...I feel like such a burke.

Ran as user, and got XP jammin right now.

Thanks
 
Old 05-30-2007, 08:50 AM   #4
Castanea_d.
LQ Newbie
 
Registered: May 2007
Location: Iowa, USA
Distribution: grml 0.9
Posts: 8

Rep: Reputation: 0
Thanks for the advice in this thread! I was having the same problem -- Qemu not recognizing keystrokes -- and the -k switch fixed it. I have other problems, but at least this one is solved. My invocation line (for starting out from a Windows 95 boot floppy, with my Win95 CD-ROM in the appropriate drive, and both drives mounted) is:

<qemu -fda /dev/fd0 -hda c.img -k en-us -boot a -no-kqemu>

This gets me to a working A:\ prompt. Next step is to successfully change to the CD-ROM drive, which appears to be C:\. I can get to a C:\ prompt, but when I try something like <dir> or <install.exe>, I currently get this message:

CDR101: Not ready reading drive C
Abort, Retry, Fail

Other drive letters are unhelpful: B:\ seems to be a (non-existent) second floppy drive, D:\, E:\ and on up all return "Invalid drive specification."

Also, the CD-ROM drive is "locked up" in the sense that the eject button does not work. I thought it might help to "eject" the CD and put it back in, in case Qemu was wanting that to happen.

(Edited again to add: I tried invoking Qemu without the CD in the drive. Booting from floppy, it still works as far as it goes. I then put the CD in, and get the same "Not ready reading Drive C" error -- but at least the CD eject button works now )

Again, thanks for the help. I was stuck on the non-working keyboard, and at least that is no longer a problem.

Last edited by Castanea_d.; 05-30-2007 at 09:21 AM.
 
Old 05-30-2007, 11:18 AM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 4,035

Rep: Reputation: Disabled
If you want a CDROM drive inside the QEMU virtual machine, you have to feed qemu a "-cdrom" parameter.

Eric
 
Old 06-01-2007, 12:14 PM   #6
Castanea_d.
LQ Newbie
 
Registered: May 2007
Location: Iowa, USA
Distribution: grml 0.9
Posts: 8

Rep: Reputation: 0
Alien Bob/Eric, thanks for the help. It didn't occur to me to add the “-cdrom” as well as the “-fda.” It works!

So, here is what I now have as an invocation line to install Win95 (having already created the <c.img> file, and with a Windows bootable floppy and the Win95 installation cdrom in the drives):

<qemu -fda /dev/fd0 -cdrom /dev/cdrom -k en-us -hda c.img -boot a -no-kqemu>

This gets me to an A: prompt, from which I can get to a C: prompt, which is the cd-rom, now working properly. After some false starts, I learned that these are the next steps (for my setup):

Return to A:

Run the MS-DOS command <fdisk>. I don't recall if it is automatically part of a Windows “emergency boot” disk or if I copied it onto the disk years ago, but it is very helpful to have. Go ahead and create a primary DOS partition, filling the whole “drive.” (I suppose one could create multiple DOS partitions, but I didn't try).

It says that you must reboot for this to take effect, so I did, via hard-reset (front panel button), as I was unable to get out via Ctrl-Alt-Fx to a tty screen. (This remains a problem even after installing Windows, when I “turn off the computer” from the Windows Start button. It goes to a blank screen and a locked-up computer.)

[Edited (again) to add: Silly me!!! I shouldn't "turn off the computer" from within Windows. I should simply use Ctrl-Alt-Fx while Windows is running. That goes out to the tty screen just fine. If I then want to "turn off" windows, just:

pgrep qemu
kill (whatever number pgrep returned for the process)

One of these days I'll figure out what's going on. ]

[and yet another Edit, the next day: Stupid Newbie Me finally figured out that Qemu is much happier when run within an X environment, and not out at the command prompt as I'd been doing it. I don't know about installation, but for regular operation of Windows, <startx> into your preferred window manager, open an Xterminal or equivalent, invoke Qemu, and now Windows can be shut down from the Windows "Start" button. Also you can go back and forth to other non-Windows application with ease. ]

Suitably re-booted, on to the next step:

<format c:>

I always get the jitters when I use this command, but it worked (without, for example, formatting my “real” drive, with my Linux system on it).

Now I can get a C: prompt, for which <dir> shows an empty disk, formatted and ready to go. And the cd-rom has magically moved to D:

So, from D:, run <setup.exe>.

By golly, it works! It only takes a few moments to get to the “Welcome to Windows Setup” screen. From there it proceeded normally.

In order to start Win95 from my Linux environment, I run

<qemu -hda c.img -fda /dev/fd0 -cdrom /dev/cdrom -k en-us -no-kqemu>

This boots from the <c.img> file, with access to the floppy drive and the cd-rom drive. My computer is old and slow, so the “-no-kqemu” is needed to make it work, and (as I learned) I still need the "-k en-us" in order for the keyboard to work.

Again, thanks for the help!

Last edited by Castanea_d.; 06-02-2007 at 07:53 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
My keyboard doesn't work!!! adrian_mx Debian 3 01-02-2006 10:42 AM
keyboard won't work jmill_1 General 2 12-31-2005 12:12 AM
qemu: qemu stopped right after command exec bitpicker Linux - Software 1 03-04-2005 11:25 PM
Keyboard doesn't work (at all) von Vader Slackware 30 11-08-2004 09:15 AM
keyboard doesn't work in X taoweijia Fedora 1 07-08-2004 10:36 PM


All times are GMT -5. The time now is 09:59 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration