Grub, disk by id, recompiled kernel, ext4 and clone issues

I have a HP Laptop, i did following on that.

  • Install openSUSE 11.3 with kernel 2.6.34-12-desktop installed on it.
  • Then i did a bit of customisation to kernel, recompiled it.
  • saved new kernel with new name and generated initrd for this kernel.

till this stage everything was fine. Now due to the reason that i have to clone this machine (using clonezilla) and grub specifies disk by id so as fstab and device.map, i did following manual steps

  • updated /boot/grub/device.map ( to change the disk by id to “/dev/sda” for hd0)
  • updated fstab file to mount disk not by id rather then by sda1/sda2 or sda3
  • updated /boot/grub/menu.lst ( to add new entry for kernel to load using sda2 and sda1 i.e. by labels not by ids)
  • while updating grub i updated existing entries to reflect the disk by label i.e. sda1 etc etc rather then by id)

Now when i boot up from the grub entry for original kernel, it does not boot.

while loading it display few things which i have noticed.

  • unable to modprobe proccessor.ko and various others…
  • it also complains while mounting root /dev/sda2
    where modprobe fails while inserting ext4 module and displays

mount: unknown filesystem type “ext4”

and later

sh: no job control in this shell.


i understand that because it has error modprobe-ing processor.ko (to start with) it is going to raise errors for everything else lined up to be loaded as module.


Few Questions so that i can understand this situation little better.

Question: When i re-compile the kernel, what happens ? following are the commands i use.

make gconfig —> <my chages to the kernel> —> save n exit
make clean
make bzImage
make modules
make modules_install

then i copy /usr/src/linux/arch/<processor_type>/boot/bzIamge as a new kernel to /boot
also copy the /usr/src/linux/System.map to /boot

and cd to /boot —> and issue the following command to generate initrd

mkinitrd -k <new_kernel_name> -i <new_initrd_for_new_kernel>

add new entry to grub for this new_kernel using new_initrd_for_new_kernel

and at this stage i refer to root=/dev/sda2 (i.e. change disk by ids to labels)

Question: what happens to the original kernel ? does that gets updated (with modification i made with gconfig) or not ?

Another Question: Do i really need to update devices by ids to labels to make the clone work ?

If so, what kind of changes i need to make other than i listed above to get everything working i.e. new kernel, original kernel, disk and clone.

Thanks for reading this, any help will be good. thanks

On 2012-04-20 12:56, subhan222 wrote:
>
> I have a HP Laptop, i did following on that.
>
> - Install openSUSE 11.3 with kernel 2.6.34-12-desktop installed on it.

11.3 is outdated and not supported.

> - Then i did a bit of customisation to kernel, recompiled it.
> - saved new kernel with new name and generated initrd for this kernel.

You have to change the kernel name in the “make menuconfig” phase - it is
not clear if you did.

> - updated /boot/grub/device.map ( to change the disk by id to
> “/dev/sda” for hd0)

Don’t. Use UUID or Labels.

> - updated fstab file to mount disk not by id rather then by sda1/sda2
> or sda3

Don’t. Use UUID or Labels.
I refuse to explain the reason again. Why? Because! >:-)

> Now when i boot up from the grub entry for original kernel, it does not
> boot.

The /boot/grub/device.map is ignored on boot.

> while loading it display few things which i have noticed.
>
> - unable to modprobe proccessor.ko and various others…

So, you did not change the name properly. The rest I don’t answer, as it is
based on previous errors :slight_smile:


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

OK — i did not know that 11.3 is no longer supported. Thanks for letting me know and helping me as well, regardless.

I think you are right the kernel name need to be changed, which i did not.

One thing, if i use UUID or Labels, my clone will work ?

btw, its work related and move to next version of openSUSE is unlikely because people says if everything is working in version under use why move to next version. and having online support is not good justification for them.

I was just curious that whatever we are doing at the moment does not make complete sense to me, hence this thread…

thanks anyways

YES.

On 2012-04-20 16:06, subhan222 wrote:
>
> OK — i did not know that 11.3 is no longer supported. Thanks for
> letting me know and helping me as well, regardless.

Because the forum is a peer help place, not an official support site :slight_smile:

> I think you are right the kernel name need to be changed, which i did
> not.

Yes, changing the name at the config level takes care of the module path
and file names.

> One thing, if i use UUID or Labels, my clone will work ?

Yes. It will not with IDs or paths.

>
> btw, its work related and move to next version of openSUSE is unlikely
> because people says if everything is working in version under use why
> move to next version. and having online support is not good
> justification for them.

Well, it will bite them in the end. Aside from security, sooner or later
you will need to install something, and it will simply not be in the repos,
because they were removed.

If it is work related they should consider using the enterprise version,
SLES. It has 5 years maintenance.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

is there any single command or point where i change disk-by UUIDs and it reflect in fstab/grub menu.lst and elsewhere it is required ? or do i have to do manually ?

You have to do it manually. You might want to read the answer I posted here: http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/472883-fstab-change-id-path-can-system-do-me.html#post2444060

On 2012-04-24 12:46, subhan222 wrote:
>
> please_try_again;2457322 Wrote:
>> YES.
>> …
>
> is there any single command or point where i change disk-by UUIDs and
> it reflect in fstab/grub menu.lst and elsewhere it is required ? or do i
> have to do manually ?

I think not.

When you are creating the system, you can change the defaults used by the
yast partitioner, and new partitions will use that method.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)