Showing posts sorted by date for query kernel virtualbox. Sort by relevance Show all posts
Showing posts sorted by date for query kernel virtualbox. Sort by relevance Show all posts

12 December 2012

290. Compiling Kernel 3.7.* on Debian (Wheezy/testing)

Update 19/12/2012
On one of my seven boxes I'm having problems with the new kernel, receiving messages such as
pci_pcm_runtime_suspend()
azx_runtime_suspend
[snd_hda_intel] returns -11
This is a known bug (https://patchwork.kernel.org/patch/1865521/), but as can be seen in that message the patch might not be included until kernel 3.8 (although one of the authors call for a backport to kernel 3.6). Again, this happened only on one out of seven computers tested so far so it might not be a universal problem. See here for how to fix it yourself: http://verahill.blogspot.com.au/2012/12/patching-kernel-371-to-fix.html

Note
 vboxdrv 4.1.18 and nvidia 304.48-1 dkms packages do not seem to play well with 3.7. This is perhaps not that surprising given that wheezy is frozen since June 2012.

* The virtualbox-dkms/vboxdrv (4.1.18-dfsg-1.1) isn't playing ball on 3.7. See e.g. https://forums.virtualbox.org/viewtopic.php?f=7&t=53031 and http://www.kubuntuforums.net/showthread.php?61234-Kernel-update-video-drivers-and-virtualbox

I solved it by going to the virtualbox website and installing their .deb package:
wget http://download.virtualbox.org/virtualbox/4.2.4/virtualbox-4.2_4.2.4-81684~Debian~wheezy_amd64.deb
sudo apt-get autoremove virtualbox virtualbox-qt virtualbox-dkms
sudo dpkg -i virtualbox-4.2_4.2.4-81684~Debian~wheezy_amd64.deb
sudo /etc/init.d/vboxdrv setup

This works absolutely fine under 3.7 and 3.7.1

* I'm also having issues with building the nvidia dkms module on this kernel. It seems to be a bug which is resolved by upgrading to a newer nvidia driver. http://www.mail-archive.com/desktop-packages@lists.launchpad.net/msg184146.html

Given that Wheezy is frozen since the end of June I suspect that we won't be seeing any fix for this. Instead I ended up installing nvidia-current (310.19) using smxi (smxi.org) and it's working fine (the alt+prtscrn screenshot bug doesn't seem to be resolved though).



Original post:
Be aware that starting with kernel 3.6 you will need to explicitly include compilation of various drivers for multimedia and webcams -- see e.g.
http://verahill.blogspot.com.au/2012/10/compiling-kernel-36-on-debian.html
http://verahill.blogspot.com.au/2012/10/leadtek-dtv-1000s-in-kernel-36-debian.html

Other than that, compiling kernel 3.7.* is pretty straightforward. The ncurses packages are needed only for 'make menuconfig'

sudo apt-get install kernel-package fakeroot build-essential ncurses-bin ncurses-dev
mkdir ~/tmp
cd ~/tmp
wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.7.1.tar.bz2
tar xvf linux-3.7.1.tar.bz2
cd linux-3.7.1/
cat /boot/config-`uname -r`>.config
make oldconfig

and answer the questions (see bottom of the post for a list of new features).

If you want to specifically include a driver, then the easiest thing to do is:

make menuconfig

and navigating through (or search -- hit / ). E.g. saa7134 is found under Device drivers/Multimedia support/Media PCI adapters/Philips SAA7134 support. Don't forget to compile in remote control support as well if needed.

Continue (replace 4 with whatever is suitable for the number of cores on your system):
make-kpkg clean
time fakeroot make-kpkg -j4 --initrd --revision=3.7.1 --append-to-version=-amd64 kernel_image kernel_headers

This took 20 minutes on a four-core i5-2400..

mv ../linux*3.7*.deb .
sudo dpkg -i *.deb

Building failed completely on an AMD 8150FX 8 core system (See bottom of the post). It built fine on first try on all other systems.



Changes (if in doubt, hit enter for the default option):

* CPU/Task time and stats accounting
*
Cputime accounting
> 1. Simple tick based cputime accounting (TICK_CPU_ACCOUNTING) (NEW)
  2. Fine granularity task level IRQ time accounting (IRQ_TIME_ACCOUNTING)
choice[1-2]: 1
Consider userspace as in RCU extended quiescent state (RCU_USER_QS) [N/y/?] (NEW)
Module signature verification (MODULE_SIG) [N/y/?] (NEW)
Legacy cpb sysfs knob support for AMD CPUs (X86_ACPI_CPUFREQ_CPB) [Y/n/?] (NEW)
Packet: sockets monitoring interface (PACKET_DIAG) [N/m/y/?] (NEW)
IPv6: GRE tunnel (IPV6_GRE) [N/m/y/?] (NEW) 
IPv4 NAT (NF_NAT_IPV4) [N/m/?] (NEW)
IPv6 NAT (NF_NAT_IPV6) [N/m/?] (NEW)
OMAP OCP2SCP DRIVER (OMAP_OCP2SCP) [N/m/y/?] (NEW) 
 Maximum expected bad eraseblock count per 1024 eraseblocks (MTD_UBI_BEB_LIMIT) [20] (NEW)
UBI Fastmap (Experimental feature) (MTD_UBI_FASTMAP) [N/y/?] (NEW)
Calxeda Highbank SATA support (SATA_HIGHBANK) [N/m/?] (NEW)
Virtual eXtensible Local Area Network (VXLAN) (VXLAN) [N/m/y/?] (NEW) 
PCH PTP clock support (PCH_PTP) [N/y/?] (NEW)
Solarflare SFC9000-family PTP support (SFC_PTP) [Y/n/?] (NEW)
Drivers for Atheros AT803X PHYs (AT803X_PHY) [N/m/?] (NEW)
MAX310X support (SERIAL_MAX310X) [N/y/?] (NEW)
SCCNXP serial port support (SERIAL_SCCNXP) [N/m/y/?] (NEW)
TPM HW Random Number Generator support (HW_RANDOM_TPM) [M/n/?] (NEW)
TPM Interface Specification 1.2 Interface (I2C - Infineon) (TCG_TIS_I2C_INFINEON) [N/m/?] (NEW)
NXP SC18IS602/602B/603 I2C to SPI bridge (SPI_SC18IS602) [N/m/?] (NEW)
OMAP HDQ driver (HDQ_MASTER_OMAP) [N/m/?] (NEW)
Analog Devices ADT7410 (SENSORS_ADT7410) [N/m/?] (NEW)
Maxim MAX197 and compatibles (SENSORS_MAX197) [N/m/y/?] (NEW)
generic cpu cooling support (CPU_THERMAL) [N/y/?] (NEW)
Fairchild FAN53555 Regulator (REGULATOR_FAN53555) [N/m/?] (NEW)
Media USB Adapters (MEDIA_USB_SUPPORT) [N/y/?] (NEW) 
STK1160 USB video capture support (VIDEO_STK1160) [N/m/?] (NEW)
STK1160 AC97 codec support (VIDEO_STK1160_AC97) [N/y/?] (NEW)   
Enable debug for the B2C2 FlexCop drivers (DVB_B2C2_FLEXCOP_USB_DEBUG) [N/y/?] (NEW)
Media PCI Adapters (MEDIA_PCI_SUPPORT) [N/y/?] (NEW)
Enable debug for the B2C2 FlexCop drivers (DVB_B2C2_FLEXCOP_PCI_DEBUG) [N/y/?] (NEW)
Media test drivers (V4L_TEST_DRIVERS) [N/y] (NEW)
ISA and parallel port devices (MEDIA_PARPORT_SUPPORT) [N/y/?] (NEW)
Autoselect tuners and i2c modules to build (MEDIA_SUBDRV_AUTOSELECT) [Y/n/?] (NEW)
Maximum debug level (NOUVEAU_DEBUG) [5] (NEW)
Default debug level (NOUVEAU_DEBUG_DEFAULT) [3] (NEW)
Backlight Driver for LM3630 (BACKLIGHT_LM3630) [N/m/?] (NEW)
Backlight Driver for LM3639 (BACKLIGHT_LM3639) [N/m/?] (NEW)
Sony PS3 BD Remote Control (HID_PS3REMOTE) [N/m/?] (NEW)
HID Sensors framework support (HID_SENSOR_HUB) [N/m/?] (NEW)
ZTE USB serial driver (USB_SERIAL_ZTE) [N/m/?] (NEW)
Functions for loading firmware on EZUSB chips (USB_EZUSB_FX2) [M/y/?] (NEW)
LED support for LM3642 Chip (LEDS_LM3642) [N/m/?] (NEW)
LED support for LM355x Chips, LM3554 and LM3556 (LEDS_LM355x) [N/m/?] (NEW)
LED CPU Trigger (LEDS_TRIGGER_CPU) [N/y/?] (NEW)
Dallas DS2404 (RTC_DRV_DS2404) [N/m/y/?] (NEW)
Silicom devices (NET_VENDOR_SILICOM) [Y/n/?] (NEW)
Silicom BypassCTL library support (SBYPASS) [N/m/?] (NEW)
Silicom BypassCTL net support (BPCTL) [N/m/?] (NEW)
Cambridge Electronic Design 1401 USB support (CED1401) [N/m/?] (NEW)
Digi Realport driver (DGRP) [N/m/y/?] (NEW) *
STE-Modem remoteproc support (STE_MODEM_RPROC) [N/m/y/?] (NEW)
SMB2 network file system support (EXPERIMENTAL) (CIFS_SMB2) [N/y/?] (NEW)
Red-Black tree test (RBTREE_TEST) [N/m/?] (NEW)
Interval tree test (INTERVAL_TREE_TEST) [N/m/?] (NEW)
CAST5 (CAST-128) cipher algorithm (x86_64/AVX) (CRYPTO_CAST5_AVX_X86_64) [N/m/y/?] (NEW)
CAST6 (CAST-256) cipher algorithm (x86_64/AVX) (CRYPTO_CAST6_AVX_X86_64) [N/m/y/?] (NEW)
Asymmetric (public-key cryptographic) key type (ASYMMETRIC_KEY_TYPE) [N/m/y/?] (NEW)
Asymmetric public-key crypto algorithm subtype (ASYMMETRIC_PUBLIC_KEY_SUBTYPE) [N/m/?] (NEW)
RSA public-key algorithm (PUBLIC_KEY_ALGO_RSA) [N/m/?] (NEW)
X.509 certificate parser (X509_CERTIFICATE_PARSER) [N/m/?] (NEW)


AMD FX 8150
My AMD FX8150 is causing no end of problems when it comes to compiling the kernel e.g.

In file included from include/linux/dynamic_debug.h:100:0,
                 from include/linux/kernel.h:14,
                 from include/linux/sched.h:15,
                 from include/linux/blkdev.h:4,
                 from drivers/scsi/lpfc/lpfc_sli.c:22:
include/linux/string.h:23:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  /usr/share/doc/gcc-4.7/README.Bugs for instructions.
  CC [M]  drivers/scsi/lpfc/lpfc_ct.o
[..]
  LD [M]  drivers/scsi/osd/osd.o
  CC [M]  drivers/scsi/mpt2sas/mpt2sas_ctl.o
The bug is not reproducible, so it is likely a hardware or OS problem.
make[4]: *** [drivers/scsi/lpfc/lpfc_sli.o] Error 1
make[3]: *** [drivers/scsi/lpfc] Error 2
make[3]: *** Waiting for unfinished jobs....

31 July 2012

217. Recently...

Recently I've been busy preparing lectures (phew!), which means I've been kinder to my computer than is normal. Still, I managed to get myself into a few situations. The need to 'get stuff done' overrode the importance of documentation, but here's the low-down in case someone finds themselves in a similar situation:


1. Upgrades keep on getting stuck when restarting nfs/nfsd (nfs-common, nfs-kernel-server).
Normally I don't have any problems with nfs -- it's a tried and tested technology -- but one of my cluster nodes was giving me grief.

The key was to comment out everything in /etc/exports and commenting out nfs mounted partitions in /etc/fstab, then adding nfs and nfsd to /etc/modprobe.d/blacklist.conf (not sure this actually did anything), rebooting, throwing in

sudo rmmod nfs nfsd 


to be on the safe side, then doing

sudo dpkg --configure -a

to get dpkg/apt back in working order. After that I could uncomment everything in /etc/exports and /etc/fstab, and whitelist my drivers again.

Problem solved.

2. Nvidia is still a headache.
Since I was given a rare opportunity to reboot my front node I did a bit of work on it. Mainly, I wanted to allow gdm to start again, and figured I'd return to my nvidia driver managment to dkms-y goodness.

So I fired up smxi, selected 'debian-nvidia' and...everything was messed up. Long story short: I got it working with gdm3 by picking 'current driver' in smxi (always blacklist nouveau if you want to use/install nvidia drivers), making sure that there was no 'vga' (e.g.  vga=0x0318 ) in GRUB_CMDLINE_LINUX in /etc/default/grub and rebooting liberally.

I later got the debian-nvidia (dkms) version working by 1) not using frambuffer and 2) manually removing all nvidia legacy drivers that smxi pulled in. Well, that's working as in no error messages and the desktop looking fine.

3. GNOME 3 not diplaying all letters
e.g. 'guake' was rendered as 'g ak '. This happened on a low-powered system. A 'fix' was to go to advanced settings (gnome-tweak-tool), select font and change scaling from 1.0 to 1.2 and above.

It's not much of a 'fix', so I ended up nuking GNOME from that system and replacing it with KDE to have a reason to get more familiar with it. In the interest of balance I nuked all other DEs from another box and put LXDE on it. To paraphrase the Dos Equis commercial: I don't always use a DE, but when I do, I want to learn something new.

I've used KDE and GNOME on and off over the past 12 years, but you get rusty -- and both KDE and GNOME have changed enough from v 3.x and 2.x, respectively, that they aren't the same environment anymore. I still get an initial feeling of joy when I sit down by an NMR console and discover a red hat system with a 3.x desktop. Which is quickly followed by being annoyed over not having root access, but whatever. As for the usual gnome 2 vs gnome 3 arguments -- I like gnome3 in general. I just hate the idea of settings being hidden or disabled, and functionality being reduced. Enough so that I'm still looking for a potential replacement.

So far :
KDE -- I like it. It's overdoing the desktop effects a bit (out of the box) but, since it's KDE, it's easy to turn things on and off. I'm still a GNOME man, and KDE doesn't have the warm fuzzy feeling of home yet, but I can see how I could get used to it. I just need to get over my outdated idea that KDE is for windows users (I've never used a Mac so I guess I'm a reformed windows -- actually DOS -- user more than anything else).

KDE on one of my other systems seems to be messing up GNOME 3 though -- e.g. the mouse cursor theme gets transferred to gnome, and the pop-up notifications are those of kwin and not gnome-shell.  Not sure whether it's KDE causing it or whether I've messed a bit too much with my system.

LXDE -- it's functional and has long been my choice for virtual installations of linux for windows users. It's minimalistic in the sense that yes, it does provide a desktop, but no, it doesn't try to do anything beyond providing a set of menus and a bit of themeing. And that's a good thing. If you're going to impress a mate -- use gnome or kde. If you just need to get something done and launch a piece of software, lxde's your mate.

4. One of my systems lacked /etc/init.d/vboxdrv
Not all my collaborators use linux, so I keep a virtual copy of XP around for when I'm absolutely forced to use MS Word (OpenOffice sometimes changes the layout and it quickly becomes messy on collaborative documents). When taking a quick break to edit a manuscript in virtualbox I got the usual no driver present, 'run /etc/init.d/vboxdrv setup' message. Well, there was no /etc/init.d/vboxdrv in spite of dkms and vboxdrv-dkms being installed in addition to all the kernel headers. Turns out that the quickest way, assuming that locate vboxdrv doesn't come up empty (i.e. it's somewhere in the kernel tree) is just to mod it.
modprobe vboxdrv


To avoid it in the future, stick
vboxdrv
somewhere in your /etc/modules


5. Mysteriously self-rotating gnuplot images in latex 
Came down to a stupid mistake. I was doing:

set term postscript enhanced colour
set output 'acid.eps'
set border 3
set xtics nomirror
set ytics nomirror

I forgot to add eps -- getting rusty I suppose.

set term postscript enhanced eps colour
set output 'acid.eps'
set border 3
set xtics nomirror
set ytics nomirror

Surprised it hasn't happened before during all these years of latex usage.

6. Setting default line printer
me@beryllium:$ lpq
lpq: Error - no default destination available.



me@beryllium:$ lpstat -a
AdobePDF accepting requests since Mon 06 Aug 2012 08:01:32 EST
AdobePDF7 accepting requests since Mon 06 Aug 2012 08:01:32 EST
AdobePDF8 accepting requests since Mon 06 Aug 2012 10:04:13 EST
AdobePDF8@johnbowmansimac.dbs.monash.edu.au accepting requests since Mon 06 Aug 2012 08:01:32 EST
AdobePDF9 accepting requests since Mon 06 Aug 2012 08:01:32 EST
AdobePDF9@130.194.162.66 accepting requests since Mon 06 Aug 2012 08:01:32 EST
biol08r159p1 accepting requests since Mon 06 Aug 2012 08:01:32 EST
Canon_iP4300 accepting requests since Mon 06 Aug 2012 08:01:32 EST
Canon_MP460 accepting requests since Mon 06 Aug 2012 10:09:36 EST
Colour_109a accepting requests since Mon 06 Aug 2012 08:01:32 EST
global-mfp accepting requests since Mon 28 May 2012 14:27:30 EST
GlobalMFP@s0001203.dbs.monash.edu.au accepting requests since Mon 06 Aug 2012 08:01:32 EST
HP_LaserJet_Professional_P1102w accepting requests since Sat 04 Aug 2012 23:08:16 ESTHPColourLaserCP3505 accepting requests since Mon 06 Aug 2012 08:01:32 EST
HPLaserJetP3005 accepting requests since Mon 06 Aug 2012 08:01:32 EST

 me@beryllium:$ lpoptions -d HP_LaserJet_Professional_P1102w
auth-info-required=none copies=1 device-uri=hp:/usb/HP_LaserJet_Professional_P1102w?serial=000000000Q91K4WVSI1c finishings=3 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=0 number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='HPIJS -- drv:///hpijs.drv/hp-laserjet_professional_p1102w-hpijs.ppd' printer-is-accepting-jobs=true printer-is-shared=true printer-location printer-make-and-model='HP LaserJet Professional p1102w, hpcups 3.12.4, requires proprietary plugin' printer-state=5 printer-state-change-time=1344085696 printer-state-reasons=paused printer-type=8425484 printer-uri-supported=ipp://localhost:631/printers/HP_LaserJet_Professional_P1102w


7. The next Debian is codenamed Jessie!
I'm only 6 days late...apparently that's the cowgirl.

05 March 2012

92. Installing debian in virtualbox -- in pictures

Here's a ridiculously detailed set of screengrabs of how to install debian in virtualbox. It ends with a five-point list of things to do post-install. My motivation was to create a sparse build environment which would help me hammer out depencies.

VIrtualbox can be handles completely in the terminal too:

In particular,  starting an existing machine:
me@beryllium:~$ VBoxManage startvm debian_barebone

Waiting for VM "debian_barebone" to power on...
VM "debian_barebone" has been successfully started.

Just make sure that you've opened up portforwarding for ssh:
VBoxManage modifyvm "debian_barebone" --natpf1 "guestssh,tcp,,2222,,22"

A very similar guide, but which shows the installation of LXDE is here: http://verahill.blogspot.com.au/2012/06/ecce-in-virtual-machine-step-by-step.html

Anyway: the graphical way:


Setting up the virtual machine

Name the vm and select os type and version

The amount of RAM you give the VM depends on what you will use it for.

Create a new harddisk


VDI is for virtualbox, VMDK is for VMWare

Dynamic will start small and grow as files are added.

A minimum of 3-4 GB is recommended, or apt cache might eat up all your space

And you're almost done.

Attach the debian install iso

USB is optional.


You can add a shared folder, but it's not necessary.

Don't touch this -- just make sure that the network adapter is enabled

Optional
Start the virtual machine, which will launch the installation.


Installing debian


The installation procedure is the same as on a 'real' computer.

Pick a language...

...a country...

...a keyboard layout...

...and let debian do a bit of preparation.

Choose a hostname. 

Normally leave domain blank.

Leave root password blank. This way sudo will be the default way of administration.

Leave blank.
Pick a name, any name.

Debian will suggest a user name based on the real name, but pick anything.

Pick a password. You'll have sudo access by default, so pick a good one.

Repeat your password

What about Melbourne/Victoria???

Normally Guided is a bad idea.

First you need to 'format' your harddrive

It won't touch your REAL harddrive, so relax

Create a partition -- we'll only create one linux partition, /

Create a new partition

Give it most of the space on your HDD, but not all


Primary is a good choice. Logical only acts as a container, and isn't necessary for  such a small setup.


Just go for the default settings.

Time to create a small swap, since we only gave our VM 256 Mb

Give the swap everything remaining

Primary again

Select Use as...

...SWAP

All is good

Make changes permanent

Write changes

Pick the generic kernel

...like so

Unless you do have another CD, don't bother

If you're connected to the net, go ahead and use a mirror














First boot







Things to do after installation:

0. With your virtual machine turned off, on the (linux) host do
 VBoxManage modifyvm "debian_barebone" --natpf1 "guestssh,tcp,,2222,,22"
to allow you to ssh to your virtual debian installation using
ssh verahill@localhost -p 2222

Boot your virtual machine and
1. Remove the CD from the /etc/apt/sources.list

2. sudo updatedb to populate the locate database
3. sudo apt-get install bzip2 to avoid the i18n header error:
W: Failed to fetch copy:/var/lib/apt/lists/partial/server_pub_linux_debian_dists_wheezy_non-free_i18n_Translation-en  Encountered a section with no Package: header
3. sudo apt-get update

4. install ssh server: sudo apt-get install openssh-server

5. Install a graphical environment: See this guide
The shortest summary of that would be:
sudo apt-get install lxde
sudo shutdown -r now