Opened 14 years ago

Closed 9 years ago

#402 closed defect (wontfix)

udev device naming

Reported by: Chucky Owned by: Bruno Cornec
Priority: normal Milestone: 4.0.0
Component: mondo Version: 2.2.9.2
Severity: normal Keywords:
Cc:

Description

Hello,

On many PC at our company, I have problem while restoring. Udev assign different device node than it was at backup. There is either problem with ide drives, which use hda instead of libata naming sda. Another problem, some sata drivers will assign eg. /dev/sdf instead /dev/sda (only one hdd in pc). This is because mondo doesn't care about order what modules inserts in boot. I resolved this for myself by modifying init in mondo rescue cd. I save INITRD_MODULES modules from config/start mad config/block int ramdisk plus sr_mod to file, and on restore, just before RunUDevd, I insert them. Also, i copy system's original /etc/udev settings. I think, mindi should include all modules present in ramdisk, and probe them in order he does. That should ensure same names as while backup. It would be nice to have similar behavior in future version.

Thanks.

OpenSuse 11.1 & 11.2 x86_64

Change History (7)

in reply to:  description comment:1 by Bruno Cornec, 14 years ago

Replying to Chucky:

Hello,

This is because mondo doesn't care about order what modules inserts in boot.

No it's made on purpose up to now. Which order should it take and how to determine it ?

I resolved this for myself by modifying init in mondo rescue cd. I save INITRD_MODULES modules from config/start mad config/block int ramdisk plus sr_mod to file, and on restore, just before RunUDevd, I insert them. Also, i copy system's original /etc/udev settings.

You should use the FORCE_MODS variable in a /etc/mindi/mindi.conf file to force the module to load first at restore time. Still not respecting the order, but that feature could be more easily added I think.

comment:2 by Chucky, 14 years ago

Yes, I could use FORCE_MODS. But that means edit command line on every restore. Now imagine, you have 20 (or more) PC's to clone OS to. That is pretty time consuming.

Mondorestore inserts modules in order that find /lib/modules/... gives, and that ends up in random behavior. Some modules will name HDD as /dev/hdX, some /dev/sdX. Sometimes inserts first module for eg. card reader, thus assigning /dev/sd[a-e], which causes first HDD to be /dev/sdf then, and so on. That confuse mondo's configurations so they must be adjusted.

If I want to detect devices like backed up system, I have to do it in way OS does. All drives has it's modules in system initrd. They are inserted before mounting file system. They are specified by system's install program and contains only those, necessary for detecting drives which boots from. So, if those modules (they can be found in /etc/sysconfig/kernel - INITRD_MODULES=) were inserted after force_mods section and before any other module inserting, this could solve the problem. Modules are inserted in order which are listed in this variable.

comment:3 by Bruno Cornec, 14 years ago

Milestone: 2.2.9.32.2.9.4

comment:4 by Bruno Cornec, 14 years ago

Milestone: 2.2.9.42.2.9.5

comment:5 by Bruno Cornec, 13 years ago

Milestone: 2.2.9.53.0.0
Status: newassigned

Another possibility at restore time is to use the forcemods="mod1 mod2" option at boot prompt.

Using /etc/sysconfig/kernel for now is not an option as it's distribution dependant.

in reply to:  5 comment:6 by stefanbauer, 11 years ago

Replying to bruno:

Another possibility at restore time is to use the forcemods="mod1 mod2" option at boot prompt.

That did the trick for me while using a usb-stick as boot-device (created with -U switch). I had to use forcemods="libata, scsi_mod ata_piix scsi ahci" to let the system detect the ide/scsi/sata-disks before the usb-storage module kicks in, detects the usb-stick and grabs /dev/sda.

comment:7 by Bruno Cornec, 9 years ago

Resolution: wontfix
Status: assignedclosed

CLosing as I think I won't develop anything special soon for this.

Note: See TracTickets for help on using tickets.