LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 08-23-2014, 09:20 AM   #1
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Rep: Reputation: Disabled
Question Moving root partition from /dev/sda to /dev/vda


I have a slackware 14.1 guest that I use with qemu/kvm. I installed it using a normal harddrive which shows up as /dev/sda, but now I want to convert it. When I connect it as a virtio harddrive it shows up as /dev/vda.

I tried the following to convert the slackware installation. I booted with the livecd, mounted the harddrive at /mnt, set up bind mounts, and chrooted into /mnt.

Then I created an initrd image where I load virtio, virtio_blk and virtio_mmio drivers. I also make sure that initrd root is correct (/dev/vda2). I get no errors. Then I add initrd entry to /etc/lilo.conf and install lilo again with -b /dev/vda switch. I have also changed fstab to point to /vda instead of /sda.

When I try to boot with my new config I get the following errors:
no kernel modules found for linux 3.10.17-smp
mounting /dev/vda2 to /mnt failed
no /sbin/init found on rootdev.

When the boot process halts I get access to a shell where I can move around in initrd. Since the initrd image is on /dev/vda it seems like it's possible read /dev/vda despite the fact that no modules are loaded.

Any ideas?

Last edited by insectiod; 08-23-2014 at 10:20 AM. Reason: make title less confusing
 
Old 08-23-2014, 11:06 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You used -k 3.10.17 for mkinitrd?
 
1 members found this post helpful.
Old 08-23-2014, 12:45 PM   #3
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by keefaz View Post
You used -k 3.10.17 for mkinitrd?
Yes I did.
 
Old 08-23-2014, 01:10 PM   #4
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
maybe you should use UUID instead of raw device node? if you can access the system and run blkid (as root) on /dev/vda2 (are you sure it's /dev/vda2 and not /dev/vda1 ?) and replace /dev/vdaX with UUID={uuid} in the FSTAB maybe you will have better luck.
 
1 members found this post helpful.
Old 08-23-2014, 02:15 PM   #5
Alien Bob
Slackware Contributor
 
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 8,559

Rep: Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106Reputation: 8106
Quote:
Originally Posted by insectiod View Post
Quote:
Originally Posted by keefaz
You used -k 3.10.17 for mkinitrd?
Yes I did.
The kernel version for which no modules could be found is "3.10.17-smp" by the way. Not "3.10.17"
 
2 members found this post helpful.
Old 08-23-2014, 03:42 PM   #6
insectiod
Member
 
Registered: Feb 2013
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Alien Bob View Post
The kernel version for which no modules could be found is "3.10.17-smp" by the way. Not "3.10.17"
Thanks. I ran mkinitrd with -r 3.10.17-smp and now it works.
 
  


Reply

Tags
boot, initrd, qemu, slackware 14.1, virtio



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
[SOLVED] How do I use virtio drivers in Debian in a KVM virtual machine? KenJackson Debian 1 07-05-2022 07:50 AM
host to guest directory share, 9p and virtio lllux Linux - Virtualization and Cloud 0 04-23-2013 05:44 PM
WindowsXP guest can't install the RedHat VirtIO SCSI controller -- What do I do? KenJackson Linux - Virtualization and Cloud 7 02-03-2013 01:30 AM
virtual device using Virtio abhinavpundir Linux - Virtualization and Cloud 1 03-03-2012 03:07 AM
Configuring Slackware 13.7 as guest on KVM with virtio drivers baboow Linux - Virtualization and Cloud 3 08-30-2011 10:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:30 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration