openSUSE 12.3 failed to boot after moved to another "pc"

I’m new to openSUSE. I have openSUSE 12.3 installed under QEMU into my flash disk. (UUID instead of disk-id stored in fstab)

After installation finished, I reboot my real machine and boot from my flash disk.

openSUSE failed to boot.

Waiting for device /dev/root to appear: …Could not find /dev/root.
Want me to fall back to /dev/disk/by-id/ata-QEMU_HARDDISK_QM00001-part1? (Y/n)

Obviously, the fake id doesn’t exist.
I modified /boot/grub2/device.map, files in initrd(run_all.sh, config/storage.sh, config/mount.sh).
And it just doesn’t work.

Now the kernel panic…
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

What should I do ?
P.S.: The system on my flash disk have to boot under a variety of pc systems. So installing openSUSE under my real machine is not a solution.

BTW, while I was viewing bin/linuxrc, I found this…

if ! “$slow_boot” ]; then
echo “doing fast boot”
source run_all.sh
else

What’s that? I found no results on google.

and IMHO, UUID is also unique. Why openSUSE take disk-id to identify disk devices? To prevent cloning?

Similar problem http://forums.opensuse.org/english/get-technical-help-here/install-boot-login/486023-cloned-opensuse-12-2-server-will-not-boot.html

How?

Can you boot when you pass correct root=/dev/xxx on kernel command line?

I realized that I misunderstood disk-id when I got up this morning… >.<

It just make it that I can’t boot openSUSE both under virtual and real machine. :’(

You are not married to by_id You can use by_label but then you need to assure all partitions are labeled uniquely.

extract files and modified…
pass correct root=/dev/sdb1 doesn’t work neither.

I chroot to the openSUSE root and run mkinitrd.
Now it boots. Both under real and virtual machines~~(strange to me…)

After mkinitrd, it works.

But I’m really messed up by it.
On my fedora(my old planet), I run mkinitrd. Here my udisk is /dev/sdb. I modified device.map like ‘(hd0) /dev/sdb’. Succeeded.

Boot on real machine: the udisk is /dev/sdd
Boot on virtual machine: the udisk is /dev/sda
But device.map unmodified. In initrd, rootdev=‘/dev/sdb1’ also.

So which root argument does kernel used??

the argument root=UUID=****** passed to kernel or /etc/fstab?
Not like that. mkinitrd makes no difference to it.
mkinitrd just makes an initrd. But according to information above, It shouldn’t find the “root device”.
But in fact, it boots, perfectly.
So the only way to find root device…uuid…no doubt.

So here comes the question: why before mkinitrd, it cannot boot?:cry:

Could you please give directions to me?:dont-know:

mkinitrd defaults to device from /etc/fstab. root=/dev/xxx on kernel command line overrides it, I just tested it and it correctly takes this argument.

On 2013-04-21 05:46, xiami f2light wrote:
> Boot on real machine: the udisk is /dev/sdd
> Boot on virtual machine: the udisk is /dev/sda

You can not use those names, they change.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)