Bug 11600 - Stage2 don't ask for the raid driver (need "modprobe dm-raid")
Summary: Stage2 don't ask for the raid driver (need "modprobe dm-raid")
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: release_blocker critical
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: 4beta1
Keywords: NEEDINFO, PATCH
: 11601 11605 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-11-05 13:45 CET by stephane FLAVIGNY
Modified: 2013-11-07 22:07 CET (History)
6 users (show)

See Also:
Source RPM: drakx-installer-stage2
CVE:
Status comment:


Attachments
TTY1 without modprobe dm-raid (599.12 KB, image/jpeg)
2013-11-05 13:52 CET, stephane FLAVIGNY
Details
ls /dev/mapper without modprobe dm-raid (603.51 KB, image/jpeg)
2013-11-05 13:54 CET, stephane FLAVIGNY
Details
TTY3 without modprobe dm-raid (602.05 KB, image/jpeg)
2013-11-05 13:55 CET, stephane FLAVIGNY
Details
TTY4 without modprobe dm-raid (596.51 KB, image/jpeg)
2013-11-05 13:56 CET, stephane FLAVIGNY
Details
we could just load dm-raid when initializing dmraid (451 bytes, patch)
2013-11-06 00:18 CET, Thierry Vignaud
Details | Diff

Description stephane FLAVIGNY 2013-11-05 13:45:44 CET
Description of problem:
Stage2 don't ask for the dmraid driver(ask on all version before).


From coling help on irc for solve it need to do:
modprobe dm-raid

I start stage1 form grub with all.rdz and vmlinuz.
in the line of grub make: rd.break=pre-pivot

after stage1 you arrive in shell. Inside write: modprobe dm-raid  after exit.

Stage2 start and ask for loading dmraid driver.


You can continu the installation. 

But after stop on this bug: 
https://bugs.mageia.org/show_bug.cgi?id=6180

Stage2 wait the partition like: /mapper/sil_ajacdedcfcagp1
but in tty2 ls /dev/mapper you have: sil_ajacdedcfcag1

Without the P before the number.


Stéphane.


Reproducible: 

Steps to Reproduce:
stephane FLAVIGNY 2013-11-05 13:47:34 CET

Priority: Normal => release_blocker
Severity: normal => critical

Comment 1 stephane FLAVIGNY 2013-11-05 13:52:49 CET
Created attachment 4480 [details]
TTY1 without modprobe dm-raid
Comment 2 stephane FLAVIGNY 2013-11-05 13:54:16 CET
Created attachment 4481 [details]
ls /dev/mapper without modprobe dm-raid
Comment 3 stephane FLAVIGNY 2013-11-05 13:55:27 CET
Created attachment 4482 [details]
TTY3 without modprobe dm-raid
Comment 4 stephane FLAVIGNY 2013-11-05 13:56:20 CET
Created attachment 4483 [details]
TTY4 without modprobe dm-raid
Manuel Hiebel 2013-11-05 18:10:31 CET

CC: (none) => mageia, nicolas.lecureuil, thierry.vignaud, tmb

Comment 5 Colin Guthrie 2013-11-05 20:09:56 CET
OK, so basically the old initrd presumably loaded a whole bunch of stuff related to kernel modules and just left them loaded. I guess we need to replace that somehow or make sure stage2 can do it's own modprobbing as needed. I don't think stage2 includes any kernel modules so the bind mount of /usr will completely mask the ones available in the initrd even if stage2 does try to run modprobe.

I wonder if instead of bind-mounting /tmp/stage2/usr to /usr we could use overlayfs/unionfs or similar so the stage2 stuff takes precedence, but we can still have the underlying stuff when nothing overrides it.... Thomas, Thierry, WDYT?
Comment 6 Colin Guthrie 2013-11-05 20:11:27 CET
Or perhaps I've missed something that caused stage1 to install modules that is no longer working after my rework. Any thoughts on where dm-raid was loaded previously would be useful before I go digging into the code...
Comment 7 Thierry Vignaud 2013-11-06 00:18:32 CET
stage2 is kernel agnostic (aka it doesn't contains any kernel modules and thus doesn't have to be rebuild on new kernel)
stage1 contains the stage2 loader as well as the kernel modules.

Stage1 loaded the modules:
- needed for input (USB, HID, ...)
- needed to found the stage2 depending on the chosen method
  (network, disk, ...)

Stage2 see the stage1 tree and thus when it needs to load a module, it access the /lib/modules left by the stage1.

Having said that, I don't think:
- stage1 ever supported loading stage2 from raid array and
  thus never loaded any raid modules
- you broke stage2 ability to load modules, else this would
  have been reported quite a lot earlier and you would have seen it.

A quick test shows that stage2 is still able to load modules

Stage2 always has taken care of loading raid modules when needed.

So before going forward, I would have requested the reporter to:
- plug a USB key
- run the "bug" command
- attach the report.bug.xz he founds on his USB key to this bug report
(instead of attaching photos)

But as for "dm-raid" I would wonder:
- whether it was autoloaded by dmraid
- whether is it a new kernel module (which is not)
- whether another kernel module loaded it as a dep
  (which doesn't look it's the case)
- whether it was not needed previously for dmrakdnot)

Keywords: (none) => NEEDINFO

Comment 8 Thierry Vignaud 2013-11-06 00:18:56 CET
Created attachment 4484 [details]
we could just load dm-raid when initializing dmraid
Thierry Vignaud 2013-11-06 00:19:06 CET

Keywords: (none) => PATCH

Comment 9 Thierry Vignaud 2013-11-06 00:25:19 CET
Obviously I forgot to remove the original line before posting that patch :-)

Also it would be interesting for someone to test regular soft raid.
If it's failing too due to missing dm-raid module, we would need to load it into devices.pm in init_device_mapper() instead, when loading 'dm-mod'

Thomas: any though about this?

Summary: Stage2 don't ask for the raid driver need modeprobe dm-raid in stage1 => Stage2 don't ask for the raid driver (need "modprobe dm-raid")
Source RPM: (none) => drakx-installer-stage2

Comment 10 stephane FLAVIGNY 2013-11-06 09:05:47 CET
Dear all,

@Thierry

I can't give you the report.bug.xz because the "bug" command line don't work at home.

I have the message:
Error: Can't have a partition oustide the disk!
Error: Can't have a partition oustide the disk!
Error: /dev/sdb: unrecognised disk label
ask_from_list: empty list
interactive::ask_from_listf_raw() called from /usr/lib/libDrakX/interactive.pm:282
interactive::ask_from_listf() called from /usr/lib/libDrakX/install/commands.pm:404
install::commands::bug() called from /usr/bin/bug:16
(eval)() called from /usr/bin/bug:14


This message with 3 different usb key. It's for that I use the photos.

Stéphane.
Comment 11 Colin Guthrie 2013-11-06 10:15:20 CET
(In reply to Thierry Vignaud from comment #7)
> stage2 is kernel agnostic (aka it doesn't contains any kernel modules and
> thus doesn't have to be rebuild on new kernel)
> stage1 contains the stage2 loader as well as the kernel modules.
> 
> Stage1 loaded the modules:
> - needed for input (USB, HID, ...)
> - needed to found the stage2 depending on the chosen method
>   (network, disk, ...)
> 
> Stage2 see the stage1 tree and thus when it needs to load a module, it
> access the /lib/modules left by the stage1.

Probably something to chat to you about later but I'm a little confused as to how it did this in the past... previously as far as I could tell /bin, /sbin, /lib, /lib64 and /usr would all be rm -rf'ed and then symlinked form stage2... I do things a little bit differently now, but the principle is the same. I'm just not sure how stage2 could load modules when they've been nuked already. I guess I must be missing something in my understanding of how the old system works.

Also not sure how bind mounting /usr to /tmp/stage2/usr allows access to the old /usr/lib/modules/kernel* folder tree to load more modules.

> A quick test shows that stage2 is still able to load modules
> 
> Stage2 always has taken care of loading raid modules when needed.


I guess this is the part I don't yet understand! I'll poke about a bit and take this discussion off-bug while I get my brain in order :)
Comment 12 Colin Guthrie 2013-11-06 13:11:32 CET
(In reply to Colin Guthrie from comment #11)
> I guess this is the part I don't yet understand! I'll poke about a bit and
> take this discussion off-bug while I get my brain in order :)

OK, so I've done some playing and stage2 CANNOT load modules. There is a /usr/lib/modules and a /usr/lib/firmware sylink in stage2 that point to /modules and /firmware as needed.

This is now somewhat broken as these top-level folders do not exist and thus modprobe fails.

I can tweak stage1/init again to be able to cope with this.
Comment 13 Thierry Vignaud 2013-11-06 14:17:30 CET
*** Bug 11601 has been marked as a duplicate of this bug. ***

CC: (none) => tablackwell

Comment 14 Colin Guthrie 2013-11-06 14:22:08 CET
OK, so this problem should be fixed in the new drakx-installer-binaries (-images needs rebuilt too after)
Comment 15 Thierry Vignaud 2013-11-06 22:39:08 CET
*** Bug 11605 has been marked as a duplicate of this bug. ***

CC: (none) => eeeemail

Comment 16 Tony Blackwell 2013-11-07 06:57:37 CET
M4B1 round 4 x86_64
Install still crashes due to failed target partition mount; unable to mount either ext3 or ext4 target partition from the classic DVD graphical installer.
Curiously mount does succeed manually now from the F2 # prompt. 
 'mount /dev/sda4 /mnt -o acl,noatime' gives a readable mount containing lost+found and media directories.
Installation is frozen at this point as no target
Tony Blackwell 2013-11-07 06:58:30 CET

Whiteboard: (none) => M4B1 x86_64 round 4

claire robinson 2013-11-07 08:04:30 CET

Whiteboard: M4B1 x86_64 round 4 => 4beta1

Comment 17 stephane FLAVIGNY 2013-11-07 18:40:09 CET
Dear,


I testing today, it's solve for me.

With my configuration with dmraid.

I send from cauldron.

Thanks.

Stephane.
Comment 18 Thierry Vignaud 2013-11-07 22:07:21 CET
Closing

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


Note You need to log in before you can comment on or make changes to this bug.