Modify initrd image

View: New views
6 Messages — Rating Filter:   Alert me  

Modify initrd image

by Diego Bello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I updated my motherboard and I used my old disk with Mandriva 2009.1 installed on it, but it couldn't boot Linux, even tough it did boot Windows.

The message is that it can't find the root partition after selecting Linux in Grub. The new motherboard needs the driver sata_nv to access my hard disk, but the initrd image contains the sata_sil module used on the old motherboard.

After using the rescue option of the 2009.1 Free DVD, I tried to mount the initrd image but I couldn't do it. It said that the fs type was wrong when I tried with -t ext, -t ext2 and -t ext3.

Then, I uncompressed the image, following some forum instructions, added the module, compresed the image and moving it to the /boot partition, but I got the same problem again.

Besides adding the module, do I need to do something else inside the initrd image?

I also tried to create a new initrd image using mkinitrd but it didn't work :S

Any other idea, suggestion?

Thanks.

--
Diego Bello Carreño

Re: Modify initrd image

by Vincent Panel-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 8/18/09, Diego Bello <dbello@...> wrote:

> Hello,
>
> I updated my motherboard and I used my old disk with Mandriva 2009.1
> installed on it, but it couldn't boot Linux, even tough it did boot Windows.
>
> The message is that it can't find the root partition after selecting Linux
> in Grub. The new motherboard needs the driver sata_nv to access my hard
> disk, but the initrd image contains the sata_sil module used on the old
> motherboard.
>
> After using the rescue option of the 2009.1 Free DVD, I tried to mount the
> initrd image but I couldn't do it. It said that the fs type was wrong when I
> tried with -t ext, -t ext2 and -t ext3.
>
> Then, I uncompressed the image, following some forum instructions, added the
> module, compresed the image and moving it to the /boot partition, but I got
> the same problem again.
>
> Besides adding the module, do I need to do something else inside the initrd
> image?
>
> I also tried to create a new initrd image using mkinitrd but it didn't work
> :S
>
> Any other idea, suggestion?

To figure out what's inside initrd, you can use "lsinitrd". I think
you need to add the module to your initrd image, but you also need to
load it by editing the "init" script and adding the appropriate
'modprobe' line.

Re: Modify initrd image

by Thomas Backlund :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Vincent Panel skrev:

> On 8/18/09, Diego Bello <dbello-Re5JQEeQqe8AvxtiuMwx3w@...> wrote:
>> Hello,
>>
>> Any other idea, suggestion?
>
> To figure out what's inside initrd, you can use "lsinitrd". I think
> you need to add the module to your initrd image, but you also need to
> load it by editing the "init" script and adding the appropriate
> 'modprobe' line.
>

recreate the initrd with the --preload sata_nv

--
Thomas

Re: Re: Modify initrd image

by Diego Bello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Tue, Aug 18, 2009 at 4:23 PM, Thomas Backlund <tmb@...> wrote:
Vincent Panel skrev:
On 8/18/09, Diego Bello <dbello-Re5JQEeQqe8AvxtiuMwx3w@...> wrote:
Hello,

Any other idea, suggestion?

To figure out what's inside initrd, you can use "lsinitrd". I think
you need to add the module to your initrd image, but you also need to
load it by editing the "init" script and adding the appropriate
'modprobe' line.


recreate the initrd with the --preload sata_nv

--
Thomas

I tried to re-create the initrd in that way, but I got an error when using the mkinitrd command. Could you give me the command to create the initrd that works for you?.

Regards.

--
Diego Bello Carreño

Re: Modify initrd image

by Thomas Backlund :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Diego Bello skrev:
>
> I tried to re-create the initrd in that way, but I got an error when
> using the mkinitrd command. Could you give me the command to create the
> initrd that works for you?.
>
> Regards.
>

man mkinitrd should tell you.... anyway....

mkinitrd -f --preload sata_nv /boot/initrd-<version>.img <version>

--
Thomas


Re: Re: Modify initrd image

by Diego Bello :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Tue, Aug 18, 2009 at 4:52 PM, Thomas Backlund <tmb@...> wrote:
Diego Bello skrev:


I tried to re-create the initrd in that way, but I got an error when using the mkinitrd command. Could you give me the command to create the initrd that works for you?.

Regards.


man mkinitrd should tell you.... anyway....

mkinitrd -f --preload sata_nv /boot/initrd-<version>.img <version>

--
Thomas


I tried everything and it didn't work. The problem when using mkinitrd is that the SO should be running to do it. Booting with the rescue system, mounting partitions and doing a chroot, doesn't work.

I'll try installing mdv in another hard disk on the same machine, and then copying the initrd image.

Thanks for the help anyway :).


--
Diego Bello Carreño