LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
Search this Thread
Old 03-22-2008, 11:05 AM   #31
BULPulse
Member
 
Registered: Nov 2007
Location: UK
Distribution: Slackware 13
Posts: 60

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by T3slider View Post
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
 
Old 03-22-2008, 12:43 PM   #32
BULPulse
Member
 
Registered: Nov 2007
Location: UK
Distribution: Slackware 13
Posts: 60

Original Poster
Rep: Reputation: 15
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?
 
Old 03-23-2008, 09:31 PM   #33
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,260

Rep: Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639
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.
 
Old 03-24-2008, 09:59 AM   #34
BULPulse
Member
 
Registered: Nov 2007
Location: UK
Distribution: Slackware 13
Posts: 60

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by T3slider View Post
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
 
Old 03-24-2008, 10:16 PM   #35
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,260

Rep: Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639
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.

Last edited by T3slider; 03-24-2008 at 10:23 PM.
 
Old 03-25-2008, 04:42 PM   #36
BULPulse
Member
 
Registered: Nov 2007
Location: UK
Distribution: Slackware 13
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 03-26-2008, 09:49 PM   #37
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,260

Rep: Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639Reputation: 639
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. ).
 
Old 03-11-2009, 08:54 PM   #38
giusepped
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Rep: Reputation: 0
Quote:
Originally Posted by T3slider View Post
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
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
virtual box alf_frommars Ubuntu 6 08-14-2007 08:30 AM
Virtual Box. Removing a shared folder inside virtual xp. glore2002 Linux - Software 2 05-20-2007 11:12 AM
Virtual Printer / CUPS-PDF Printer Issue in SuSE 10 jlstratton42 Suse/Novell 0 12-21-2005 11:04 AM
Cannot see my Win XP SP2 box with shared printer from my SUSE Pro 9.3 box thorlin Linux - Networking 3 09-11-2005 01:16 PM
How do I get my Suse 9.1 box to print to the printer attached to my Win XP box? PadreFabuloso Linux - Newbie 2 06-23-2005 04:06 PM


All times are GMT -5. The time now is 11:29 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 Google+: linuxquestions
Open Source Consulting | Domain Registration