LinuxQuestions.org
Help answer threads with 0 replies.
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 03-30-2011, 03:53 PM   #1
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Rep: Reputation: 42
Slackware64 -current kvm guest boot issue


I'm having a problem installing and booting a 13.37 kvm guest ( -current as of 30/3/2011 ). Considering that the -current images support virtio, this should be straightforward, but the install proceeds normally until the lilo install ( to mbr ) at which point there is a complaint about /dev/sda not existing. Well it wouldn't because /dev/vda is the partitioned/installed disk.

I then tried to install from the prompt:

Quote:
/mnt/sbin/lilo -C /mnt/etc/lilo.conf
Had a problem with lilo so added the following to lilo.conf:

Quote:
boot=/dev/vda
disk=/dev/vda bios=0x80 max-partitions=7
and reinstalled lilo successfully this time ( albeit with a few moans and groans ). Now boot fails with:

Quote:
VFS: cannot open root device "fc02" or unknown-block(252,2)
Tried booting with:

Linux root=/dev/vda2

... but no go. Same message as above but "vda2" this time.

Help?

Robby
 
Old 03-30-2011, 04:28 PM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
before installing lilo manually you should do a
Code:
mount -o bind /dev /mnt/dev
chroot /mnt
EDIT: tested it now and still doesn't boot with the huge kernel.

Last edited by ponce; 03-30-2011 at 06:19 PM. Reason: added bind mount of dev
 
Old 03-30-2011, 06:25 PM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
you can do it by booting with the generic kernel and an initrd.

first I changed the above with
Code:
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc proc /mnt/proc
chroot /mnt
the last mount command is not needed if you just finished the install -it's already mounted- but it's needed in rescuing.

run
Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
it should give you the command line to run for generating the initrd.
add it in the lilo.conf section for your OS, re-run lilo, exit and reboot

I think it's necessary to use the generic because the huge kernel doesn't have built in statically the virtio modules so it can't find the disk at boot.

Last edited by ponce; 03-30-2011 at 06:31 PM. Reason: clarification
 
Old 03-31-2011, 02:01 AM   #4
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Hi Ponce, thanks for the response. I'm having some trouble with these instructions though. I've done the following:

normal boot from dvd ( without specifying root=/dev/vda2 )
mkdir /mnt/dev
mkdir /mnt/sys
mkdir /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc proc /mnt/proc
chroot /mnt

At this point I get a "chroot: can't execute /bin/sh No such file or dir" error. Originally I had used:

/mnt/usr/sbin/lilo -r /mnt/ -C /etc/lilo.conf

... to take into account that the filesystem was below /mnt. Stumped ... If huge has virtio support, statically or not, then shouldn't it support a virtio installation?

Regards, Robby
 
Old 03-31-2011, 02:35 AM   #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 rpedrica View Post
Hi Ponce, thanks for the response. I'm having some trouble with these instructions though. I've done the following:

normal boot from dvd ( without specifying root=/dev/vda2 )
mkdir /mnt/dev
mkdir /mnt/sys
mkdir /mnt/proc
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc proc /mnt/proc
chroot /mnt

At this point I get a "chroot: can't execute /bin/sh No such file or dir" error. Originally I had used:

/mnt/usr/sbin/lilo -r /mnt/ -C /etc/lilo.conf

... to take into account that the filesystem was below /mnt. Stumped ... If huge has virtio support, statically or not, then shouldn't it support a virtio installation?

Regards, Robby
You forget to mount the root filesystem first, under /mnt :
Code:
mount /dev/vda2 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /sys /mnt/sys
mount -t proc proc /mnt/proc
chroot /mnt
Eric
 
Old 03-31-2011, 03:22 AM   #6
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Thanks Eric, I suppose that would help ... that's done the trick. 2 questions:

1. why during lilo installation ( with a normal install ) does lilo think it's installing to sda when it should install to vda?
2, any chance of getting 13.37 to install as a kvm guest without these extra requirements? ( I presume the virtio mods would need to be compiled into the kernel that is installed at installation time - is this different from the iso image's boot kernel? )

Thanks for the help Ponce and Eric
 
Old 03-31-2011, 03:54 AM   #7
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Quote:
1. why during lilo installation ( with a normal install ) does lilo think it's installing to sda when it should install to vda?
You probably tried to install Lilo automatically; This considers a few defaults (among which /dev/sda); You would need to install it with expert mode, or edit lilo.conf (and run lilo) afterwards.

Also, it is necessary to have the modules loaded prior to the mounting process; Hence, you need it as a initrd.gz. The virtio modules should be loaded. This is the case with a default kernel, naturally you can compile these modules into your own custom kernel, but that may be a wee bit more work :-)

Quote:
2, any chance of getting 13.37 to install as a kvm guest without these extra requirements? ( I presume the virtio mods would need to be compiled into the kernel that is installed at installation time - is this different from the iso image's boot kernel? )
There are a few cons (as well as some pros) to this:
1) it would only work for kvm guests; So, there'd be issues with VirtualBox, VMWare, Xen and what not that use other methods / modules, in some cases even conflicting.
2) It presumes that Slackware should do the thinking for you. That's not Slackware-style. You do some good and logical thinking, and you get the most freedom whichever direction. Consider this "learning Linux", you now learn what is really required to get something done, rather than being led by a menu and no clue of what's actually going on on your machine.
3) Think of the memory footprint for a fairly small amount of people that would use the capability. How many Slackers run kvm-based virtual machines? All those others don't need that in their kernel. Think KISS and you're happy with how things are now.
 
Old 03-31-2011, 04:47 AM   #8
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Quote:
Also, it is necessary to have the modules loaded prior to the mounting process
They were during installation otherwise /dev/vda and networking would not work. This leads me to think that the installation boot kernel image is different from that which is installed to disk.

Quote:
it would only work for kvm guests; So, there'd be issues with VirtualBox, VMWare, Xen and what not that use other methods / modules, in some cases even conflicting.
Ah there's the rub ... I wonder how RHEL/Centos/SL do this though - they work with both kvm ( server and guest ) as well as vbox and others ( of course you choose kvm or zen during install, but vbox can run later if you've chosen kvm, one simply blacklists the kvm mods )

Quote:
It presumes that Slackware should do the thinking for you
Not necessarily. There's a certain amount of functionality that is already provided in the installer and it wouldn't be a stretch to have other functionality. For eg. what is the diff between having your mouse setup ( as currently done ) and setting up an additional user ( after root ). Someone has made a conscious decision in terms of what goes into the installer ( and kernel ) - that doesn't mean SW is thinking for you, it's simply a convenience. Another example is that btrfs is now available to format non-boot partitions with. Convenience ... and KVM could be another convenience. All these don't mean that SW is any less than what it has been in the past. There's already a lot done in the installer that probably very few understand, certainly setting up lilo ( currently done ) could arguably be construed as being as easy or complex, as setting up SW as a kvm guest.

Quote:
Think of the memory footprint for a fairly small amount of people that would use the capability. How many Slackers run kvm-based virtual machines?
Good point ... but I think more and more Slackers might be running VMs lately - it's a fantastically useful tool.

My 2 cents worth.
 
Old 03-31-2011, 05:26 AM   #9
Ramurd
Member
 
Registered: Mar 2009
Location: Rotterdam, the Netherlands
Distribution: Slackwarelinux
Posts: 703

Rep: Reputation: 111Reputation: 111
Quote:
This leads me to think that the installation boot kernel image is different from that which is installed to disk.
That's correct: for the installer to "guarantee" to work as much as possible, there's a huge kernel used with (almost) everything compiled in. This makes for a bloated kernel, which is no issue for an installer, but is for a live, running system.

Quote:
Ah there's the rub ... I wonder how RHEL/Centos/SL do this though - they work with both kvm ( server and guest ) as well as vbox and others ( of course you choose kvm or zen during install, but vbox can run later if you've chosen kvm, one simply blacklists the kvm mods )
They have more people as well as a bigger income due to an "enterprise" edition you have to pay for as well; They (probably) have various different kernels compiled, of which one is chosen (as default) based on what you state in the question listed. But this may mean you're more or less fixed on that choice. Less freedom.

Quote:
Good point ... but I think more and more Slackers might be running VMs lately - it's a fantastically useful tool.
It is! I do so very often, for one; but that you do and why you would do it is very specific. Besides, the current setup allows for the greatest amount of freedom: you choose what you want and how you want it. I find it quite easy to setup kvm-qemu with Slackware both as host and guest. Even switching disks from virtio to ide; I used to setup the systems with IDE as disk interface; At a later point I decided to use virtio disks (since it became available), which required some steps to take afterwards.
 
Old 03-31-2011, 07:21 AM   #10
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
Quote:
Originally Posted by rpedrica View Post
They were during installation otherwise /dev/vda and networking would not work. This leads me to think that the installation boot kernel image is different from that which is installed to disk.
I think they are the same.
That is because the kernel of the installer doesn't need to boot from /dev/vda but it detects it after booting loading the appropriate module (and like that for networking).
The panic manifests when you have to boot from the virtio device, but that's the reason the initrd is there for
 
Old 03-31-2011, 10:15 AM   #11
rpedrica
Member
 
Registered: Nov 2008
Location: Cape Town
Distribution: Slackware64 -current
Posts: 281

Original Poster
Rep: Reputation: 42
Thanks all for the info. Thought I'd include screenshots of my initial boot. It still includes some details about fc02 instead of vda2 - I think this has something to do with lilo and non-std devs - maybe someone can chirp on the subject ( nothing in google )?
Attached Thumbnails
Click image for larger version

Name:	kvm1.png
Views:	58
Size:	5.0 KB
ID:	6585   Click image for larger version

Name:	kvm2.png
Views:	57
Size:	7.6 KB
ID:	6586  
 
  


Reply



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] migrating from vmware to kvm, lvm partitioned guest failed to boot chakoshi Linux - Virtualization and Cloud 3 03-20-2011 04:34 PM
KVM: Mouse under Windows Guest performs way better than under Centos Guest martdj Linux - Virtualization and Cloud 3 03-29-2010 04:20 AM
[SOLVED] Slackware64-current usbboot.img fails to boot disturbed1 Slackware 11 02-19-2010 01:12 AM
[SOLVED] Lilo set-up to dual boot Slackware 12.2 with Slackware64 -current? hitest Slackware 19 08-10-2009 05:31 AM
Slackware64-current : can't have lilo updating the boot loader after kernel upgrade Didier Spaier Slackware 3 07-21-2009 08:00 AM

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

All times are GMT -5. The time now is 11:19 AM.

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