LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Virtual Box + Printer Help!!!! (https://www.linuxquestions.org/questions/slackware-14/virtual-box-printer-help-623744/)

BULPulse 02-25-2008 12:11 PM

Virtual Box + Printer Help!!!!
 
I switched from Vista to Slackware 12.0 a few months ago and loved every minute of it, but i never found a way to use my Dell 922 AIO Printer. I tried using CUPS but they didn't have drive for it. Then I tried using Virtual Box but it seems that when I try to install the driver it can't pick it up that it is connected??? I am using XP pro on Virtual box and Virtual Box picks it up that it is connected as you can see here http://i258.photobucket.com/albums/h.../snapshot7.png
Can you help me solving the problem or suggesting another way to use my Printer

BTW if you know driver that will work with this printer please say so.

T3slider 02-25-2008 10:47 PM

I would also be interested in a solution using VirtualBox (stupid Lexmark...), so if anyone has any suggestions I'd love to hear them (same problem as BULPulse -- it isn't detected in Windows within VirtualBox but is detected by VirtualBox). However, if someone finds a way to get BULPulse's Dell printer working natively in Linux instead of through VirtualBox you can safely ignore my post (it's not that important for me and I don't want to hijack the thread).

H_TeXMeX_H 02-26-2008 04:34 AM

I'm wondering if this is possible even theoretically. To use a VM to run a printer which isn't supported by the host OS, or to use wine for this ? Unfortunately, I don't think there's any solution, I know I've looked for one for a long time. So, I'd also be interested if anyone actually has a solution ... other than throwing the printer out the window and buying a newer better one (which is what I did, I didn't really throw it out the window, I put it in the attic, maybe it'll be supported well one day).

phantom_cyph 02-26-2008 06:14 AM

Yah...this doesn't look so good for you.

BULPulse 02-26-2008 07:41 AM

From what I found so far people have made these printers to work some in VM and some using CUPS but I can't so far :( anyway the driver for Lexmark z600 will work for Dell 922 AIO (and many other Dell/Lexmark printers) but the drivers are for RedHat and i don't know how i can make them work for Slackware?? any suggestions??

H_TeXMeX_H 02-26-2008 01:03 PM

You can convert the RPMs to Slackware installable tgz packages using alien (and others, but this one is best). So, if you know whatever drivers you have will work, then convert and install the RPMs, and report back with problems you have.

phantom_cyph 02-26-2008 01:16 PM

Quote:

Originally Posted by H_TeXMeX_H (Post 3070554)
You can convert the RPMs to Slackware installable tgz packages using alien (and others, but this one is best). So, if you know whatever drivers you have will work, then convert and install the RPMs, and report back with problems you have.

There aren't any. No rpms, debs, bins, tgzs, nothing. It says on the site they don't support linux.

H_TeXMeX_H 02-26-2008 01:42 PM

Quote:

Originally Posted by BULPulse (Post 3070165)
anyway the driver for Lexmark z600 will work for Dell 922 AIO (and many other Dell/Lexmark printers) but the drivers are for RedHat and i don't know how i can make them work for Slackware?? any suggestions??

If the driver for z600 will work, have you tried installing it ?
Like it says here:
http://openprinting.org/show_printer...rk-Z600_Series

BULPulse 02-27-2008 03:53 PM

I will try it as soon as i get some free time

BULPulse 03-01-2008 09:48 AM

Well i tried it but all it did was to load paper so not what i had in mind but at least it did something, i don't know why it didn't work but some claim that it works for them. Maybe i didn't do something so if someone else tried it it might work for them. Thats all i can say :(

H_TeXMeX_H 03-01-2008 10:42 AM

Well, that's definitely a good sign, that means some communication is happening between the printer and drivers. How did you try printing ? Have you tried using 'lp' or 'lpr' to print a file ? Maybe even try it as root.

BULPulse 03-01-2008 12:46 PM

I am still learning to use Slackware as this is my first experience of Linux and i don't know what you just said but the way i tried to print a page was going to localhost:631 and clicking on print test page.

T3slider 03-16-2008 02:08 PM

I successfully got my (Lexmark) USB printer working in Windows 2000 running in VirtualBox. Nifty, now it's no longer a complete paperweight. ;)

I had to add the following line to my /etc/fstab:
Code:

none            /proc/bus/usb    usbfs      devgid=106,devmode=664 0 0
devgid=106 corresponds to the group "vboxusers" (which I think was automatically created by VirtualBox), and therefore only users in that group can print. You can of course create a new group (called "usbusers" or some such thing, or use the plugdev group) and use that (any group containing your user will do, but make sure it excludes users you don't want printing from VirtualBox). To find the group id, check the number beside the appropriate group in /etc/group. MAKE SURE to change this value to the appropriate one, since the group ids in your system will be different than mine.

Before I did this, my printer was listed if I right-clicked on the USB icon in the statusbar in VirtualBox, but was grayed out. Now, it's actually clickable. I installed the printer using the Lexmark drivers (though you should use whatever drivers you would use on Windows appropriate for your printer) and it works perfectly. Unfortunately for me I had to replace the ink cartridges because I had left the (unusable) printer dormant ever since installing Linux and they had dried up, but it is now working nonetheless. The "Add Hardware Wizard" couldn't find the appropriate drivers (because Lexmark ships their drivers separately) and I couldn't find the CD, so I just downloaded them from their website -- you should be able to do the same for any printer brand.

Note that before you boot into VirtualBox you may have to add the USB printer's info in the USB Settings dialog (while the guest OS is NOT running) -- you can get that info from running `VBoxManage list usbhost` (as root?).

If you need more help (or a better explanation) just ask.

BULPulse 03-18-2008 06:56 PM

Quote:

Originally Posted by T3slider (Post 3090513)
I successfully got my (Lexmark) USB printer working in Windows 2000 running in VirtualBox. Nifty, now it's no longer a complete paperweight. ;)

I had to add the following line to my /etc/fstab:
Code:

none            /proc/bus/usb    usbfs      devgid=106,devmode=664 0 0
devgid=106 corresponds to the group "vboxusers" (which I think was automatically created by VirtualBox), and therefore only users in that group can print. You can of course create a new group (called "usbusers" or some such thing, or use the plugdev group) and use that (any group containing your user will do, but make sure it excludes users you don't want printing from VirtualBox). To find the group id, check the number beside the appropriate group in /etc/group. MAKE SURE to change this value to the appropriate one, since the group ids in your system will be different than mine.

Before I did this, my printer was listed if I right-clicked on the USB icon in the statusbar in VirtualBox, but was grayed out. Now, it's actually clickable. I installed the printer using the Lexmark drivers (though you should use whatever drivers you would use on Windows appropriate for your printer) and it works perfectly. Unfortunately for me I had to replace the ink cartridges because I had left the (unusable) printer dormant ever since installing Linux and they had dried up, but it is now working nonetheless. The "Add Hardware Wizard" couldn't find the appropriate drivers (because Lexmark ships their drivers separately) and I couldn't find the CD, so I just downloaded them from their website -- you should be able to do the same for any printer brand.

Note that before you boot into VirtualBox you may have to add the USB printer's info in the USB Settings dialog (while the guest OS is NOT running) -- you can get that info from running `VBoxManage list usbhost` (as root?).

If you need more help (or a better explanation) just ask.

What is the model of the printer?

T3slider 03-18-2008 07:03 PM

It's a Lexmark Z23 (it has just about the crappiest Linux drivers in the world, which would only print one page at a time [ie I'd have to restart the print job for each page] in black and white only). http://openprinting.org/show_printer...um=Lexmark-Z23 lists it as a paperweight. :)

The procedure should work for any printer though (ie it will allow you to install the printer just as you would in native Windows). I have another (network) printer, but it's more of a hassle to print with (it's nowhere near my computer and I have to go get the prints), but now if I need to print something out I can start up VirtualBox (if not already started) and print through my printer, which is located right next to my PC. Very convenient. And, since I often use MS Word under VirtualBox (and sometimes under WINE, depending on the complexity of the document), VirtualBox would already be open and I could just click the "Print" button. Very nice.

BULPulse 03-18-2008 07:19 PM

Quote:

Originally Posted by T3slider (Post 3093256)
It's a Lexmark Z23 (it has just about the crappiest Linux drivers in the world, which would only print one page at a time [ie I'd have to restart the print job for each page] in black and white only). http://openprinting.org/show_printer...um=Lexmark-Z23 lists it as a paperweight. :)

The procedure should work for any printer though (ie it will allow you to install the printer just as you would in native Windows). I have another (network) printer, but it's more of a hassle to print with (it's nowhere near my computer and I have to go get the prints), but now if I need to print something out I can start up VirtualBox (if not already started) and print through my printer, which is located right next to my PC. Very convenient. And, since I often use MS Word under VirtualBox (and sometimes under WINE, depending on the complexity of the document), VirtualBox would already be open and I could just click the "Print" button. Very nice.

That is pretty good :D but I tried it and it is not working, I am tring few things now but I don't know if it will be able to do it. BTW how did you learn everything you know about Linux??

T3slider 03-18-2008 11:22 PM

I'll attempt to talk you through it if you give me some info. Did you get the proper USB settings for you printer? (ie vendor ID etc.). Post them here so I can verify that they are correct. Make sure you added the codes to the "Settings>USB" section for the proper guest OS (click the "Add Empty" icon on the right if there isn't already a default entry -- the entry was already there for me, and I just changed the values [they may have even already been correct, but I don't remember]). Click "OK". Add the following line to /etc/fstab (or confirm it if you already did it), as posted above:
Code:

none            /proc/bus/usb    usbfs      devgid=106,devmode=664 0 0
Mine is added right at the very bottom of my fstab. Again, change the 106 in "devgid=106" to a group that contains your user. If you created a new group, try restarting your computer to make sure everything is added properly (there are ways of doing it without restarting, but I don't know them offhand. It's probably not even necessary, but it's a good idea to make sure anyway). VirtualBox apparently depends on the usbfs to interface with the USB devices; usbfs isn't set up by default in Slackware (or many other distros). For this, you HAVE to restart as far as I know (fstab sets up mounting options after a restart). There is supposedly a way to get this to work by modifying the permissions on /proc/bus/usb/00#, but it didn't work for me (although I didn't try very hard since it would only be a temporary solution anyway). When I modified the permissions only, without the usbfs, Windows DID detect my printer but when I right-clicked on the USB icon in the statusbar of the VirtualBox window, my printer was still grayed out. Despite Windows recognizing my printer, the driver installation did not detect the printer, and it didn't work. However, after adding the line to fstab, my printer was NOT grayed out and the installation of the drivers went off without a hitch.

If you still have trouble with it, I'd be more than happy to help as long as you provide enough info. Your printer model is different than mine, so it may require some nifty tinkering, but hopefully not. It should be noted that I still have the (crappy) Lexmark drivers installed in Linux (even though they barely work and I don't print from that printer within Linux), so I don't know if that is providing a gateway for Windows to access it or whether the drivers are not required in the first place. I would do some tests but I don't really have the time (plus it's too much effort). However, it suggests that if you can't get it working no matter what through VirtualBox that you may be able to get it working even if you can find half-working Linux drivers. I really don't think it's necessary though (I think it should work without the Linux drivers) because I have many more options in Windows through VirtualBox than in Linux using their poorly-written drivers.

Quote:

Originally Posted by BULPulse
BTW how did you learn everything you know about Linux??

If I appear knowledgeable about Linux in any way then I have successfully fooled you. ;) I just have a knack for anything electronic (although I am studying genetics, I could easily have gone into a career in computer science or programming [despite my limited knowledge of programming, I have an aptitude for it -- although I don't program at all now, I used to enjoy it. My only regret is never really learning C]). I have a friend who consistently asks me why I chose genetics and suggests that I should have AT LEAST majored in computer science. But I didn't. :)

I owe everything I know about Linux to a genuine interest in it and computers in general. I've always loved computers but hated Windows, and felt like I capped out in what I could do in Windows. Then I tried Linux and it opened up a world of new (and basically endless) stuff to learn. I'm an oddity in the Linux world I think -- I read a fair amount before I even burned the discs. I read all of the Beginner's course (and some of the Intermediate course) from http://www.linux.org/lessons/ before installing, and then went through all of the tutorials (omitting a few things I wasn't interested in in the intermediate and advanced courses, like setting up a mailserver) after installing Slackware 11.0 on a junk PC I had in my basement. Since the PC was not being used and I had another PC that I depended on, I could feel free to completely screw things up with no worries (although I actually never managed to screw anything up, strangely). After those courses, which are admittedly dated (some of the Apache stuff is largely irrelevant with Slackware 12.0, since it no longer uses the 1.3.x branch, but was relevant when I started with Slackware 11.0), I just basically read the posts in these forums. I would consider myself a very good internet searcher (I can almost always find what I'm looking for). So, if I ever have trouble with anything, I can generally find an answer without asking for help. If you look back through my posts (you don't have to, I'm just making a point) I ask very few questions and instead just answer what I know (although I have asked the occasional question, as shown in this thread). My original answers were based only on what I knew, which was little. But reading these forums allowed me to learn more and answer more (plus, while finding solutions to problems I have, I learn new stuff). I've never managed to bork any system up, although I probably would have learned more if I had.

If you're looking for something to learn [if you haven't already learned it], try compiling your own kernel (and don't even start with the generic kernel -- try it on your own. If you are really unsure of what the option should be, check what it is in the existing kernel configuration and use that). I still don't know what half (well, more than half) of the options mean -- but I've only managed to screw up a kernel once. Make sure to have a spare working kernel that you can boot from though...;) Have fun, break stuff (if you can afford to) and read.[/life story]

BULPulse 03-19-2008 03:12 PM

Quote:

Originally Posted by T3slider (Post 3093415)
I'll attempt to talk you through it if you give me some info. Did you get the proper USB settings for you printer? (ie vendor ID etc.). Post them here so I can verify that they are correct. Make sure you added the codes to the "Settings>USB" section for the proper guest OS (click the "Add Empty" icon on the right if there isn't already a default entry -- the entry was already there for me, and I just changed the values [they may have even already been correct, but I don't remember]). Click "OK". Add the following line to /etc/fstab (or confirm it if you already did it), as posted above:
Code:

none            /proc/bus/usb    usbfs      devgid=106,devmode=664 0 0
Mine is added right at the very bottom of my fstab. Again, change the 106 in "devgid=106" to a group that contains your user. If you created a new group, try restarting your computer to make sure everything is added properly (there are ways of doing it without restarting, but I don't know them offhand. It's probably not even necessary, but it's a good idea to make sure anyway). VirtualBox apparently depends on the usbfs to interface with the USB devices; usbfs isn't set up by default in Slackware (or many other distros). For this, you HAVE to restart as far as I know (fstab sets up mounting options after a restart). There is supposedly a way to get this to work by modifying the permissions on /proc/bus/usb/00#, but it didn't work for me (although I didn't try very hard since it would only be a temporary solution anyway). When I modified the permissions only, without the usbfs, Windows DID detect my printer but when I right-clicked on the USB icon in the statusbar of the VirtualBox window, my printer was still grayed out. Despite Windows recognizing my printer, the driver installation did not detect the printer, and it didn't work. However, after adding the line to fstab, my printer was NOT grayed out and the installation of the drivers went off without a hitch.

If you still have trouble with it, I'd be more than happy to help as long as you provide enough info. Your printer model is different than mine, so it may require some nifty tinkering, but hopefully not. It should be noted that I still have the (crappy) Lexmark drivers installed in Linux (even though they barely work and I don't print from that printer within Linux), so I don't know if that is providing a gateway for Windows to access it or whether the drivers are not required in the first place. I would do some tests but I don't really have the time (plus it's too much effort). However, it suggests that if you can't get it working no matter what through VirtualBox that you may be able to get it working even if you can find half-working Linux drivers. I really don't think it's necessary though (I think it should work without the Linux drivers) because I have many more options in Windows through VirtualBox than in Linux using their poorly-written drivers.


If I appear knowledgeable about Linux in any way then I have successfully fooled you. ;) I just have a knack for anything electronic (although I am studying genetics, I could easily have gone into a career in computer science or programming [despite my limited knowledge of programming, I have an aptitude for it -- although I don't program at all now, I used to enjoy it. My only regret is never really learning C]). I have a friend who consistently asks me why I chose genetics and suggests that I should have AT LEAST majored in computer science. But I didn't. :)

I owe everything I know about Linux to a genuine interest in it and computers in general. I've always loved computers but hated Windows, and felt like I capped out in what I could do in Windows. Then I tried Linux and it opened up a world of new (and basically endless) stuff to learn. I'm an oddity in the Linux world I think -- I read a fair amount before I even burned the discs. I read all of the Beginner's course (and some of the Intermediate course) from http://www.linux.org/lessons/ before installing, and then went through all of the tutorials (omitting a few things I wasn't interested in in the intermediate and advanced courses, like setting up a mailserver) after installing Slackware 11.0 on a junk PC I had in my basement. Since the PC was not being used and I had another PC that I depended on, I could feel free to completely screw things up with no worries (although I actually never managed to screw anything up, strangely). After those courses, which are admittedly dated (some of the Apache stuff is largely irrelevant with Slackware 12.0, since it no longer uses the 1.3.x branch, but was relevant when I started with Slackware 11.0), I just basically read the posts in these forums. I would consider myself a very good internet searcher (I can almost always find what I'm looking for). So, if I ever have trouble with anything, I can generally find an answer without asking for help. If you look back through my posts (you don't have to, I'm just making a point) I ask very few questions and instead just answer what I know (although I have asked the occasional question, as shown in this thread). My original answers were based only on what I knew, which was little. But reading these forums allowed me to learn more and answer more (plus, while finding solutions to problems I have, I learn new stuff). I've never managed to bork any system up, although I probably would have learned more if I had.

If you're looking for something to learn [if you haven't already learned it], try compiling your own kernel (and don't even start with the generic kernel -- try it on your own. If you are really unsure of what the option should be, check what it is in the existing kernel configuration and use that). I still don't know what half (well, more than half) of the options mean -- but I've only managed to screw up a kernel once. Make sure to have a spare working kernel that you can boot from though...;) Have fun, break stuff (if you can afford to) and read.[/life story]

Thanks for all the information and the help offering. My problem is not with the printer but that after i add the line you said and reboot when i switch on VirtualBox my keyboard doesn't work and my mouse works but i can't see the pointer, when i tried to install driver for the mouse it just failed for some reason :( otherwise it finds the printer

T3slider 03-19-2008 03:47 PM

Hmm...that is VERY strange. I thought the mouse and keyboard was presented falsely to the guest OS using fake drivers (so ANY keyboard and mouse that works in Slackware should work in VirtualBox). I may be wrong though. I'll try and do some searching. Very strange problem.

The only suggestions I have off the top of my head are to play with the Host key settings (before starting the guest OS, go to File>Preferences>Input). Try changing the Host key to something else (I have mine set to the right Ctrl button -- try that and some other keys). Try setting the "Auto capture keyboard" setting on, and then try with it off. As for the mouse, when you start the guest OS, make sure you are NOT in fullscreen mode (press the host key + F to switch to and from fullscreen) and try turning on and off mouse integration. I think your problem might be that you're not pressing the Host key and just trying to type (or maybe not). Try moving the mouse into the window and pressing the Host key. That should turn on your keyboard and mouse for the session. I turned on Mouse Integration (Machine>Enable Mouse Integration or some such thing) and my mouse flows nicely between the guest OS and Linux without needing to press the host key.

I should note that I installed the Guest Additions in VirtualBox (Devices>Install Guest Additions), which may have an effect. Also, you must be using the closed-source version in order for your printer to work (it includes USB access), so if you built it from source then USB won't work (but your mouse and keyboard should).

fcaraballo 03-19-2008 06:39 PM

Remove the usbfs line in fstab and instead add the following to your /etc/rc.d/rc.local file above your other vbox entries (change devgid to a group your user belongs to):
Code:

# Remount usbfs so VBox has access to usb devices:
/sbin/mount -v usbfs /proc/bus/usb -t usbfs -o devgid=10,devmode=0664,remount

There is only one draw back to using usb devices in VirtualBox at the moment. You will be able to capture the ones that show as busy, but once you close VirtualBox you will need to reconnect the usb cable (unplug then replug) so that Slackware can gain access to them again.

MagicMan

T3slider 03-19-2008 10:20 PM

Quote:

Originally Posted by MagicMan
Remove the usbfs line in fstab

What is better about that, out of curiosity? Don't they accomplish the same thing? Are you suggesting that the fstab line screwed up the mouse/keyboard in VirtualBox? (I'm not doubting you, just curious, as I have the fstab line with no side-effects, but am not using a USB mouse or keyboard). Both solutions seem to do the exact same thing to me, so I don't understand the difference...

fcaraballo 03-20-2008 12:52 PM

Quote:

Originally Posted by T3slider (Post 3094537)
Are you suggesting that the fstab line screwed up the mouse/keyboard in VirtualBox?

It's possible. I had similar issues with some USB devices not working like they should after using the fstab entry (the biggest being a printer that wouldn't print right and failed to eject the paper, and not just in VBox). The above entry in rc.local fixed the issues I was having, except the busy capture problem.

Another possibility is that BULPulse might be trying to capture the mouse and keyboard with VBox, which would indeed cause problems. It is not necessary to capture the mouse or keyboard, they should work normally without being captured.

MagicMan

BULPulse 03-20-2008 03:32 PM

Quote:

Originally Posted by MagicMan (Post 3094343)
Remove the usbfs line in fstab and instead add the following to your /etc/rc.d/rc.local file above your other vbox entries (change devgid to a group your user belongs to):
Code:

# Remount usbfs so VBox has access to usb devices:
/sbin/mount -v usbfs /proc/bus/usb -t usbfs -o devgid=10,devmode=0664,remount

There is only one draw back to using usb devices in VirtualBox at the moment. You will be able to capture the ones that show as busy, but once you close VirtualBox you will need to reconnect the usb cable (unplug then replug) so that Slackware can gain access to them again.

MagicMan

That fixed it all :D Thanks alot

EDIT: No it hasn't sorry for the wrong post :(

T3slider 03-20-2008 03:44 PM

BULPulse, is your printer working now (in addition to your mouse and keyboard)?

BULPulse 03-20-2008 04:50 PM

Well actually no it does the same thing as when i tried your method :( when i posted my previous post I should have tested it more but when i saw that VirtualBox is running and i can move my mouse i assumed it worked later to find out that the mouse was on the black area which is why it worked. Maybe the problem comes from me :confused: I don't know. I will now try and explain as good as I can.

First when I added the line in fstab VB found all usb devices but I couldn't use the keyboard at all and i couldn't see the mouse [lets call this method 1] Then I tried the other suggestion so I removed the line from fstab and added the other line in /etc/re.d/rc.local using Text Editor and changed the devgid to the id which workes for me. Then I restarted my PC and tried it again and I thought it worked because I could've seen the mouse when VB is running so i posted but when i tried to actually use VB nothing happened so in conclusion none of the methods worked and made no difference to the outcome. BTW I have tried all the settings in VB and I have the add on for using the mouse in both Linux and VB so I have no idea what is the problem. Is there any way to find why this is not working and how to fix it ????????? PLEASE PLEASE PLEASE help

Sorry for all the troubles and confusion made by me and I apologize for my English

T3slider 03-20-2008 09:31 PM

If you remove the line from rc.local AND fstab, do your keyboard and mouse work? If not then it's a problem with your VirtualBox installation. How did you install it? Using the official binary, or some SlackBuild script, or using a third-party package (eg. from slacky.eu or linuxpackages.net or something)? What kernel are you using? Are you using a custom compiled one or one that came with Slackware 12.0? If it's one that came with Slackware 12.0 (or the newer official one patched for the local exploit), is it the generic, huge, generic-smp or huge-smp kernel? Have you done anything else unusual to your system?

I can't think of anything obvious unless there is something odd with your VirtualBox installation or your system setup. Please answer all of the above questions and I'll try to get back to you. It may be as simple as uninstalling VirtualBox and reinstalling it using the official binary (or maybe a newer version) or something like that. Good luck and sorry I couldn't be more helpful.

BULPulse 03-21-2008 05:10 AM

Quote:

Originally Posted by T3slider (Post 3095539)
If you remove the line from rc.local AND fstab, do your keyboard and mouse work? If not then it's a problem with your VirtualBox installation. How did you install it? Using the official binary, or some SlackBuild script, or using a third-party package (eg. from slacky.eu or linuxpackages.net or something)? What kernel are you using? Are you using a custom compiled one or one that came with Slackware 12.0? If it's one that came with Slackware 12.0 (or the newer official one patched for the local exploit), is it the generic, huge, generic-smp or huge-smp kernel? Have you done anything else unusual to your system?

I can't think of anything obvious unless there is something odd with your VirtualBox installation or your system setup. Please answer all of the above questions and I'll try to get back to you. It may be as simple as uninstalling VirtualBox and reinstalling it using the official binary (or maybe a newer version) or something like that. Good luck and sorry I couldn't be more helpful.

Ok, yes when I remove the lines from rc.local and fstab i can use my keyboard and mouse without any problems. I got VB from their website and installed from source. I am using the original from slackware 12 and i think it is the 2.6.21.5-smp
I haven't done anything unusual to my slackware

T3slider 03-21-2008 04:54 PM

Is it the huge or generic kernel? To find out, try the following:
Code:

$ zcat /proc/config.gz > ~/mykernel
$ diff ~/mykernel /boot/config-generic-smp-2.6.21.5-smp
$ diff ~/mykernel /boot/config-huge-smp-2.6.21.5-smp

Whichever one gives no difference is the one you're using. You said you installed from source. That means you are using the OSE (Open Source Edition), which DOES NOT support USB. You will NEVER get everything working (your USB printer included) if you are using only the OSE, according to their site here: http://www.virtualbox.org/wiki/Editions

In order to get USB (and your keyboard and mouse working at the same time) you HAVE to install the closed-source edition (an installer is provided in binary format -- to install it, you have to type `sh VirtualBox_1.5.6-1_Linux_x86.run` [replacing VirtualBox_1.5.6-1_Linux_x86.run with your version of the installer]). It sucks that this is the case (ie you can no longer install/uninstall with ease using pkgtool), but it's the only way.

As I see it, you have two options. You can forget the USB printer and continue using the open-source edition, or you can accept the fact that you have to use the closed-source version. Neither solution is ideal, but it's your decision in the end.

BULPulse 03-21-2008 08:23 PM

Quote:

Originally Posted by T3slider (Post 3096375)
Is it the huge or generic kernel? To find out, try the following:
Code:

$ zcat /proc/config.gz > ~/mykernel
$ diff ~/mykernel /boot/config-generic-smp-2.6.21.5-smp
$ diff ~/mykernel /boot/config-huge-smp-2.6.21.5-smp

Whichever one gives no difference is the one you're using. You said you installed from source. That means you are using the OSE (Open Source Edition), which DOES NOT support USB. You will NEVER get everything working (your USB printer included) if you are using only the OSE, according to their site here: http://www.virtualbox.org/wiki/Editions

In order to get USB (and your keyboard and mouse working at the same time) you HAVE to install the closed-source edition (an installer is provided in binary format -- to install it, you have to type `sh VirtualBox_1.5.6-1_Linux_x86.run` [replacing VirtualBox_1.5.6-1_Linux_x86.run with your version of the installer]). It sucks that this is the case (ie you can no longer install/uninstall with ease using pkgtool), but it's the only way.

As I see it, you have two options. You can forget the USB printer and continue using the open-source edition, or you can accept the fact that you have to use the closed-source version. Neither solution is ideal, but it's your decision in the end.

Oh well as my printer is AIO and i needed i will just have to use closed-source edition and as for my kernel it is the huge [which i think is not the one i should be using???] Which kernel are you using?? Thank you very much :D

T3slider 03-21-2008 09:40 PM

You probably should be using the generic-smp kernel, as the huge-smp kernel is really meant just for the installation. You can use the huge-smp kernel with no ill effects, but it requires a lot of blacklisting of modules to avoid errors and tricky behaviour (which may be difficult to track down). You should think about switching to the generic-smp kernel (which requires an initrd!!) at some point (soon would be better). I would definitely suggest leaving an entry in /etc/lilo.conf for the huge-smp kernel though -- because of the requirement for an initrd, if you screw anything up (or if something gets screwed up with future kernels that you may decide to compile or upgrade etc.) the huge-smp will ALWAYS boot properly (it's very handy). To switch to the generic kernel, add an entry in /etc/lilo.conf that will boot that. The lilo entries for the generic-smp and huge-smp kernels can be done as follows:
Code:

image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
  initrd = /boot/initrd.gz
  root = /dev/sda1
  label = Generic Kernel
  read-only

image = /boot/vmlinuz-huge-smp-2.6.21.5-smp
  root = /dev/sda1
  label = Huge Kernel
  read-only

NOTE: change /dev/sda1 in each of the above entries to wherever your hard drive is (use the existing huge-smp entry as an example). Note that in a default setup, /boot/vmlinuz is a symbolic link to /boot/vmlinuz-huge-smp-2.6.21.5-smp, so the lilo entry points to that instead of what I wrote above. You could always just symlink /boot/vmlinuz to point to the generic-smp kernel instead and avoid adding an entry, but then you don't have the backup huge kernel, which is very handy in an emergency.

After you edit /etc/lilo.conf (and BEFORE you run lilo), you must create an initrd (initial ramdisk). Read '/boot/README.initrd' (which is a symlink to /usr/doc/mkinitrd-1.1.2/README.initrd) and it'll tell you how to make an initrd (since I use reiserfs, I simply typed `mkinitrd -c -k 2.6.21.5-smp -m reiserfs` as root). That should create a /boot/initrd-tree directory and a /boot/initrd.gz file. You should also symlink System.map to point to System.map-generic-smp-2.6.21.5-smp instead of System.map-huge-smp-2.6.21.5-smp, but it's not essential (I've had mismatched System.map symlinks before because I forgot to change the symlink and had no problems whatsoever -- however, for correctness, it should be done).

After all that's done, run `/sbin/lilo` as root to update your MBR. Then you can happily reboot into the generic kernel. If anything goes wrong, you can simply boot using the huge kernel (that you hopefully created a lilo entry for) and your system will be back up and running with no ill effects, allowing you to remedy the error you may have made using the generic kernel.

Good luck.

BULPulse 03-22-2008 11:05 AM

Quote:

Originally Posted by T3slider (Post 3096539)
You probably should be using the generic-smp kernel, as the huge-smp kernel is really meant just for the installation. You can use the huge-smp kernel with no ill effects, but it requires a lot of blacklisting of modules to avoid errors and tricky behaviour (which may be difficult to track down). You should think about switching to the generic-smp kernel (which requires an initrd!!) at some point (soon would be better). I would definitely suggest leaving an entry in /etc/lilo.conf for the huge-smp kernel though -- because of the requirement for an initrd, if you screw anything up (or if something gets screwed up with future kernels that you may decide to compile or upgrade etc.) the huge-smp will ALWAYS boot properly (it's very handy). To switch to the generic kernel, add an entry in /etc/lilo.conf that will boot that. The lilo entries for the generic-smp and huge-smp kernels can be done as follows:
Code:

image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
  initrd = /boot/initrd.gz
  root = /dev/sda1
  label = Generic Kernel
  read-only

image = /boot/vmlinuz-huge-smp-2.6.21.5-smp
  root = /dev/sda1
  label = Huge Kernel
  read-only

NOTE: change /dev/sda1 in each of the above entries to wherever your hard drive is (use the existing huge-smp entry as an example). Note that in a default setup, /boot/vmlinuz is a symbolic link to /boot/vmlinuz-huge-smp-2.6.21.5-smp, so the lilo entry points to that instead of what I wrote above. You could always just symlink /boot/vmlinuz to point to the generic-smp kernel instead and avoid adding an entry, but then you don't have the backup huge kernel, which is very handy in an emergency.

After you edit /etc/lilo.conf (and BEFORE you run lilo), you must create an initrd (initial ramdisk). Read '/boot/README.initrd' (which is a symlink to /usr/doc/mkinitrd-1.1.2/README.initrd) and it'll tell you how to make an initrd (since I use reiserfs, I simply typed `mkinitrd -c -k 2.6.21.5-smp -m reiserfs` as root). That should create a /boot/initrd-tree directory and a /boot/initrd.gz file. You should also symlink System.map to point to System.map-generic-smp-2.6.21.5-smp instead of System.map-huge-smp-2.6.21.5-smp, but it's not essential (I've had mismatched System.map symlinks before because I forgot to change the symlink and had no problems whatsoever -- however, for correctness, it should be done).

After all that's done, run `/sbin/lilo` as root to update your MBR. Then you can happily reboot into the generic kernel. If anything goes wrong, you can simply boot using the huge kernel (that you hopefully created a lilo entry for) and your system will be back up and running with no ill effects, allowing you to remedy the error you may have made using the generic kernel.

Good luck.

Well I followed the instructions but now i can't use any linux kernel. What happens is:

When I try to run the generic it starts to load and after a while shows this:
Code:

Mounting /dev/sda3 failed
ERROR: No /sbin/init found on rootdev (or not mounted).
Kernel panic - not syncing: Attempted to kill init!

And for the huge kernel:
Code:

Warning: unable to open an initial console.
Kernel panic - not syncing: No init found. Try passing init = option to kernel

and i made lilo.conf back up just in case but i don't know if it will help

BULPulse 03-22-2008 12:43 PM

I managed to edit lilo.conf so i am back to normal but sill don't understand why it gave the errors shown in the previous post. Any suggestions how to fix it so i can use the generic kernel?

T3slider 03-23-2008 09:31 PM

For the generic kernel, that error looks like your initrd was incorrect. Post your attempted lilo.conf and the command you used to create the initrd. As for the huge kernel error, that's an odd one and I don't know how to explain it. Once again, post your lilo.conf file here. It would also be helpful if you posted the output of `mount` so we know that the naming of your hard drive is consistent with your lilo.conf file (I'm not calling you an idiot, just trying to get all of the info just in case you or I missed something in the setup). You may also wish to search the forums about creating an initrd to get a better guide than mine.

BULPulse 03-24-2008 09:59 AM

Quote:

Originally Posted by T3slider (Post 3098250)
For the generic kernel, that error looks like your initrd was incorrect. Post your attempted lilo.conf and the command you used to create the initrd. As for the huge kernel error, that's an odd one and I don't know how to explain it. Once again, post your lilo.conf file here. It would also be helpful if you posted the output of `mount` so we know that the naming of your hard drive is consistent with your lilo.conf file (I'm not calling you an idiot, just trying to get all of the info just in case you or I missed something in the setup). You may also wish to search the forums about creating an initrd to get a better guide than mine.

The lilo.conf I used when I got the errors was:
Code:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot="/dev/sda"
prompt
timeout="1200"
# Override dangerous defaults that rewrite the partition table:
change-rules
  reset
# Normal VGA console
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
map = /boot/map-bmp
bitmap = /boot/phrag-slack.blk.orb.bmp
bmp-colors = 15,,0;5,,15
bmp-table = 59,5,1,18,
bmp-timer= 66,28,6,8,0
# End LILO global section
# Windows bootable partition config begins
default=Slackware

other = /dev/sda2
        label="Windows"
  table = /dev/sda
# Windows bootable partition config ends
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-smp-2.6.21.5-smp
  initrd = /boot/initrd.gz
  root = /dev/sda3
  label = Slackware
  read-only

image = /boot/vmlinuz-huge-smp-2.6.21.5-smp
  root = /dev/sda3
  label = Huge
  read-only
# Linux bootable partition config ends

mount
Code:

/dev/sda3 on / type ext2 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda2 on /fat-c type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)
/dev/sdb1 on /fat-s type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)

and the command i used for the initrd was:
Code:

mkinitrd -c -k 2.6.21.5-smp -m reiserfs

T3slider 03-24-2008 10:16 PM

Your problem is your `mkinitrd` command. You set it up to load the reiserfs module, but according to `mount` your / partition is ext2-formatted. Your command should be (I think) `mkinitrd -c -k 2.6.21.5-smp -m ext2`. If that doesn't work you may have to specify the / partition (although you shouldn't have to if you're already booted into your system, regardless of the kernel). To do that, try this: `mkinitrd -c -k 2.6.21.5-smp -m ext2 -f ext2 -r /dev/sda3`. Be sure to delete /boot/initrd.gz and /boot/initrd-tree before creating a new initrd (`rm /boot/initrd.gz` and `rm -rf /boot/initrd-tree` as root should do the trick).

Also, before creating the initrd you should make sure that the following packages are installed:
kernel-generic-smp-2.6.21.5_smp-i686-2.tgz
kernel-modules-smp-2.6.21.5_smp-i686-2.tgz
kernel-huge-smp-2.6.21.5_smp-i686-2.tgz
mkinitrd-1.1.2-i486-3.tgz

If the packages are installed, they should have an entry in /var/log/packages (type `ls /var/log/packages | grep kernel-generic-smp-2.6.21.5_smp-i686-2` [WITHOUT the .tgz] -- if you receive a result, it's installed. If not, it's not. Do the same for the other packages).

As for your huge kernel not working when you edited lilo.conf, just to make sure everything works I would keep the current, working lilo entry the same and just add the new generic entry. That way, your huge kernel should still work because you haven't changed it.

REMEMBER to run /sbin/lilo as root to update your MBR BEFORE rebooting into the new kernel.

NOTE: This whole time I have assumed you are using the smp kernel and not the uniprocessor, non-smp kernel. To check, type `uname -r`. It should say something about smp. If it doesn't, then report back and I'll fix my above instructions. I'm really making this sound 100 times harder than it is (it all takes under a minute to do once you know what you're doing), so sorry if my explanation is poor.

Good luck.

BULPulse 03-25-2008 04:42 PM

It is all working now :) I didn't have mkinitrd-1.1.2-i486-3.tgz installed so after installing it i run the command and everything working :) It is just that I don't see any difference. Well anyway the first thing I do when i have some spare time is compiling new kernel and KDE:). At least now I feel safe If I get it wrong. You have been great help!!! Thank you

T3slider 03-26-2008 09:49 PM

As far as I know the only place you'll REALLY notice a difference, if at all, is during bootup. A custom kernel may run faster than the huge kernel because fewer modules are loaded, but it won't run any faster than the generic kernel (because the same modules will be loaded -- although they may be compiled into the kernel itself, they're still taking up the same amount of memory). Basically a custom kernel may shorten bootup time (plus it may improve hardware interfacing if you use a newer version). I usually stick with the original kernel until a newer release comes out (however, a new kernel release is usually out before I can download the ISOs. ;)).

giusepped 03-11-2009 08:54 PM

Quote:

Originally Posted by T3slider (Post 3090513)
I successfully got my (Lexmark) USB printer working in Windows 2000 running in VirtualBox. Nifty, now it's no longer a complete paperweight. ;)

I had to add the following line to my /etc/fstab:
Code:

none            /proc/bus/usb    usbfs      devgid=106,devmode=664 0 0
devgid=106 corresponds to the group "vboxusers" (which I think was automatically created by VirtualBox), and therefore only users in that group can print. You can of course create a new group (called "usbusers" or some such thing, or use the plugdev group) and use that (any group containing your user will do, but make sure it excludes users you don't want printing from VirtualBox). To find the group id, check the number beside the appropriate group in /etc/group. MAKE SURE to change this value to the appropriate one, since the group ids in your system will be different than mine.

Before I did this, my printer was listed if I right-clicked on the USB icon in the statusbar in VirtualBox, but was grayed out. Now, it's actually clickable. I installed the printer using the Lexmark drivers (though you should use whatever drivers you would use on Windows appropriate for your printer) and it works perfectly. Unfortunately for me I had to replace the ink cartridges because I had left the (unusable) printer dormant ever since installing Linux and they had dried up, but it is now working nonetheless. The "Add Hardware Wizard" couldn't find the appropriate drivers (because Lexmark ships their drivers separately) and I couldn't find the CD, so I just downloaded them from their website -- you should be able to do the same for any printer brand.

Note that before you boot into VirtualBox you may have to add the USB printer's info in the USB Settings dialog (while the guest OS is NOT running) -- you can get that info from running `VBoxManage list usbhost` (as root?).

If you need more help (or a better explanation) just ask.

I followed your steps, but still I can't see the USB printer clickable in my machine. I can select it before running the Virtual Machine, but when it is started I cannot use it (it is in gray).
Any suggestion?
G


All times are GMT -5. The time now is 10:22 AM.