Bug 9242

Summary: cannot install on XEN dom0 due to missing modules
Product: Mageia Reporter: AL13N <alien>
Component: InstallerAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: release_blocker CC: alien, ennael1, mageia, mageia, thierry.vignaud, tmb
Version: CauldronKeywords: NEEDINFO
Target Milestone: Mageia 3   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: drakx-installer-rescue CVE:
Status comment:
Bug Depends on: 9270    
Bug Blocks:    

Description AL13N 2013-03-02 21:48:29 CET
the installer uses the desktop kernel

which doesn't have:

xen_netfront
xen_blkfront
virtio_net (?)

in it's initrds for netinstalls and installs on xen based virtualization platforms

Reproducible: 

Steps to Reproduce:
Comment 1 AL13N 2013-03-02 21:54:27 CET
additionally, it would be appreciated to have a generic initrd next to the all.rdz on isolinux/alt0/ on the mirros for use with PXE or XEN pv, etc... that way it matches with the vmlinuz kernel next to it.

Priority: Normal => release_blocker
CC: (none) => alien, mageia, thierry.vignaud, tmb
Target Milestone: --- => Mageia 3

Comment 2 Thomas Backlund 2013-03-03 02:12:19 CET
missing modules fixed with:

drakx-installer-binaries-1.74.1-1.mga3
drakx-installer-images-1.88.1-1.mga3

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 3 AL13N 2013-03-03 11:32:45 CET
after doing rescue, i get no NET devices found, i then choose from the module list that follow xen_netfront and get the following in AL-F3:

* unable to get module filename for xen-netfront
* needs xen-netfront
*       error reading xen-netfront: No such file or directory
* warning, insmod failed (xen-netfront ) (-1)


(additionally, a bit higher i see: "spawning a shell", "cannot open shell, /sbin/sh doesn't exist"  (isn't the shell on /bin/sh ?))

Status: RESOLVED => REOPENED
Resolution: FIXED => (none)

Comment 4 Thomas Backlund 2013-03-03 11:41:36 CET
is this a i586 rescue ?

in that case you need to tell it to use server kernel as that's the only one
supporting xen on i586, so:

alt1 rescue

should do it...


the Shell stuff I'll need to check
Comment 5 AL13N 2013-03-03 11:46:28 CET
x86_64 rescue, but i'll try alt1 , strange that i don't see alt1 on the mirrors in syslinux/ directory
Comment 6 AL13N 2013-03-03 11:48:20 CET
it does mean that i need to test this with .iso and not via PXE... or should i open the boot.iso and get the alt1 out of it?
Comment 7 Thomas Backlund 2013-03-03 11:49:31 CET
There is no alt1 on x86_64. I stated: "is this a i586 rescue ? in that case..."
Comment 8 AL13N 2013-03-03 13:12:18 CET
ah, ok :-)

so no, it's not i586 alt1

so, on x86_64 i should work?

i checked and the vmdk stage one was built yesterday around 21h, so i'm guessing that was the updated one...
Comment 9 AL13N 2013-03-03 13:13:07 CET
since it's in the list of modules, it think it's there, but i have no idea why the insmod fails (except that it says no such file or directory... which is odd
Comment 10 Thierry Vignaud 2013-03-03 13:18:14 CET
You could try manually...
Or look at kernel logs on the proper vt

Keywords: (none) => NEEDINFO

Comment 11 AL13N 2013-03-03 13:25:51 CET
i have no sh

and the output above in comment #3 is the one i see on ALF-F3
Comment 12 Thierry Vignaud 2013-03-03 14:14:38 CET
You can rebuild drakx-installer-images in order to have a shell (%define debug 1)
Comment 13 AL13N 2013-03-03 15:06:11 CET
ah, so it's normal that it doesn't have a shell
Comment 14 AL13N 2013-03-03 20:56:06 CET
i rebuilt drakx-installer-images --with debug

then installed it and copied the alt0/* into my PXE install

but when i boot via PXE, i see in ALT+F3:

mdk-stage1: built March 2 at 21h ...

where does this mdk-stage1 build comes from?

what did i do wrong?
Comment 15 Thierry Vignaud 2013-03-03 21:42:07 CET
That's date is unrelated, it's the build date of drakx-installer-binaries which provides the actual stage1 binaries
d-i-images build the isos with those binaries, the kernel, ...
Comment 16 AL13N 2013-03-03 23:09:54 CET
well, regardless, the /sbin/sh is not found: i do imagine it would be in /bin/sh though...
Comment 17 AL13N 2013-03-04 19:32:46 CET
i'm still stuck here to get a shell so i can check why the xen-netfront module doesn't insmod...
Comment 18 AL13N 2013-03-05 20:38:50 CET
ok, i found out that --with debug doesn't work, i need to set debug to 1 manually...


anyway, a shell is now there; and when i modprobe xen-netfront in it; it works perfectly while it gives an error in the ui of stage1. any idea how?


using different drivers like e1000 or 8139too work, except i need to load the module manually in the UI... in KVM (virtio) doesn't need to load the module manually and the automatic just proceeds...

any idea how why?

what can i do to help track down these issues?


furthermore, after loading stage2, the installer actually fails to move past loading modules... (in XEN and KVM both)

additionally, xen halts an extra 180 seconds on a black screen, before stage1 boots, both cirrus and stdvga have this issue.
Comment 19 AL13N 2013-03-05 21:57:15 CET
i just noticed that this issue with loading modules, only happens in the rescue
Thierry Vignaud 2013-03-06 06:33:16 CET

Source RPM: (none) => drakx-installer-rescue

AL13N 2013-03-06 08:22:50 CET

Depends on: (none) => 9270
Source RPM: drakx-installer-rescue => (none)

AL13N 2013-03-06 08:23:06 CET

Source RPM: (none) => drakx-installer-rescue

Comment 20 AL13N 2013-03-07 20:13:11 CET
ok, the loading modules thing is fixed
Comment 21 AL13N 2013-03-07 21:01:42 CET
ok, i found out that all modules in that module window fail, if they have a '-' in the name... others seem to work fine (with '_')

this might be in kvm too, but is not an easy to trigger...
Comment 22 AL13N 2013-03-07 21:06:57 CET
in detail:

* have to insmod xen-netfront
* no NET found: skip lo
* warning: unable to find filename for xen-netfront
* needs xen-netfront
*      error reading xen-netfront: No such file or directory
* warning, insmod failed (xen-netfront ) (-1)
* no NET found: skip lo
* no NET found: skip lo


while, other devices:

* have to insmod e1000
* no NET found: skip lo
* needs /lib/modules/3.8.1-1.mga3/.../e1000.ko.xz
* no NET found: skip lo
* no NET found: skip lo


as you can see, it seems to first locate the filename and failing that, it keeps the module name, and then it fails.

the filename can't be found only for modules with '-' in it's name.
Comment 23 Thierry Vignaud 2013-03-07 23:25:37 CET
Humm, we ought to be compatible with foo-bar & foo_bar for years.
Is virtio_net properly loaded? This one is with "_" in list_modules..

Thomas: any idea?
Comment 24 AL13N 2013-03-07 23:33:14 CET
virtio_net works fine

i tried at least 5 other modules with - in it and a few with _ in it and a few others.

all with '-' fail to load, and all others have no issue

the thing is, you have a list with all modules and when you ok it, you get a window to add options, and then it loads the module. well, the first thing it does is find the filename; and that's where it fails. maybe it tries to find xen_netfront.ko.xz instead of xen-netfront.ko.xz

it's definately before it tries to actually insmod it.
Comment 25 Thierry Vignaud 2013-03-07 23:40:17 CET
BTW This should really have been a separate bug report (missing modules vs faillure to load).

For the record, your issue is with stage1 (text mode) not stage2 (graphic mode starting with license step), isn't it?

We've our own code for loading modules in stage1.
Maybe it's time to use kmod there too...

CC: (none) => mageia

Comment 26 AL13N 2013-03-07 23:49:03 CET
i don't know, it might've originally failed due to this anyway...


but yes, this is stage1
Comment 27 AL13N 2013-03-09 10:34:12 CET
atm, i set up a wiki page with some small explanation:

https://wiki.mageia.org/en/XEN

hopefully this helps you setting it up correctly.

i'm not testing the xend (obsoleted) setup.

@thomas:

perhaps we can have dmks-blktap ? it seems this might also work. not sure if it's worth the effort though...
Comment 28 AL13N 2013-03-10 15:26:34 CET
after looking around in the code, i notice that:

there is a filename2modname which changes all '-' to '_'.

and this is used to insmod the module (because it's started from a file).

the problem is that at the start a list is shown of modules, (which are compiled from files found in a directory), but not using that function, in short, there are modules listed with '-' and modules with '_'.

that modname you selected in that list is then used to find in the list of modules (compiled from modules.dep) which does use this function, so thus it cannot be found.

1. remove the '-' ==> '_' code. insmod works with both afaik so i don't see any reason to change this anymore.

2. change so that the list shows them all with '_'.

3. maybe instead of 2 lists, use the modules.dep list in the beginning.


(i presume the code had in mind that if no modules.dep was supplied that it would still work a bit).

I would personally prefer 1 and 3 at the same time.

1. is a quickfix.


if noone objects, i'll be ripping out the s/-/_/g workaround...
Comment 29 Anne Nicolas 2013-03-13 12:27:35 CET
No one answer please give a try

CC: (none) => ennael1

Comment 30 AL13N 2013-03-13 14:05:39 CET
@anne, tv answered to me by email that if it's tested properly that he would be ok with this.

sadly, i followed the procedures to build, but i wasn't able to locally test my changes, i'm missing something, i added an extra log line, to be sure it was my version, and i didn't see it...

what i did to test:
-------------------
1. make dist in mdk-stage1 dir with uncommitted changes
2. place the tarball in drakx-installer-binaries/SOURCES/ and rebuild that.
3. install the drakx-installer-binaries in the buildchroot of drakx-installer-images and rebuild drakx-installer-images
4. install the drakx-installer-images and copy the isolinux/alt0/* to put this in my PXE server
5. boot my xen-vm from PXE


i wonder what i am missing...
Comment 31 Thierry Vignaud 2013-03-30 22:59:56 CET
Fixed in drakx-installer-binaries-1.77

Status: REOPENED => RESOLVED
Resolution: (none) => FIXED