this post was submitted on 31 Dec 2024
13 points (100.0% liked)

Linux

48867 readers
1090 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hello everyone! I recently decided to reignite my passion for learning about kernel development, so I printed out the third edition of Linux Device Drivers by J. Corbet + others. In the book it is stated that they assume you have the 2.6.10 kernel. I decided to set up a virtual machine using virt-manager so that I can work through most of the book (I realise VMs dont allow for many things when developing drivers, where physical access to hardware is required, but its the best option for now until I can get a RPi or something else).

I decided to go with Ubuntu Dapper Drake, as it has a kernel version pretty close to what is used in the book, so I figured there wouldn't be much friction when trying to install the specific 2.6.10 version (Dapper Drake is on 2.6.15, at least the one I got). However, I am encountering an issue with my networking. I have set up the NAT bridge from my regular WIFI internet connection to my virtual machines, set my dapper drake installation to use that in the NIC settings, but it doesnt connect.

Here are some commands and their output from the guest OS:

$ ifconfig -a
lo
<loopback information yada yada>

sit0
<yada yada>

$ lspci | grep -i ethernet
0000:01:00.0 Ethernet controller: Unknown device 1af4:1041 (rev 01)

The second command's output leads me to believe that a device is detected but the OS doesnt know what to do with it because I dont have the virtio drivers for networking installed.

I've searched everywhere for a way to download them either as source or as a .deb package so I can transfer them to the guest OS using a disk drive I will create, but I cant find them anywhere. Everywhere I look, everyone says that for linux they are already included in the kernel (might not be true for the distribution I have as a guest).

So here is my question(s) finally: Where can I find virtio-tools either as a .deb package or as source with instruction to build on a distribution of around the age of dapper drake, or if there is another way and I am wrongly fixated on this, how can I set up networking by passing through my regular internet from the host to the guest, so that I can use stuff like github to write the driver code on my host and easily transfer it to the guest for compilation/testing?

Please be gentle. Dapper drake released around 2006 and it wasn't until 2016 when I first used linux in any form, so I am used to a little more quality of life in my distributions xD /j

As always, many thanks in advance to everyone taking time to answer :)

you are viewing a single comment's thread
view the rest of the comments
[–] MorphiusFaydal@lemmy.world 1 points 6 days ago

I don't recall in virt-manager off the top of my head. But if you make changes in the XML of a domain, you do have to shutdown/restart the domain before they're effective. And just to be safe, I would say to shutdown the domain, then check the XML, then start up again.

You do say you're just using qemu, so if that's the case and you aren't using libvirt in front of it, shutdown the VM, make sure your qemu command specifies an e1000 network device, and run again.

I can check virt-manager when I get some free time this evening, if that's what you want/need.